Thread: Programming AI
View Single Post
  #1  
Old 01-14-2009, 02:04 AM
Deimos
Hill Giant
 
Join Date: Jun 2004
Posts: 135
Default Programming AI

Hey all : D.

I've been really looking into AI recently and well, I thought it'd be neat to take a shot at doing an AI Engine (text parsing and what not). Because PERL is also the bomb at doing text parsing, I'd probably use PERL. There is still a chance I'll use C++ though ^_^, oh wells ;p.

So, let's move on to the AI. When I think of AI, I really start thinking of a text parser. Sure, you can get words out of text and so on, but how can you read these words? Have a million if statements based on context? Sub routines? O-o. In reality, you pretty much have to teach the NPC English (or w/e you're writing it for). This means you pretty much have a dictionary and you have the rules of grammar in there. From here, you have instructions on how to treat nouns, pronouns, verbs, etc, this way the NPC knows how to treat them, and if they are special things like I, me, you, and what not, then you have instructions for the NPC on each of those (the most basic of the basic, yes, there are various forms of you, but you only need one of them).

From here, you could actually get the NPC to deal with various ground objects to (for example, if the player is standing next to a chair), and you can add in coords for things like caves and what not. The real hard part I suppose is programming the initial instructions and storing it uniquly for the AI. The next hard part would be adding in various factors which change how they actually talk and respond to these various events (for example, the culture they've come from, their various personality traits, their IQ, what they already know, and so on).

I just really do find it interesting, and I know it's possible. In fact, I might even make a test AI on an EQEMu server and have people talk to it and what not for fun ^_^. If it works out, I could easily make more (tweaking their IQ and what not to make all of them unique) and populate the entire world with smart NPCs : P.

Oh well, what do you guys think?

Also, try posting some ideas on what instructions might be used and how things might be stored. Currently, for storage I'm considering just using a text file for each NPC (like an object) because it's very easy to store an entire NPC and retrieve it. Storing the stuff in SQL would be a hassle and could actually be much slower :\.

So what are your thoughts and ideas? : D.

Btw, I'd use a current AI thing, but I'm not impressed with any of them at all :\. They're not designed the way I'd do it (they're a bit unnatural too because saying the same thing over and over to them will yield the same response over and over again). They need to simulate some sort of emotion and memory ><.
__________________
//The Path of Chaos Server-
//Fate Industries
//Lots of stuff O-o
Reply With Quote