Archived

This topic is now archived and is closed to further replies.

Ant farms. ;)

This topic is 5894 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The other post about ants brought this to mind. I''ve been thinking for a while about a form of AI I''d like to play with, but I''m not certain how to implement it. Basically it deals with a hive of ants wondering around a non-interactive artifical life simulation. The idea is the queen ant can offer advice to any ant which encounters a situation where it doesn''t know what to do. However, the queen ant is not special in any great respect; it is just some ant. The idea is that other ants "out in the field" as it were, will accumulate a set of experieneces, and then the more sucessful ants will have the chance to become the queen ant. Ideally this would be helped along with a knowledge base attached to the hive that makes the queen ant "smarter" (=P basically just has a larger memory), but it resident between queens. Hence overall hive objectives (get food, survive) can be retained between queens. I''ve thought a bit about implementing it, but I''d like feedback/suggestions. Basically my (rather haphazard) thoughts on the matter are as follows: Each ant has a memory space Z: That is, it can hold Z independent memories. Each memory has N outward links, where N is the number of actions an ant can take (for example, eat food, move, look around, sniff, climb and so on). The sim is updated in frames; each frame, each ant takes one action. They may also request advice from the queen: that''s a free action they can do as much as they like. When an ant takes an action, it adds a new memory to it''s set of memories. The memory node it is currently IN, is linked to a new memory node which is generated to hold the new state information about the ant. It then sets it''s current node (the one it is in) to the new node. The weight of the link made is determined by the "usefullness" of an action. In determining what action to take (recall, there are only N options here; even if some of them have sub-options; eg. move forwards, backwards, left, right. The number of actions is still finite, and small), the ant does a search through the memories it has stored for a node similar to it''s current node (ie. something similar to what it has done before). It finds all the matches and does a search through the links off those matches, and accumulates weightings. It then makes a choice based on a weighted probability from the values it accumulated. When adding a new memory, if it can find a sufficiently similar memory already in the memories it holds, a collision occures and the old memory is replaced by the new one; but the links from the existing memory are preserved. In general, an ant only has a small number of memories, so memories which are not often used (few links to or from) are discarded so new more relevant memories can be collected. Any thoughts on this? I haven''t done anything serious about it, this is all just from sitting down and thinking about it once or twice when I''m bored on the bus. =p As far as I can tell, it''d be fairly easy to implement... but I''m worried about ants having fits; if it generates a nodal structure where an ant has these memories foo, and this situation bar, it will forever just there doing the same thing, over and over, simply discarding the last memory and then accumulating a new identical one. I guess a minimum retention time (like an evaluation period) for memories might be an idea... I''ll have to think about it. Anyway, any thoughts or critism welcome. If you can think of a better way of doing it, please share! Ciao.

Share this post


Link to post
Share on other sites
this sounds like a very interesting idea... although i don''t know if you should call them "ants" (ants do not ask for advice, and "any old ant" no matter how successful cannot become the queen)...
you should call them "humans"

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
Shadow Mint, might I suggest you take a look at the work done on Classifier Systems (CFS). They''re not exactly the same as what you have described by there are some interesting similarities. A CFS may also give you some ideas about how to implement your own system.

Cheers,

Timkin

Share this post


Link to post
Share on other sites