I have an agent in an environment with resources such as food.
I want the agent to find this food without informing it of its location and without player input.
How would I go about solving this problem?
I have an agent in an environment with resources such as food.
I want the agent to find this food without informing it of its location and without player input.
How would I go about solving this problem?
Boss Fight, Boss Fight, Boss Fight!
Ninja Boss Fight said:
I have an agent in an environment with resources such as food.
I want the agent to find this food without informing it of its location and without player input.
How would I go about solving this problem?
Hi Nbf,
What sort of senses would you like to simulate, and how clever should it be? What is the map like?
If it can't see at all and it's a tile-based, you could just send it into a corner and make it graze the traversable space, picking up any food on the same tile.
But I'm sure you want something more advanced than that. Also, should the agent be able to guess where to find more food? As in, get an impression of the food density on the map?
Ninja Boss Fight said:
I want the agent to find this food without informing it of its location and without player input.
What, exactly, should the agent ignore? Food location, map layout, its own location on a known map, something else? It's a very important question because it affects the agent's data structures and how they are populated.
For example, an agent that knows the map and its location and only needs to search for food needs to maintain its own position, probably its planned exploration route, and mainly a partition of the map into regions (unexplored or explored and containing X at location Y), relying on a read-only representation of the whole map that it could share with other similar agents.
On the other hand an agent that doesn't know your level cannot share the geometric map representation, which needs to be discovered (along with food location data) over the course of exploration.
Another basic question: does the food location information become stale, for example because someone else might produce or eat food while the agent is busy exploring? Or does the agent proceed to eat food as soon as it is discovered, simplifying the model from guessing the current food distribution given the last seen one to remembering the least recently visited promising locations?
Omae Wa Mou Shindeiru
@supervga @lorenzogatti the agent is modelled after an ant so has limited vision and can ‘feel’ the current surrounding terrain giving it an idea of its nearest surroundings.
Ideally, it should not know about the layout of the map or its current position relative to he overall map but does have a general sense of where its home is based on pheromone trails which are created as the ant walks.
The idea is that I want the ant to count for food by revealing its surroundings and gaining info which is shared with other ants through pheromones.
Boss Fight, Boss Fight, Boss Fight!
So your main data structure is the collective pheromone trail of the ant swarm? How do you plan to represent it and the map? With a tile map, for example, you could add to tile attributes one number: pheromone concentration.
Ants could simply follow the gradient of pheromone concentration downwards and add a little pheromone at their current location; they would explore all the map and come out of dead ends.
You could initialize pheromone concentration to a small random amount (to perturb ant paths) and decrease values exponentially to ensure long-term numerical stability (for example, if 20 ants add 1 to the concentration of their respective map cells per turn and there are 2000 cells, you can multiply concentrations by 0.999 each turn to keep the average pheromone level around 10)
Omae Wa Mou Shindeiru