🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

An AI question.

Started by
22 comments, last by KingMolson 22 years, 5 months ago
Is it currently possible to make an AI that would have goals or a certain ideal situation that it tries too achieve (like a strange attractor in Chaos Math I suppose) aswell as a personality type or Modus Operandi and would break down the steps towards that goal based on its MO? For example consider the following scenario. Without scripting it entirely would the following be possible? There is a King and his Brother, both are given this form of AI. The princes goals are too become king and its MO is too be sneaky and underhanded. So the Prince decides too hire an assasin. The assasin kills the king and the prince takes his place. A follow up question too that. Would this system still work if I wanted too use similiar ai''s with goals varying from world takeover too accumulating logs?
Advertisement
Right... Contact Naxrix about this (or try the Game Design Forum), because he is working on exactly what you mean

http://www.gamedev.net/community/forums/topic.asp?topic_id=72121

This is a recent topic about their work.

Basicly, they work on a system with "needs" and "solutions". A "need" could be to remove a person (say, the king).

A "solution" could then be: kidnap, kill. Lets take "kill". The "kill" option would include several ways of killing the target (use sword/hire assasin/use poison) and probably also the risk attached to it (use sword: dangerous, hire assasin: safe, use poison: somewhat safe). The NPC would then choose one of these options (hire assasin), and follow that route.

The "hire assasin" option also has a few steps: "locate assasin" "go to assasin" "pay assasin".

The assasin would work in somewhat the same way. Its need now becomes "kill king". It will work down the same road as the prince, but his "danger" choice would matter less (he is used to killing, and doesnt mind the danger). However, a well-known assasin might actually hire another assasin to do the dirty work (one whom works at even higher danger levels, either because he is good or because he is a newbie)...

Etc etc

I hope this helps a bit?

-Maarten Leeuwrik
"Some people when faced with the end of a journey simply decide to begin anew I guess."
The problem is that while this seems obvious on the surface, the issue is how to get the computer to make these decisions. How does the system know that ''kill'' involves the methods you mentioned, how does it pick one, and how does it know how to execute it?

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]
That is all stored in the tree the deisnger has to build. All the low level "commands" (like "use sword to kill") are basicly just a list of command to execute:

1) Get weapon
2) Walk to target
3) Use weapon on target
4) If target not dead goto 3



Or hirin an assasin to kill NPC X:

1) Get money
2) Walk to assasin (pick the closest one from a database)
3) "chat" with assasin (role dice to figure out a yes/no)
4) if no success, find new assasin

-Maarten Leeuwrik
"Some people when faced with the end of a journey simply decide to begin anew I guess."
Sounds very cool. That does help quite a bit.
You only covered the easy one... that is "how does he do it". The hard one is making the AI pick from among the huge list of available options. You would have to give each option a variety of weighted paramaters to allow it to "decide" which approach was the most favorable one at any given time.

Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

I also tipped on that topic

Lets say the Prince wants to kill the King. Each NPC also has a "danger" facotr: this indicates the amount of danger an NPC wants to expose itself to at max. The Prince is a chicken off course.

Therefor, a lot of options will be cancelled out (using a sword? and be caught red-handed? too dangerous) because of a too high "danger" treshhold.

However, hiring an assasin costs money, so that has a high "money treshhold". Fortunatly, princes are rich, so his "money" factor is really high.

Conclusion? Assasin has low danger but high money levels, and the Prince does not like danger but has a lot of money. Therefor, the Assasin solution should be awarded a high value (used later to pick the right action).

-Maarten Leeuwrik
"Some people when faced with the end of a journey simply decide to begin anew I guess."
If you have to define every action and sub-action up-front, then you're essentially just scripting everything. Now, I'm not saying that it won't work well, but it's not very 'intelligent

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

Edited by - Kylotan on January 23, 2002 9:08:24 PM
BTW, Hi KingMolson...I believe you contacted me on my message boards today...anyway...


quote: Original post by Kylotan
If you have to define every action and sub-action up-front, then you're essentially just scripting everything. Now, I'm not saying that it won't work well, but it's not very 'intelligent

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

Edited by - Kylotan on January 23, 2002 9:08:24 PM


Yes I went through that same dilema. Basically it's my understanding that an agent or NPC can only know something if:

A) we (the desingers/programmers) tell him
or
B) the NPC learns from some kind of memory/learning type of AI

So far with my AI I have been going with the idea of telling the NPC by giving him the info to make a decision. I know it's not as elegant as an AI mechanism where the NPC is really making a total decision, but I am not sure we can do better for real-time apps like games.

But the point is that the NPC would not just follow the path we give him precisely. So it wouldn't be as scripted as a totally linear game where the NPC does kidnaps the princess every time the same way the same time.

It would be more like what Ronin said. The NPC would have a desier and we would tell him of a number of ways to fulfuil that desire and the NPC picks the most appropriate one according to his attribtues (i.e. does that way of attain the desire conflict with the NPC's morals, etc)

So, Kylotan, I'm not arguing with you but I do believe on the gameplaying point of view it would seem more intelligent and in-depth than a typical scripted environment


A CRPG in development...

Need help? Well, go FAQ yourself.

"Feel free to utilize Pouya's cliff." - Fel


Edited by - Nazrix on January 23, 2002 9:30:09 PM
Need help? Well, go FAQ yourself. "Just don't look at the hole." -- Unspoken_Magi
Ok, so the prince thinks that hiring an assasin is the easiest way OBVIOUSLY because he could be caught red handed right? What if he was trying to kill a hermit in the woods, which doesnt have that danger involved? Hiring an assasin might work but would the charater be capable of weighing the gain to the risk of having the assasin rat him out if he was caught by the king''s 30 gaurds? And what if the guards were killed? wouldnt you then have to recalculate the danger value all over again for every possible choice an NPC could ever make?!
"Never have a battle of wits with an unarmed man. He will surely attempt to disarm you as well"~Vendayan

This topic is closed to new replies.

Advertisement