Minimal implementation of Neural Combinatorial Optimization with Reinforcement Learning
- Install dependencies
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
cd core- Prepare the dataset
- Generate random 2D TSP coordinates of
$$N$$ nodes ($$X$$ ) - Solve for optimal solution, a permutation of
$$N$$ nodes ($$Y$$ )
make prepare- Visualize the generated data
make visualizeTo train the model
make trainTraining data is written to
../data/csv/*.csv: log optimality gap of train/test dataset, train CrossEntropyLoss../data/model/*.pkl: best model by optimality gap of train dataset
To visualize the training progress
make plot_train- Compare with other baselines in inference time on test set of 1k TSP instances
To compare solving capabilities of
Random,
Optimal,
Pretrain,
Sampling,
Active Search
make test
make plot_test



