TSPDiffuser: Diffusion Models as Learned Samplers for Traveling Salesperson Path Planning Problems in Obstacle-Rich Environments (ICRA 2025)
![]() |
![]() |
![]() |
This repository presents minimum working examples for the following paper:
Ryo Yonetani, "TSPDiffuser: Diffusion Models as Learned Samplers for Traveling Salesperson Path Planning Problems in Obstacle-Rich Environments", ICRA 2025 [arXiv]
python>=3.10uv
See pyproject.toml for the full list of dependencies. If you wish to reproduce our training and evaluation, please install the minimum version specified for each dependency package along with Python 3.10.
$ git clone [email protected]:CyberAgentAILab/tsppp.git
$ uv sync --frozenWe also provide a Dockerfile for running the code in a container.
$ docker build -f docker/Dockerfile -t tsppp .
$ docker run -it --rm -v $PWD:/workspace tsppp /bin/bashDownload the pre-trained model checkpoints from the following link and extract the contents to the root directory of the repository.
$ wget https://github.com/CyberAgentAILab/tsppp/releases/download/v0.1.0-release/checkpoints.tgz
$ tar -xvzf checkpoints.tgz $ CUDA_VISIBLE_DEVICES= .venv/bin/pytest -v - Download the City Street Map Dataset from the 2D Pathfinding Benchmarks page, place the contents in
data/street-png, and remove files other than*_256.pngfrom the dataset. - Download the Indoor Navigation Dataset from the Indoor Navigation 2D Data Set page, place the contents in
data/adwa_iros2020_benchmark, and removeSister1.pngandSister2.pngfrom the dataset.
We assume evaluation to be done on CPUs. See notebooks/tutorial.ipynb for a more detailed introduction.
$ uv run scripts/evaluate.py solver=prm_default num_instances=1
[...][__main__][INFO] - map_type='standard', num_destinations=10, graph_type='random_1000_r'
[...][__main__][INFO] - result.status=True, pathlen=312.81, time=2.43$ uv run scripts/evaluate.py solver=tspdiffuser_default num_instances=1
[...][__main__][INFO] - map_type='standard', num_destinations=10, graph_type='tspdiffuser_10_5'
[...][__main__][INFO] - result.status=True, pathlen=281.87, time=1.34$ uv run scripts/evaluate.py map_creator=standard solver=prm_gt$ reference_stats=results/standard_010/random_3000_r/stats.txt
$ uv run scripts/evaluate.py map_creator=standard solver=prm_default reference_stats=$reference_stats
$ uv run scripts/evaluate.py map_creator=standard solver=tspdiffuser_default reference_stats=$reference_stats
$ uv run scripts/evaluate.py map_creator=standard solver=cprm_default reference_stats=$reference_statsWe recommend using multi-cpu instances for generating datasets in parallel. It took approximately 7 hours with n1-highcpu-64 instance on Google Cloud Platform.
$ uv run scripts/generate_training_data.pyGPU is required for training. Each training will take approximately 5 days on NVIDIA Tesla T4.
# TSPDiffuser
$ uv run scripts/train_ddpm.py
# Critical PRM
$ uv run scripts/train_cprm.py@inproceedings{yonetani2024tspdiffuser,
author = {Ryo Yonetani},
title = {TSPDiffuser: Diffusion Models as Learned Samplers for Traveling Salesperson Path Planning Problems in Obstacle-Rich Environments},
title={Decentralized learning of generative adversarial networks from non-iid data},
booktitle={Proceedings of the IEEE International Conference on Robotics and Automation (ICRA)},
year={2025}
}


