# Local conflict prediction observation fc-net experiments
## Observation
We created a set of custom observations as explained in detail below in the sections. The observations work by capturing the agent data from the most conflicting `n_local = 5` agents and the conflict prediction related information.
### Agent Specific Observations
First we look at the simple agent observations <br>
There are some general observations we provide to the agent
observation_shortest and observation_next_shortest represent a 3-size vector for the actions L,F and R.
If no alternate path exists both of the values would be same
E.g. observation_shortest = [0, 1, 0] refers to Forward (F) shortest path
observation_next_shortest = [0, 0, 1] refers to taking action Right (R) for an alternate route
### Conflict Prediction Matrix
When we analyse agents, we can resolve agent conflicts based on the following criteria
- Distance to Target and Extra Distance to be travelled in case of any alternate path
- Steps after which first conflict happens
- Number of agents with which an agent has conflicts with
### Target and Extra Distance
This is the vector for the distance from target to the shortest path and the alterante path if it exists
Extra Distance is the extra distance to target in case of an alternate route. All these variables are normalised by max_distance which is calculated as the total of width and height.
### Agent Conflict Count Matrix
We calculate the conflicts with the agents upto a future number of steps or `max_depth` which is currently set at 30. We only show the first 10 steps for brevity. <br>
We show an example with 7 agents to show the conflict count matrix <br>
<br> We see that agent 0 and 1 are conflicting after step 7 and 8 (We increase the steps by 1 as python indexing starts from 0). Similarly agents 1 and 3 are conflicting after step 9. Note that there maybe more than one pair of agents conflicting in which case the value in each cell can range from 0-6<br>
<br> We further normalise the agent count by dividing with the number of agents <br>