Skip to content

DownD/AnyAnglePathPlaning

Repository files navigation

Any Angle path planing

This code is not mine, i just changed to make it compilable on windows, and be possible to generate a a static library for implementation in other projects.
Original sources can be found in http://idm-lab.org/project-o.html and https://www.movingai.com/benchmarks/grids.html

This code was developed by Tansel Uras (turas@usc.edu) at USC.
The code is hosted at 'http://idm-lab.org/anyangle'.
SoCS paper:
T. Uras and S. Koenig, 2015. An Empirical Comparison of Any-Angle Path-Planning Algorithms. In: Proceedings of the 8th Annual Symposium on Combinatorial Search. Code available at: http://idm-lab.org/anyangle

For the benchmarks, visit: 'http://www.movingai.com/benchmarks/'. This package contains sample .map and .map.scen files.

Compilation:

Using the command 'make all', will generate 13 executables, (A*-Euc, A*-Oct, Theta*, Lazy Theta*, Field A*, Block A*, ANYA and six variants of Subgoal Graphs) and run them on the map 'arena2', with its associated scenario file (you can modify the makefile to prevent this, or change the map).
Using windows, just compile using Visual Studio 2019.

Running:

To run one of the executables, use the command './executable mapname', where 'executable' should be your executable's name and 'mapname' should refer to the map/scen files you want to use. For instance, to use 'arena2.map' and 'arena2.map.scen' using Block A*, the command should be './EXP_B arena2'. This will produce an output file 'B-Arena2', containing statistics. The prefixes for different algorithms are 'A_OCT' (A* with the Octile distance heuristic), 'B' (Block A*), 'T' (Theta*), 'L' (Lazy Theta*), F (Field A*), ANYA and, for subgoal graphs, 'S_X_A' and 'S_X_T' for A* and Theta* variants, respectively, where X denotes the graph level (10000 for N-Level Subgoal Graphs). Adding '_PS' to the prefix gives statistics with post-smoothing of paths.

Running the benchmarks with 'experiment.pl':

Put all maps (of a certain type, for instance, maps with 10% blocked cells) and their associated scenario files in a folder, along with the executables and 'experiment.pl'. By using the command 'perl experiment.pl', all algorithms will be run for all the maps in the folder, and their statistics files will be placed in a subfolder 'AnyAngle'.

Extracting results with 'analyze.pl':

Create a folder that contains 'analyze.pl' and subfolders 'bg512, DAO, ...' (the elements in the '@experiments' array in 'analyze.pl'). In each subfolder, put the relevant statistics files generated by the algorithms. Using the command 'perl analyze.pl' will create a file called 'results.txt' that contains a table where each row corresponds to a map type. The first column in each row gives the name for the map type, the second column gives the total number of instances in that map, and the rest of the columns give the total time spent by each algorithm (in the order they appear in the '@algorithms' array in 'analyze.pl') on all the instances of these maps. Dividing each value by the number of instances gives the average solution time. For extracting different metrics, you can modify the 'getMapRow' subroutine in 'analyze.pl', by uncommenting a line in a foreach loop. Make sure that exactly one of the foreach loops contains an uncommented line in its body. Loops that iterate over '@algorithms' and '@ps_algorithms' gives results that exclude and include post-smoothing, respectively.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published