Halite Home

Deciding where to move your pieces


So far I've thought of two generalised ways you can decide how to move your pieces, obviously excluding pieces that need to stay still etc:

For each site that you own:
    - Look at all the surrounding sites in a certain radius.
    - Pick the best site from the surrounding sites (e.g. the best heuristic).
    - Move in the direction of the best site.


For each site that you own:
    - Look at a set of neighbouring sites in each direction.
    - Decide on the best direction (e.g. the average heuristic of the set of neighbouring sites in each direction).
    - Move in the best direction.

Are there any different ways of deciding where pieces should go? I'm still not sure which of the above is the best. My current bot (sub 100) still only uses immediate sites for deciding where to go.


Im rank 110~120 but my code does the reverse :wink:

Get all bordering sites
Get all idle sites you own
Sort the bordering sites on how valuable you think they are
For each bordering site {
    Look if enough strength is adjacent to it to expand now.
    If not, assign the closest idle site with enough strength to start moving here.
    If no idle sites are left with enough strength, break the loop. 


You might want to look at @Sydriax's PerimBot to get some ideas about other ways to move your pieces.

You might also want to look at this forum post from the Ants competition: http://forums.aichallenge.org/viewtopic.php?f=24&t=2010


This is interesting! I think it will really help me! Its good to hear new ideas.


@tmseiler posted a great link in the discord chat.