Advertisement

Beginning AI

Started by August 07, 2000 09:05 AM
6 comments, last by Twig Meister 24 years, 3 months ago
I''ve finally decided to do something about my fasination with AI so I was wondering where to start ? What books cater for the beginner ? I know about the GameAI webpage but I cannot seem to find any info there, only search algorithms for advanced people (so they seem). I have written a program where a sprite chases another sprite across the screen but all it does is copy the other''s movement.
Well, welcome to the world of AI, where you ask more questions that you''ll ever bring answers A bit like Philosophy.

If I may suggest a nice problem to start with ?
Simulate an ant nest.
To get you started, here is a very simple way to do it and actually see "something" happen.

(all this is cell based)
first a playing ground : there are open ground, or rocks.
Then the moving stuff : food, ants.

Generate a field, with rocks, then add food randomly, then add ants.

Have a collection of ants. Each ant can carry up to one food item.
When an ant has no food, it looks for it.
When an ant detects food near itself, it takes it only if the concerned food item is not near other food items
If the food item is alone, for instance, it will be taken; but if there are other food nearby, it will stay there.

If the an is carrying food, it will drop its food where it stands if there is plenty food nearby, never if there is no food.

I think that''s pretty much it.

If you don''t understand ask, and if you do, tell me what happen.

The nice thing with this program is that you can later expand it to higher ground, but I''ll leave that to your imagination.

Hope it helps.

I don''t give you any nice site, because I you said yourself, they are all for already advanced people. That''s because to start, the best way is to ask yourself "How does this works, what are the very basic rules that this being respects to do al this..." etc
Look at the "boids" for another example of classic emerging behaviour. (Steering behaviour for autonomous characters, can''t never remember the name of the author :/ sorry )

youpla :-P
-----------------------------Sancte Isidore ora pro nobis !
Advertisement
Hey,

If you want to read a good book about AI start with
AI : A modern approach from Norwig and Russell.

It is the most used book and it covers all the basics.
You might find it a little theoretical, so go ahead and experiment on your own until you think you have toyed enough around and want to write basic solid code.

That''s how I usually work. I start out experimenting with my own ideas, see how far I get and then grab for a book to see how you can do it more solid and more based on the theory.

The ant nest is a great idea. Or you might try some basic pathfinding algorithms.

******************************
Stefan Baert

On the day we create intelligence and consciousness, mankind becomes God.
On the day we create intelligence and consciousness, mankind becomes obsolete...
******************************
******************************StrategicAllianceOn the day we create intelligence and consciousness, mankind becomes God.On the day we create intelligence and consciousness, mankind becomes obsolete...******************************
Note : I did the ant nest thingy when I was 12, I started learning the theory behind A* this year (but I knew it 4 years ago).
-----------------------------Sancte Isidore ora pro nobis !
ahw, is there any good tutorial/book to read about the ant test. Somewhere where I can understand the problem thoroughly ?
LOL! I can just imagine that ant pick up his food, and see the large ammount of food in one location, drop the food he has... decide that he doesn''t want the lot of food and pick up his original food again ... hehehe... It is a continuous loop of an undecisive ant.. but maybe I didn''t understand your explanation


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
Advertisement
if i am not mistaken, this algorithm will have the ant collect food and take it to one location
something like it going out into the world and gathering food to bring back to the ant hill


"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions

Yeah, my mistake, I must have been tired when I read it . It comes under the limitation of "never pick it up if there is PLENTY nearby" which is what I failed to take fully into account

-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)

This topic is closed to new replies.

Advertisement