Halite Home

Tip for faster production


#1

A lot of bots have code that check

if my_site.strength > target.strength:
    # move to capture

I just want to point out that this if statement isn't always necessary and could slow you down. You can capture a cell by simultaneously moving multiple cells onto it from different directions, each may have less strength than the target, but as long as their sum is more, you will capture it.

Here is an example: https://2016.halite.io/game.php?replay=ar1483325780-2990251185.hlt see frame 31, loc 15,11.


#2

I tried incorporating this but somehow the "if-coded' bot beats this bot in both production and territory from start to end. I am not able to understand the reason behind this as your suggestion is very logical.