Skip to content

An attempt to train the battle engine with neural networks

License

Notifications You must be signed in to change notification settings

patrykstefanski/og-nn-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

og-nn-sim

An attempt to train the battle engine with neural networks.

Requirements

  • C++20 compiler (for dataset-gen; currently only Clang manages to compile it)
  • CMake >= 3.12
  • Python >= 3.7
  • Tensorflow 2
  • Pandas

Instructions

Building dataset generator

cmake -S ./dataset-gen -B build -DCMAKE_BUILD_TYPE=Release -DDATASET_GEN_ENABLE_ARCH_NATIVE_OPT=On
cmake --build build

Generating a dataset

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

Training

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

Run battle example

./battle.py

Optimize model

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

About

An attempt to train the battle engine with neural networks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published