Changes between Version 5 and Version 6 of doc/tec/mas/agent_pathfinding
- Timestamp:
- Feb 26, 2021 3:46:44 PM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
doc/tec/mas/agent_pathfinding
v5 v6 6 6 7 7 {{{#!td style="vertical-align:top; text-align:left" 8 During the simulation each agent receives target coordinates (see [wiki:/doc/app/ag tpar#at_x at_x] and [wiki:/doc/app/agtpar#at_y at_y]). Each agent must then find a path from its current position to its target using the visibility graph. This is accomplished using the '''A^*^-algorithm''' which is a well-known fast pathfinding algorithm (click [http://theory.stanford.edu/~amitp/GameProgramming/ here] for a thorough explanation). For this, \\8 During the simulation each agent receives target coordinates (see [wiki:/doc/app/agent_parameters#at_x at_x] and [wiki:/doc/app/agent_parameters#at_y at_y]). Each agent must then find a path from its current position to its target using the visibility graph. This is accomplished using the '''A^*^-algorithm''' which is a well-known fast pathfinding algorithm (click [http://theory.stanford.edu/~amitp/GameProgramming/ here] for a thorough explanation). For this, \\ 9 9 * the agent's current position and its target are added to the **[../agent_preprocessing visibility graph]**, \\\\ 10 10 * the shortest path between these two points is calculated using A^*^, \\\\ 11 * the navigation points are shifted outward from the obstacle corner to a random position along a "gate" (see [wiki:/doc/app/ag tpar#corner_gate_start corner_gate_start] and [wiki:/doc/app/agtpar#corner_gate_width corner_gate_width]) to avoid collisions with obstacles or other agents,\\\\11 * the navigation points are shifted outward from the obstacle corner to a random position along a "gate" (see [wiki:/doc/app/agent_parameters#corner_gate_start corner_gate_start] and [wiki:/doc/app/agent_parameters#corner_gate_width corner_gate_width]) to avoid collisions with obstacles or other agents,\\\\ 12 12 * pathfinding is run again with each successive pair of navigation points along the path to avoid intersection of path sections with obstacles resulting from the outward shift,\\\\ 13 13 * finally, the resulting path is stored in the agent object as a series of intermittent targets.\\ 14 Each agent calculates the direction toward its next intermittent target during each agent time step. It will accelerate toward those coordinates. Once the agent has come close enough ([wiki:/doc/app/ag tpar#dist_to_int_target dist_to_int_target]) to them, the next intermittent target is chosen. When the final target is reached, the agent is deleted.\\\\14 Each agent calculates the direction toward its next intermittent target during each agent time step. It will accelerate toward those coordinates. Once the agent has come close enough ([wiki:/doc/app/agent_parameters#dist_to_int_target dist_to_int_target]) to them, the next intermittent target is chosen. When the final target is reached, the agent is deleted.\\\\ 15 15 '''Recalculation''' of an agent's path occurs when\\ 16 * the agent has deviated too far ([wiki:/doc/app/ag tpar#max_dist_from_path max_dist_from_path]) from its current path or16 * the agent has deviated too far ([wiki:/doc/app/agent_parameters#max_dist_from_path max_dist_from_path]) from its current path or 17 17 * the path counter has reached its maximum and the target is not yet reached. This can occur because for the purpose of conservation of memory each agent can store a maximum of 15 intermittent targets. 18 18 }}}