Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Artificial Intelligence
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
AsianSensation




PostPosted: Wed Jun 25, 2003 9:13 pm   Post subject: Artificial Intelligence

Ok, Im planning to do some AI programming, the thing is though, it's not scripted AI(well, not entirely), so it means not all of the AI is based on If and Elsif conditions. I want my AI to remember certain situations and stuff like that. I already have some ideas, but I also need any and all suggestions.

Edit: just to clarify, I want my AI to do something like this(something Black and Whiteish):

I have a monster, when he is just born, he does not know anything, but because he is a monster, therefore, he must trample certain villages, but me, as the player, does not want my monster to do that, therefore, admonish him, and from now on, he will no longer do that anymore.
Sponsor
Sponsor
Sponsor
sponsor
Dan




PostPosted: Wed Jun 25, 2003 10:00 pm   Post subject: (No subject)

well i whould do somting like have it save to a file that has a hole lot of numbers for each sat. like good and evil.

make it so the higher the evil number the higher the chases of him doing somting bad are. also when the moster dose somting bad and you rewared him add to evil and when you yell at him take away from evil.

just make shure to load the file befor the game paly starts and save it befor it ends. you will just have to figer out some equations to do randomness with shode be realy easy like have it pick a random number betwen 1 and 100-evilPoints and if it is 1 then he dose somting bad, you cold also do same thing with good but have it liked with evil some how so you cat be full evil and good.

hope that helped in some way....
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
AsianSensation




PostPosted: Wed Jun 25, 2003 10:03 pm   Post subject: (No subject)

thanks dan, I was thinking along that line, of having stats for each values. values like good, bad, anger, sympathy, curiosity, etc, basically, a lot of emotion values. then I change the values around based on the situation. But I still need the AI to recognize a situation, any ways to do that? I was thinking about outward appearance values? like how menacing the other monster looks?
Dan




PostPosted: Wed Jun 25, 2003 10:19 pm   Post subject: (No subject)

more values for all the stuff. like have a hole buch of difrent pics for each apreanes and depending on the value load the right one. you could have the values for both your monster and the other one and comaper them, the greater the value of the other moster the more likey that your moster will run away or somting, and same thing if your moster has biger value.

so you whould need to stotre values, comaper them with ifs, use random equation...
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
Tony




PostPosted: Wed Jun 25, 2003 11:47 pm   Post subject: (No subject)

I'm not gonna read everything posted above (not enough time) but I'm gonna mention that using fuzzy logic is a good idea when it comes to AI.

fuzzy logic basically means that instead of using 1 or 0 for your if statments, you have al the numbers in between. So a condition might be 0.25 true Confused

I'm not too sure about how you would code that (just read of consept some place) but it adds on to realizm.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Homer_simpson




PostPosted: Thu Jun 26, 2003 7:15 am   Post subject: (No subject)

well you're creature is an object and it can have properties like: goodness,strength,intellegence,anger,etc
so you could make it do things depending on it's properies for example the more happy your creature is the less chances there are for it too attack villages.... or the more intellegence he is the easier it will learn to do stuff...
Tony




PostPosted: Thu Jun 26, 2003 11:10 am   Post subject: (No subject)

homer has a good point. I think the best way around this would be to get your create to do an action based on object's properties. Thats also where fuzzy logic comes in since those properties can have a range of values.

basically if the create is at a location where a villager is in reach then he has a sertain % chance to attack based on his happiness level. Some other properties such as agression might also contribute to determining that percentage.

at that point once attack has been made, other properties such as strength would determine the damage done.

After the action your create moves based on yet other properties. If its hungry, move tawards food sourse. Angry - tawards more villagers. If its just lazy then stay on the spot Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
AsianSensation




PostPosted: Thu Jun 26, 2003 12:01 pm   Post subject: (No subject)

cool, thanks peoples.

But another question, since I am programming this in turing, is it fast enough to handle it? because I am also drawing to screen alot of stuff, like all the villagers and houses being built. This brings another point up, my villagers will be running on AIs too, can turing calculate all that(like 10 something villager AIs at least running at the same time)?

maybe I should make my villager AI so they only do certain simple stuff? and not letting the villagers have that many emotion values?
Tony




PostPosted: Thu Jun 26, 2003 12:45 pm   Post subject: (No subject)

it all depends on how many values are calculated and how many if statments are executed.

if you keep AI simple and straight farwards without complex functions... then you might be able to run it fast enough (also depends on computer)
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Andy




PostPosted: Thu Jun 26, 2003 1:03 pm   Post subject: (No subject)

our school has p3 800 mhz 64 mb ram
Homer_simpson




PostPosted: Thu Jun 26, 2003 1:26 pm   Post subject: (No subject)

dodge_tomahawk wrote:
our school has p3 800 mhz 64 mb ram

that has nothing to do with what we're talkin bout dude... what da f|_| < |<
any way i think turing is fast enough to handle the calculations for your simple AI, since your not gonna have more than like 100 caculations... unless you're planning to have more than one creatures in your game...
Mazer




PostPosted: Thu Jun 26, 2003 1:37 pm   Post subject: (No subject)

dodge_tomahawk wrote:
our school has p3 800 mhz 64 mb ram


no kidding! geez, ya'd think with computers like that, ms word would actually run a bit faster...
Homer_simpson




PostPosted: Thu Jun 26, 2003 1:45 pm   Post subject: (No subject)

holy shit!!! Shocked
what does that have to do with AI Posted Image, might have been reduced in size. Click Image to view fullscreen.Posted Image, might have been reduced in size. Click Image to view fullscreen.Posted Image, might have been reduced in size. Click Image to view fullscreen.Posted Image, might have been reduced in size. Click Image to view fullscreen.Posted Image, might have been reduced in size. Click Image to view fullscreen.


Posted Image, might have been reduced in size. Click Image to view fullscreen. you ppl just cant stop spamming can u Posted Image, might have been reduced in size. Click Image to view fullscreen.
Asok




PostPosted: Thu Jun 26, 2003 2:01 pm   Post subject: (No subject)

/me likes homer's smilies

Posted Image, might have been reduced in size. Click Image to view fullscreen. <- Constipated Smiley

Posted Image, might have been reduced in size. Click Image to view fullscreen. <- Spontaneous Combustion Smiley

Mr. Green
Homer_simpson




PostPosted: Thu Jun 26, 2003 2:04 pm   Post subject: (No subject)

i know this has nothing to do with this thread but here's a whole bunch of them if u like smileys http://www.mysmilies.com/
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 25 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: