How does claiming work if a bot's territory is split?

Heyo, I’m starting to play around with the engine, and I’m hoping to get some clarification on how claiming is handled if a bot’s territory is split into two or more “blobs”. What happens if the trail starts in one, and ends in the other? I’ve read through the engine code, but it’s not entirely clear to me what’s supposed to happen. It looks like this is the block that handles it:

Do the two territories just get combined without pruning encircled bots by making a “bridge” between the two with the trail?

PS I couldn’t post in the “Technical support” board (was blocked from doing so), so I posted here

Id say, Split territory should invalidate claims,

I should not be able to use a stray territory tile to complete a grab,

The engine should batch tiles into “Islands” and only give a claim if the start and end of the movement belongs to the same island.

Thats my take on things,

Yes, if a bot has two disjoint territories and connects a trail from one to the other, the trail effectively gets converted to claimed territory and acts as a “bridge” so to speak between the two territories.

If another trail is now completed between the two territories, they are no longer two disjoint territories, but one, and so the completion of the second trail will result in the enclosed space also being claimed for the bot’s territory.

For instance, starting condition:
image

After Bot A moves up one cell:
image

After Bot A almost completed a second trail:
image

After Bot A moves down one cell:
image

6 Likes

@deefstes just a heads up, I created an issue on GH related to my question above:

Thanks @kobus-v-schoor , I’ll have a look at that :pray: