Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Warthog is an optimised C++ library for pathfinding search.
Warthog-JPS is an extension to Warthog with JPS support.
See [warthog-core](https://github.com/ShortestPathLab/warthog-core) for more details on Warthog setup.

If you find this work useful, please cite our paper as follows:

@article{Harabor_Grastien_2014,
title={Improving Jump Point Search},
volume={24},
Expand All @@ -26,11 +28,13 @@ Simply run the following code below:
```
cmake -DCMAKE_BUILD_TYPE=Release -B build
cmake --build build
./build/warthog-jps --alg jps --scen example.scen
./build/warthog-jps --alg jps --scen example/arena2.map.scen
```

The example scenario `example.scen` is not a part of this repo.
Get benchmark from places like MovingAI or pathfinding.ai found in the resource section.
The example map is from the MovingAI benchmarks under Dragon Age Origins.
Use the `build.sh` or `run.sh` for quick compile/usage of this scenario.

For more evaluation data, please refer to existing benchmarks from the community, which offer a range of different challenges across a variety of maps/domains; links found in the resource section.

JPS requires `warthog-core` repo to compile, and by default will fetch the repo.

Expand All @@ -39,6 +43,13 @@ JPS requires `warthog-core` repo to compile, and by default will fetch the repo.
JPS comes with several variants.
All variants use block-based symmetry breaking for finding jump-point locations,
making them at least JPS (B).
The list is as follows:

- `jps` JPS (B) like original with block-based symmetry
- `jpsP` or `jps2` JPS (B+P) with intercardinal pruning
- `jps+` JPS+ (B) is original with offline jump points
- `jpsP+` or `jps2+` JPS+ (B+P) offline with pruning

These jump points are found in namespace `jps::jump`, while `jps::search` uses provided `jps::jump` locators
to produce successors used in warthog-core.

Expand Down
213 changes: 213 additions & 0 deletions example/arena2.map

Large diffs are not rendered by default.

911 changes: 911 additions & 0 deletions example/arena2.map.scen

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions example/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

SRC_DIR=$(dirname -- "${BASH_SOURCE[0]}")
cmake -B "$SRC_DIR/build" -S "$SRC_DIR/.."
cmake --build "$SRC_DIR/build"
19 changes: 19 additions & 0 deletions example/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

SRC_DIR=$(dirname -- "${BASH_SOURCE[0]}")

if [ $# -gt 0 ]; then
ALG="$1"
else
ALG="jpsP"
fi

if [ $# -gt 1 ]; then
SCEN="$2"
else
SCEN="$SRC_DIR/arena2.map.scen"
fi

# command

"$SRC_DIR/build/warthog-jps" --alg "$ALG" --scen "$SCEN" --checkopt
2 changes: 1 addition & 1 deletion include/jps/jump/block_online.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// The BasicIntercardinalWalker is a non-templated version of
// IntercardinalWalker.
//
// @author Ryan Hechenberger
// @author dharabor & Ryan Hechenberger
// @created 2025-11-20
//

Expand Down
2 changes: 1 addition & 1 deletion include/jps/jump/jump_point_offline.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// The table will precompute the jump-point distances from an online locator
// and store them into a jump_point_table.
//
// @author Ryan Hechenberger
// @author dharabor & Ryan Hechenberger
// @created 2025-11-20
//

Expand Down
2 changes: 1 addition & 1 deletion include/jps/jump/jump_point_online.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// The table will precompute the jump-point distances from an online locator
// and store them into a jump_point_table.
//
// @author Ryan Hechenberger
// @author dharabor & Ryan Hechenberger
// @created 2025-11-20
//

Expand Down