Nori Bot for Halite

« Back

Example of Halite

sjlee235 is Nori.


Nori is a Halite bot written in C++. Halite was a three-month online bot competition hosted by Two Sigma from November 2016 to February 2017.

It finished the competition as rank 174 out of 1592 bots.

Gameplay

Halite gives each bot 15 seconds to prepare and 1 second to give all moves each turn. The time constraint with the number of possible moves make it implausible to use a recursive algorithm like Nageune. Instead, to find the "best" move for a few hundred blocks in one second, it is easier to look at each block individually.

Nori's algorithm can then be simplified to this: deciding when a block should move and when it should not. It is important to be conservative of when to move blocks, since by moving a block, you lose the production of the block for a turn. For blocks on the border, the answer is easy. Blocks should grow in strength until it can attack one of its neighbors. For blocks near the border, Nori prefers to stay still until it is strong enough to assist an attack. For blocks that are more towards the center, Nori makes it move to the nearest border. Still, it waits for a few turns so that not too much production is lost.

Versions

v6 - Version for the Finals
v5 - Improved default behavior and fixed unintentional same-target attacks
v4 - Fixed unexpected behaviors
v3 - Better early game by checking assists
v2 - Prioritize production in attacks
v1 - Initial release