richardjs / zoe

AI engine for the strategy game Hive
GNU General Public License v3.0
2 stars 0 forks source link

Zoé: Hive AI

Zoé is an engine for playing the game Hive.

Zoé uses a Monte Carlo tree search algorithm with biased simulations across parallel searches.

Playing

This repository includes a prototype UI that provides a bare-bones way to play against Zoé. The easiest way to use it is with Docker. From the repo directory:

docker build -t zoe .
docker run -it -p 8000:8000 zoe

The UI should then be accessible at http://localhost:8000.

At present, the UI is hard-coded to have Zoé play black, and there is no indication that the algorithm is thinking (outside of the networking tab of the developer tools; look for a call to /state/[state]/think).

(UI improvements are on the roadmap! Implementing UHP should also help, as that enables use with MzingaViewer.)

The UI is also hard-coded to run 4 workers with 10K iterations each. This provides a light amount of playing strength with an acceptable move time, but experients have shown playing strength improves steeply through at least 40K iterations, and likely continues to improve with higher iteration and worker counts. This improvement come at the cost of slower move times. See this graph of Glicko ratings vs. iterations for different worker counts:

To adjust the worker and iteration count, edit the constants at the top of src/server.py and rebuild (and restart) the Docker image.

Roadmap

Zoé was created in 2023 by Richard Schneider.