Ant farms. ;)
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.
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)
you should call them "humans"
--- krez (krezisback@aol.com)
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
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
Cheers,
Timkin
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement