Josh Bertram
Pursuit-Evasion
This project and associated program attempts to solve a limited pursuit-evasion problem. The general pursuit-evasion problem describes situations in which one set of agents, the pursuer, attempts to find and identify another set of agents, the evader.
Project Focus
This project is limited to a single agent as the pursuer and no limit on the number of evaders. The world/environment is a 2D (R-squared) environment and consists of a polygonal border with no obstacles; any problem with an obstacle cannot be solved by a single pursuer. In this project, the pursuer can obtain only limited information about the environment; namely, the pursuer only has the position of "gaps" in it's environment. A gap is a discontinuity in the data that the pursuer recieves about it's environment. As the pursuer's sensor sweeps over the walls of it's environment, any opening in the boundary will cause a discontinuity in the distance measurements that the pursuer is calculating. The figure below shows an environment in which the pursuer sees two gaps; the yellow area is the portion of the world that the robot can see, and the gray areas are the portions of the world that are hidden from the robot's view.

Example Problem
Given the scenario above, if the robot were to move up, the gap on the top would eventually disappear. If the robot were to then go back to it's original position, the hidden area that originally may have contained an evader will definitely not contain an evader now. The original gray area is considered dirty because an evader may have been hiding there. The new white region is considered clean because an evader definitely is not hiding there.


Gaps In Depth
Each gap contains the following information:
As the robot moves around the environment, several critical events can happen. As we've already seen, a gap can disappear or appear. Additionally, it is possible for one gap to split into two and for two gaps to merge into one. The following pictures illustrate these critical events:
Merge/split critical events:

Appear/disappear critical events:

Note that appear/disappear critical events correspond to "inflections" of the boundary and merge/split critical events correspond to "bitangents" of the boundary. See [1] for a complete explanation.
Critical events are dependant upon the geometry of the environment. The following example shows all of the merge/split edges in green and the appear/disappear edges in red for the environment:

It is possible to determine when any of these four critical events happen. For the split and appear cases, the number of gaps will increase by one. For the merge and disappaer cases, the number of gaps will decrease by one. Merges and splits always involve two gaps that are near each other, while appears and disappears involve only one gap. The following table summarizes this information:
Algorithm Components
The implementation consists of several different components. The major components are shown below:

The Sensors detect the gaps. The Robot uses this information to determine the state of the robot in the world and also to navigate. One the appropriate action has been determined, the Robot sends commands to the Actuator, which moves the robot around as ordered. The world is simply the polygonal border. The sensor module is implemented more or less as described in [1], with the addition of code to compute the direction of the hidden area relative to the gap. The actuator, in this example, simply moves the point robot to a new point. The Robot itself is composed of several different modules:

The Current State Generator generates the current information state. An information state is an list of gap states sorted by the angle in radians of each corresponding gap. For instance, in the first example given at the beginning of this document, the state of the robot would indicate that there are two gaps and that both gaps are dirty. After the robot crosses the disappear/appear boundary and then returns to it's original position, the new state would indicate that there are two gaps and that one if dirty and one is clean. The Last State Memory stores the last state. The State Transition Generator is called when the current state differs from the last state; it is this modules responsibility to determing what kind of critical event caused the state transition. The State Transition Memory would keep a record of any state transitions; this module is not implemented in this version of the program, but will eventually be in a later version. Without the state transition memory, the program's capabilities are limited; however, it is still powerful enough to solve many of the simpler programs. The method implmented in this project should be able to solve any problem that does not require the robot to cross a "bad edge".
A bad edge is an abstract principle that first requires explanation of the information state space. The information state space is simply the space of all the states that the robot can have in the world. For the first example given above, the information state can change by crossing either of the two disappear/appear boundaries that bound the region that the robot is initially placed in. If states are represented as nodes of a graph, then the edges of the graph are these transitions--these crossing of critical boundaries. Certain types of transitions are better than others. For example, an appear event is obviously better than the split of a dirty gap; the reason is that the appear generates an additional clean gap and that the split generates an additional dirty gap. Remember that the robot's goal is to eliminate dirty gaps and be left with only clean gaps. Most transitions either add to the information the robot posesses or in effect do nothing. Only one type of transition actually causes the robot to lose information; if the robot moves such that a dirty gap merges with a clean gap, the clean gap is contaminated by the dirty gap, yielding one dirty gap. This type of a transition is called a "gray merge" because a dirty (black) node is mixing with a clean (white) node. Some gray merges are recoverable and some gray merges cause irrecoverable damage, meaning that work that has already been done must be repeated. If a gray merge is operating on a gap that was created by an appear transition in the previous state, then the information the robot is losing can be recovered by simply recrossing both the merge/split boundary that was just crossed and the appear/disappear boundary that was crossed in the previous state, and then recrossing the appear/disappear boundary. At this point, the state is exactly equivalent to what it was before the gray merge. Therefore, this type of gray merge can be ignored. However, any other type of gray merge will result in a true loss of information that will cause work to be redone. This type of transition is named a "bad edge". Returning to the last thought of the previous paragraph, let us restate that this method will solve any problem that does not reqire the robot to cross a bad edge.
Algorithm analysis
The algorithm used in for the planning is proportional to the number of gaps in a state, which is usually very small for normal environments. The algorithm used to calculate the gaps given the robot's current position is quadratically proportional to the number of segments in the polygonal border. The move portion of the algorithm can be done in constant time, in simulation. Overall, to solve these limited problems, the time to solve these problems is dependant on the number of regions defined by the appear/disappear/merge/split transitions, which are in turn dependant upon the geometry of the problem.
References
The examples shown below were generated by the program. Only example one truly solved the problem because, at some point, all of the gaps disappear. The program is able to detect when a gap appears, and it assigns that gap a clean state. However, on subsequent frames, it is plain that the state information is not being transfered correctly. Consequently, the program generates the correct path to a solution with examples two and three, but is not aware that it solved the problem. Note that the program is trapped in an infinite loop in examples four and five. The cause is, at this point, unknown, but it is suspected that it is a byproduct of the method of ordering of gaps and of unsucessfully determining the correct state transition. Unfortunately, there was not enough time to look into this issue completely.
This implementation is built upon the implementation created by [1]. This implementation consisted, mainly, of minor modifications to the structure of the original program and the addition of a class that implements the algorithm described above. The program uses the LEDA library to produce the graphics and to work with the geometry of the problem.
Source Code: