Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


A bot to play Halite 3, an AI competition hosted by Two Sigma at It ended up reaching 23rd global, out of 4000 participants.

Included are a couple batch files (compile.bat and run.bat, which uses I used during the competition to quickly test my bot. They are configured for my environment specifically, but it shouldn't be too difficult to modify them.

The code

The main bot is, which simply loops over the turns and the ships and asks other files (mainly Strategy) what to do.

The most interesting code is going to be found in /dhallstr/ where I have files such as:

  • which is the backbone of my bot
  • which handles the modified BFS search my bot uses for pathing/mining
  • which handles magic numbers for all the other files to use
  • which uses a 3D array like-structure (except the third dimension is a ParallelSlidingList which is just like an array except that it is designed to work well with holding things relative to time because every turn, elements "slide" down one index. This is done O(1), don't worry)
  • which tells Navigation where is best when mining
  • which, of course, tells Navigation where is best when delivering halite

Files in /hlt/ were more or less provided in the Halite 3 Java starter kit; however, I made major modifications to many of them. Nothing too fancy is going on in here though.

You can’t perform that action at this time.