I'm working on a multi-agent simulator in which agents learn an environment while moving through it. Being somewhat new to Java, I'm looking for suggestions on what data structure to use for storing an agents associative memory. To give you an idea, I'm currently using an array for the agent's exploratory memory (a buffer), then when the agent finds food the path used to find food is then copied to the agent's associative memory and the exploratory memory is whiped clean. The problem I'm encountering is I don't want just a bunch of paths to be stored in the agent's associative memory - exsecially paths that have exact subpaths. For example, if an agent moves North, North, East, then South, and finds food, that path will be stored in associative memory - in case the agent finds itself on that same path it can use it's associative memory to find food. The problem is what if the agent does find itself on that same path, but moved South then West prior to finding the above path. My current logic updates associative memory with the full path taken to reach food. Therefore I would have two paths in my associative memory but one path would be a subpath of another. I guess I'm looking for a data structure that can store full paths as well as parts of paths that connect to full paths. Any suggestions?
Now, I may not be fully aware of how this all works, but why not just store all full paths, and calculate the most efficient path to use when necessary?
Edit: Also, do the agents remember where the food actually is, or do they just know which paths lead them to it?
Thanks for the reply.
The agents don't know where the food is, they only know paths to food. I can't make a matrix for the agent mapping the environment.
I was considering storing full paths and using an emotional context, but wouldn't that be inefficient to store all full paths when some paths are subpaths of other paths?
One important thing I left out - when an agent finds food it is randomly replaced in the environment.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center