Practical overview
When it fits
Use it for research experiments with the included sorting or planar symmetric Euclidean TSP tasks, or as a code example for extending pointer-network solution selection to another task.
Who it is for
- Researchers studying reinforcement-learning approaches to combinatorial optimization.
- Developers seeking a pointer-network baseline for sorting or planar symmetric Euclidean TSP experiments.
- Readers inspecting attention in an evaluated saved model.
Documented uses
- Train a pointer network to construct tours for planar symmetric Euclidean TSP instances.
- Use the sorting task as a reinforcement-learning baseline.
- Load a saved model for testing and plot its pointer-network attention.
- Prototype a new combinatorial task by adding a dataset class and scalar reward function.
Requirements & limits
The implementation is available as a public GitHub repository under the MIT license.
- The included task scope is sorting and planar symmetric Euclidean TSP.
- Beam search is unfinished and currently supports only one beam, equivalent to greedy decoding.
- The README lists Python 3.6, PyTorch 0.2 or 0.3, tqdm, matplotlib, and tensorboard_logger; it notes a separate PyTorch 0.4 compatibility branch.
- The repository describes adding another task through a dataset class and scalar reward function, but does not include implementations for other tasks.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Load a saved model and plot pointer-network attention
Load a saved model for evaluation and request an attention-layer plot.
Before you start
- The repository code and its documented dependencies: Python 3.6 (the README says versions from 3.4 may work), PyTorch 0.2 or 0.3, tqdm, matplotlib, and tensorboard_logger.
- A saved model and its path.
Steps
Use the repository's documented
main.shas the example for running the code.Pass
--load_pathwith the saved model path and set--is_train False.Also set
--plot_attention Trueto request a plot of the pointer network's attention layer.
Expected outcome
The implementation is configured to load the saved model for testing and plot its attention layer.
Guide limitations
- The README documents these arguments but does not provide a complete invocation or guarantee a successful run.
- Test-time decoding is greedy; multi-beam search is unfinished.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- pemami4911/neural-combinatorial-rl-pytorch · Official homepage title · retained in its source language

