AllYourTurtles bot for Halite III
Was able to make it into the top 10 with this.
Overview
- Precompute a bunch of stuff
- Compute halite/turn for every ship position pair
- Spawn a ship if we are behind opponent in # of ships produced or it would give us positive return
- Greedily assign ships to positions
- once a ship is assigned, reduce the halite/turn of any other assignments to the same position accordingly
- Plan dropoffs just based on halite around them, proximity to other dropoffs, and number of ships going there
- Plan ships using WHCA* (windowed hierarchical cooperative A* - basically just A* with a time window where reservations matter)
The comments in the code have more details.
Code
Everything is in MyBot.py :X It's commented though, and (at least I think) fairly clean.
Entrypoint: main()
Classes:
Notable functions: