Navigation


GPPC
Home

Register for 2015 Competition


Classic Track CFP

Software - Classic Track


Competition Results


Important Links
Grid-Based Pathfinding Benchmark Problems
2012 GPPC Entries
2013 GPPC Entries


Related Conferences
SoCS



GPPC: Grid-Based Path Planning Competition

GPPC Classic Track Sample Code

Sample code last updated: May 3, 2012

Sample code that is similar to what will run in the compeititon, with a very simple pathfinding implementation is available for download.

It contains the following files:

The API requires the following calls:
void PreprocessMap(std::vector &bits,
                   int width, int height, const char *filename);
void *PrepareForSearch(std::vector &bits,
                       int width, int height, const char *filename);
bool GetPath(void *data, xyLoc s, xyLoc g,
             std::vector &path);
const char *GetName();
In PreprocessMap your program is provided the map and can do any necessary processing. The results of this processing should be saved in the file name provided. Attempts to read or write from any other file will be grounds for disqualification.

In PrepareForSearch your program is provided the map again along with the file name where it can load data for this map. The program can return a (void *) reference to any data that it wants to be passed when GetPath is called.

GetPath is called with a start and goal location, and the path is incrementally added to the end of the path vector. GetPath should return true if the path is complete. GetPath will be called repeatedly with the same arguments until true is returned.