An attempt to train the battle engine with neural networks.
- C++20 compiler (for dataset-gen; currently only Clang manages to compile it)
- CMake >= 3.12
- Python >= 3.7
- Tensorflow 2
- Pandas
cmake -S ./dataset-gen -B build -DCMAKE_BUILD_TYPE=Release -DDATASET_GEN_ENABLE_ARCH_NATIVE_OPT=On
cmake --build build
This will generate a dataset and save it into dataset file.
./build/dataset-gen --dataset-size 1000000 --max-ships 10 --out dataset
Check also ./build/dataset-gen --help
Now, you can train the network on the generated dataset. This will save the trained model info model directory and the normalization scales into scales file.
./train.py
./battle.py
Optionally, you can try to find a better number of layers or units in the model for your dataset:
tensorboard --logdir logs &
./optimize-model.py