Final Flashcards
(32 cards)
A tagging system was implemented as part of the obstacle avoidance system. What is the purpose of tagging an obstacle.
1) makes the code more understandable
2) checks to see how close the objects are to an agent, if an agent is within a certain range, it then tags the object. Only the objects tagged will be converted to local space.
3) this ensures only objects that are in danger of colliding with the agent have the more costly trig operations performed on them
True or False
Local coordinates allow the agent to measure the distance to an obstacle.
False
Local coordinates allow you to see if the object is within the agent’s path.
True or False
Untagging an obstacle early in the avoidance system can save valuable clock cycles.
True
How dies the agent know if an obstacle is in front of him or behind him?
If the local X is negative, the obstacle is behind the agent.
What are the local coordinates of the object if its global coordinates are (3,4) and the agents global coordinates are (3,5), with an angle of PI squared?
rotate the graph so that the agent is facing positive x.
place the agent at (0,0). The objects position will be the location relative to the player’s new rotation.
Why should the player’s hit box extend with increased velocity?
So that there is more time for the agent should slow down should an object happen to be in it’s path.
The hit box is rectangular, but our obstacles were circular. How was the collision detection achieved?
When compared in local space: The x axis splits the agent in half, if the radius of the object plus the half width of the agent = less than the local y of the object then there will be a collision
True or False
The DFS algorithm will always find the target node on a connected graph.
True
True or False
The DFS will always find the shortest path to the target node.
False
True or False
The DFS may find the target faster than A*.
True
True or False
The DFS may find the target faster than BFS.
True
True or False
The DFS marks visited nodes with the current node as it searches.
False
Why does the DFS need to keep track of the path it has taken as it searches for the target?
so that it can backtrack if it reaches a dead end.
The DFS requires fewer clock cycles than the other two algorithms. Why is it a poor choice for path finding?
It is VERY rarely the shortest path.
True or False
The BFS always finds the shortest path to the target.
True
True or False
The BFS may find the target before DFS.
True
True or False
The BFS can find the target even if there are some walls on the map in between the root and the target.
True
True or False
The BFS is always faster than A*.
False
True or False
The BFS uses a queue to keep track of the nodes as it searches.
True
DFS uses a stack
Describe the pattern formed by the BFS as it searches for the target on a grid like map.
like a spider web
Why does the BFS mark the nodes with a visitor?
(visitor == predecessor == parent)
to keep track of the path to the start node.
Explain why A* is superior to the BFS for path finding on a large map.
The A* algorithm does not search the entire map, as BFS is prone to do.
Explain the purpose of an open list.
List of candidates for the next current node.
Explain the purpose of the closed list.
List of nodes you are done with.