ry-lu / btd6-ai

AI that can beat BTD6 on CHIMPS with only magic monkeys. Keras neural network + genetic algorithm
MIT License
0 stars 0 forks source link

How program runs #1

Closed Bak2mine closed 7 months ago

Bak2mine commented 7 months ago

Basically i trained and simulated, but when i tried to run the genetic.py i realized i had to download mods. is there any possible way of not having to do that and instead changing it to be interacted with the hotkeys (ex. placing monkeys down and upgrading with hotkeys). Also when I ran genetic.py all it outputted was the file path to python 3.11.

ry-lu commented 7 months ago

The file genetic.py is not meant to be run and is only used to import. Only train.py and simulate.py can be run. The json/building plan created and printed in simulate.py can be used to implement the AI in-game at your discretion, whether it be through mods or hotkeys.

In the video, a BTD6 mod is used to allow quick and easy actions. Map data such as in-game map points and possible monkey placements can be easily retrieved through a mod and communicated to a server to run simulate.py.

It is possible to place the monkeys through hotkeys but adjustments would need to be made to gather the map data to run simulate.py. If you find a way to make hotkeys/keyboard bindings play BTD6 with the simulation results, feel free to fork and contribute to the project!