Snek is my bot submission for the multiplayer snakes tournament organized by nobleans-playerground.
Snek uses principal variation search to search for move sequences that lead to favorable or undesirable game states, and prunes part of the game tree to save computation time. Snek does not have legs, but it does have a custom game board representation optimized for tree-search algorithms.
With the 100 ms/turn average requirement, Snek can search 8-ply, including a max 32-ply deep quiescence search.
This repository is implemented to be a submodule of https://github.com/nobleans-playground/coding-challenge-snakes. See the respective README for instructions.
Some of the unit tests are time-intensive so it's useful to run some in parallel:
pip install pytest-xdist