Dynamic Programming for TreeObservation
Idea @adrian_egli Re-use other agents information encountered on the way forward.
The main idea behind this story is to optimise local tree like observation. But also to invent a local to global information flow. The method has to start with an agent and continue until all agents have been visited.
Start by selecting a first agent and collect data/information allong its local forward walking paths. Collect all data allong all possible paths up to a maximum distance. The starting cell is the agent's current position.
Agents path doesn't have any opposite agent on it's search path.
Continue with another agent. Once the agent visits a cell where an opposite agent is located at, the forward search will be stopped for this path. Then the opposite agent has to takeover. The opposite agent starts searching similar to the previous agent. Thus the opposite agent searchs all local paths. For allagents/search a cell and direction can only be visited once, thus when it was visited before the search stops. And the search path must not be longer than the maximal distance.
Once the "recursive" search has been stopped at maximum distance or at a still visited cell the next algorithmic step begins: Collect the information and save the collected information in an information map with mult- layer. The map has one unique layer for each piece of information (data). Then walk backward the spanned path. While walking backward (step out of the recursive walk) aggregate the collected information. So we have to implement two principal functions for information gathering: store and summarize information.
This image shows for all agents the path and how the information flow.
Now every agent has full access to the collected information as well as to the collected information. The observation of the tree search could be optimized or the data could be completely different.
memory required: n x grid (w x h ) for each "data/information"
=> observation for each agent (vector of lenght v)
Make pattern re-usable to gather information (implement collector and aggregator).