Skip to content
aerique edited this page Mar 16, 2011 · 6 revisions
  • Maps are a grid.
  • There's land and water.
  • Food can only spawn on land.
  • Don't spawn on top of existing food or ants.
  • Don't bias spawning away from or close to anything.
  • Attempt to make it fair, especially at the beginning.

Asymmetric Spawning

Method 1 - Random

Pick 1 land spot at random each turn.

  • Pros: Fast, Already Done
  • Cons: Totally Unfair

aerique: This has the (funny?) potential of causing chain reactions if there are multiple food tiles within spawn distance of eachother. Once an ant is close enough to one of the food tiles new ants will be spawned over the following turns. I'm afraid that if we have only maps with random food placement the game will devolve into a race for the food clumps. Example:
I just heard on IRC that possibly only one food tile per turn will be spawned. If so, this point is moot.

. . . . . . . .       . . . . . . . .       . . . . . . . .
. a . . . . . .       . a . . . . . .       . a . . . . . .
. . . . . . . .  ==>  . . . . . . . .  ==>  . . . . . . . .  etc.
. * . * . * . *       . a . a . * . *       . a . a . a . *
. * * . * . * .       . * * . * . * .       . a a . a . * .

Method 2 - Offset

Pick a cow/row offset each turn. Calculate this offset for each bots starting location and place food there. If the spot is not land, find the closest land to that spot and place the food there.

  • Pros: Probably fair
  • Cons: ?

Method 3 - Sections

Split the map into sections that each ant can access first at the start of the game. Place 1 food in each space at random each turn.

  • Pros: Probably fair
  • Cons: ?

Symmetric Spawning

Method 1 - antimatroids method (requires no two players start in the same row or column)

Find the starting location of two players, loc1 and loc2, then calculate [r/c]translate = abs(loc1.[row/col]-loc2.[row/col]). When placing a food square, pick a location, then also place a food square in each of the locations you get when translating your location by [r/c]translate as many times as there are players.

Issue's pop up when only some of the squares that have been picked are already filled with food or even ants, I'll let a discussion happen on that..

  • Pros: Probably fair
  • Cons: ?
Clone this wiki locally