- Java JDK (test with
javac) — Java 8+ recommended (Java 17+ preferred). - Python 3.8+ (with standard libraries; no external dependencies required unless your
tester.pyneeds them). - A terminal / command prompt.
project_root/
├── src/
│ ├── Astar.java
│ ├── Backtracking.java
│ ├── tester.py
│ ├── tests_bundleV1.json
│ └── tests_bundleV2.json
├── bin/ # compiled class files will be placed here
│ ├── astar/
│ └── backtracking/
└── analysis/
└── imported/
├── astar_import_summary.txt
└── backtracking_import_summary.txt
Make sure the files listed above are placed inside the
src/folder before building or running.
Open a terminal and change directory to the src/ folder:
cd path/to/project_root/srcCompile the Java implementations (run these commands from inside src/):
# Compile A* implementation and place classes in bin/astar
javac -d bin/astar Astar.java
# Compile Backtracking implementation and place classes in bin/backtracking
javac -d bin/backtracking Backtracking.javajavac -d will create the output directories under bin/ if they do not already exist.
From the same src/ folder, run the tester script to evaluate either algorithm on either test bundle.
python tester.py --suite-in tests_bundleV1.json --algo astar
python tester.py --suite-in tests_bundleV2.json --algo astarpython tester.py --suite-in tests_bundleV1.json --algo backtracking
python tester.py --suite-in tests_bundleV2.json --algo backtrackingReplace
pythonwithpython3if needed by your environment.
After each run, the tester writes a summary file into:
analysis/imported/astar_import_summary.txt
analysis/imported/backtracking_import_summary.txt
Each summary contains aggregated statistics such as:
total— number of test maps processedwins— number of successful runs (path found)losses— number of failed runs (no path found)runtime_mean,runtime_median,runtime_mode,runtime_std— runtime metrics (in seconds)
Just tell me which you prefer.