View Full Version : Ants!

24-05-2006, 05:57 PM
Every AI forum have to contain at least one post regarding an Ant experiment, I hope this will be the start for many others to come :wink:

This is an old project of mine that Ive done about 2 years ago, this was my first AI project and sadly the last one as well. (I do have a voice recognition app that is in stand by, for the last 2 year tho :roll: )

You can find its page (that was made especially for you guys..) here:

I also wanted to know how many experienced AI developers are in here? Maybe you can start a recourse library joining effort in learning AI techniques (I found it much harder then any other topic I come across at).


24-05-2006, 07:58 PM
My first app for AI was an Ants system. I'll see if I can upload it, it's on a floppy disk somewhere (my current machien doesn't have a floppy so I'll have to find an old machine :wink:)

I did my degree is software engineering, and specialised in Genetic Algorithms so I have a fair understanding of GA's and NN's. Although I did my degree about 10 years ago now so I'm a bit rusty. :oops:

24-05-2006, 08:04 PM
Well, first define experienced :). Then define AI :).

Yes I've worked on quite a few AI projects including; Autonomous Robotics, Adaptive OCR, Genetic Algorythms, Neural Networks, Fuzzy Logic, Voice Recog, and various other types/applications.

I even sat down and wrote several articles (that I never released, and now are lost :() on different subjects. Really wish I still had copies of them, as they would be good reference points for myself as well as others.

Worst part about AI is its broad meaning and acceptance!

Robert Kosek
24-05-2006, 08:41 PM
I am in no way experienced, but I dabble and experiment for fun and learning. I'd love to read some AI articles and code from you all! :)

24-05-2006, 11:45 PM
AI will be my future field of study (alongside robotics ;)) so I'd say that I am an adept fan of AI. :)

Though I am not as good as I'd like to be, I understand many basic concepts and principles of different approaches and sub-topics in AI.

I also have read Matt Bucklands tutorials on NNs and GAs and I found it to be quite a nice appraoch to incorporating the two for practical use.

And for those that want to get into some great low level stuff for their games I recommend 'AI for Game Developers' by David M. Bourg & Glenn Seemann -- O'Reilly (ISBN 0-596-00555-5)

Great read and a nice reference for later on too. There was another one that covered directly specific game genres, but I didn't have as much cash as I needed for both. :) Forgot the title of it...

Robert Kosek
25-05-2006, 12:10 AM
Dammit WILL, you beat me to referring the book. In fact, I was just rereading it again in the car. :roll:

I've found of late that almost all of the good older AI sites are either dead and dusty, or spammed to closure. Places like AIDepot haven't seen an update in years, and Gen 5 hasn't been updated much either. It's depressing really. When I have a question I would go and ask the folks who visit such sites, but now there's almost nowhere to go to have a good discussion about AI.

And since AI is such an integral part of game design, moreso then spakin' new graphics, this is completely unacceptible. At least we all can talk about it here.

25-05-2006, 07:01 AM
I do all the AI in my games through Rule Based scripts that affect FSMs. I find this the easiest to understand and modify to achieve the behaviours I want.

25-05-2006, 07:30 AM
I think that everyone generally should create and design their own Finitate State Machines for those more complex game engines, but as for stuff like NNs and GAs... that can be a bit daunting for some, even myself who is a bit more familiar than a few people about using these in game AI.

Also, Itenc to think that hybrid are the best alround though. You mix methods. It realy gives you more options when you do that. And some rather interesting results when experimenting.

25-05-2006, 01:34 PM
Funny thing, right after my post here I got asked to do a talk at our local robotics group. Topic: Theoretical PC based AI for Robotics.

I'll have to post my notes shortly after the talk next Saturday :). Basic premis is how to make use of learning systems build in the PC inside of embedded robotics :).

25-05-2006, 11:17 PM
GA's are also one of the best ways of solving scheduling problems..

I wrote a scheduler for my school which used genetic algorithms: http://www.sulaco.co.za/nitrogen/projectinfo.asp?id=26

I'd love to do some graphical output though.. Like teaching a PC to draw a picture! :)

What if someone made a GA spit out an image onto a webpage and got any visitors to the site to rate each picture (ie. give it a fitness value) then the GA would learn what is a good picture and what is not...

Could it produce really good art?

25-05-2006, 11:34 PM
Well what exactly would you use as the inputs? :) That what often stiffles m about setting up NNs. :/

30-05-2006, 02:30 PM
How come there are so many replies and yet non about my ants? :(

Mattias created AI art using Delphi-NEAT, you can find it here http://www.cambrianlabs.com/mattias/GeneticArt/
I've also seen a similar ver that also contains color.

Do you guys (and gals?) want to start several small projects in order to explain better the AI techniques? Or maybe create a small (updated) resource center, as all the sites I know weren't updated for ages...

31-05-2006, 08:17 AM
Hi tanffn,

nice project you have there. :D
The screens are very interesting.

I would like to have something more basic for my project, just an explanation for basic 3D movement with pathfinding perhaps.


31-05-2006, 08:42 AM
Forgive my of-topic-ness. :) Love the visuals on the pheremone examples btw!

I've tried unsuccessfully to recreate the minsweepers OR ants eating food example on Fupster's site (http://www.ai-junkie.com/). I think I was close but my little guys just kept spinning around in circles never to get that proper neiche it needed to adjust properly to finding the food. :? Perhaps some of my math was off. (I can post my try if you'd like --and if I can find it... I'd like to solve this puppy once and for all!)

There was one other person that did solve it though. He went by the name of 'Lucky5' or something of that nature... I forget his real name. He used to frequent the AI Junkie site's forums too.

Anyhow... maybe a basic tutorial or lesson on all of this or part of this would help many who have a hard time with such concepts to understand at least a good portion of this. I know I personally have a hard time wrapping my head around Genetic Algorithms, though I understand that basic idea, just not the intriqute workings of the 'math' involved.

31-05-2006, 10:44 AM
Thanks late good feedback is better then non at all :D

Firlefanz: As jdarling said it a matter of interpretation but I don't consider pathfinding as AI. As its a known algorithm with a known result.

WILL: can be complicated to debug.. but upload the fitness function, usually the problem is there. Also take a look at the GA params, maybe the pop is too small, or you narrow your pop too much in each new Epoch? I know there were most of my bugs.

27-05-2007, 06:36 PM
Hey I finally gave this a solid run to see how it did. So I turned it on for overnight while I slept.

Unfortunately it seems to have either stalled or gone braindead after just 88 generations. The program it's self is still running, but the simulation looks almost as if it stopped. ie. the ants just sit around 'home' not moving. Not even turning on the spot.

I looked at the graph to see what might have happened as it looked like it was a sudden drop. Maybe a bad set of data threw all the NNs off?