Herd Behaviour of top bots


#1

Looking at @teccles games, I see the ships moving individually until about 15 ships are available, then suddenly they start moving in herds, which seems optimal for battles and maximising taking vs giving inspiration.

Does anyone have any programming strategies for something like this?

In this game its really obvious starting from turn #120 when 90% of his ships head out together to challenge the opponent.


#2

What I believe the top bots do is figure out the squares that their ships can be inspired and mark those positions as double halite or something along the lines of that. However from what I’ve seen they also try to minimize other ships there inspired while maximizing there inspired ships.

not sure if im correct at all but that how I vew there movements


#3

I think there are many ways to do this, and it depends on how you modeled your AI.

I think the easiest way to implement “natural herding” is to implement the concept of “forecasting” a dropoff (i.e. pretend a dropoff exists somewhere before you have constructed it). This is what I have been doing.

In your current AI, let’s say you’ve implemented a tile scorer - so the tiles that have the highest halite, in the densest region of halite, and that are closest to your dropoff have the highest scores. You can see that the moment you place a dropoff in a region that is dense with halite, all the tiles in that region increase their scores significantly; they are now close to a dropoff so their scores increase a lot.

So it is quite simple then, first modify your scoring function to accept a collection of Dropoff locations as input. Then your tile scorer should score tiles in relation to the dropoffs passed in.

After you decide where you want to put a dropoff, you can score all the tiles as if the dropoff already exists (before it is constructed). Your ships will just naturally cluster towards that forecasted dropoff location since all the tiles in that region will have high scores now. Once the first ship reaches where you want your dropoff to be, just construct one.

This is essentially a way to herd your ship towards good objectives that fits in the framework of your AI without doing too much additional work.


#4

^This is exactly the explanation for my herding behaviour in the replay in the OP. Much better than I could have put it.


#5

Great explanation, I was toying around with preemptive dropoffs, will try to get them to work again, was working with the scoring function just like the way you described. For other players after the dropoffs are out there it still seems there are some herds of ships especially in inspirations zones. Probably emergent behaviour as you describe. I did see in a teccles game, he had a 1000 halite ship crash into an opponent 1000 halite ship, on a 800 point, then have another 1000 halite ship move in, then was able to create a dropoff with only something like 400 halite in reserve! amazing strategy.