Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

Lions and bears are extinct, the wolves dominate the fauna on land. But in the depths of the sea the battle for survival rages on.

Lions and bears are extinct, the wolves dominate the fauna on land. But in the depths of the sea the battle for survival rages on.

Mod Removes Wiki by Martin EnderMod
Post Made Community Wiki by Martin EnderMod
Post Merged (destination) from meta.codegolf.stackexchange.com/questions/1847/…
added 53 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311

The game is carried out on a three-dimensional grid: +x points East, +y points North, +z points up. There will be 20*√n cells along x and y, where n is the number of participants. The height will always be 21 cells. There are five regions: three are the species' breeding grounds, and two are just non-special regions in between. The 21 layers are distributed as follows:

The game is carried out on a three-dimensional grid. There will be 20*√n cells along x and y, where n is the number of participants. The height will always be 21 cells. There are five regions: three are the species' breeding grounds, and two are just non-special regions in between. The 21 layers are distributed as follows:

The game is carried out on a three-dimensional grid: +x points East, +y points North, +z points up. There will be 20*√n cells along x and y, where n is the number of participants. The height will always be 21 cells. There are five regions: three are the species' breeding grounds, and two are just non-special regions in between. The 21 layers are distributed as follows:

added 744 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311

Every turn, each bot makes a move and performs an action.can do one of two things:

  • Move: The move can be one cell in any orthogonal or diagonal direction (as well as staying in the same cell, which technically shouldn't be called a "move"). Moves off the board (above the top or below the bottom layer) are ignored.

  • Breed: Each animal starts with a breeding counter at 100 which is decremented every time step if it's greater than 0. If the counter is zero and the animal is in its species' breeding ground, there is a 10% chance that a new animal will spawn on a random (orthogonally or diagonally) adjacent cell - this new animal will simply be a new instance of your bot. If this happens, the breeding counter is reset to 10.

The move can be one cell in any orthogonal or diagonal direction as well as staying in the same cell. If two or more animals or hazards move to the same cell they fight until only one of them remains.

The possible actions If more than two animals (or hazards) move the same cell, two of them are picked randomly for a fight until there is only one survivor left. For details on fighting see below.

  • Rock, Paper, Scissors: In the case of a fight, these are your attacks. The normal RPS rules apply. Ties are broken pseudorandomly.
  • Breed: If the animal's age is at least 100 and you don't move and the animal is in its species' breeding ground, there is a 10% chance that a new animal will spawn on a random adjacent cell. In the case of a fight, you will die (even if your opponent also chooses Breed).

Your animal will be provided with the arena size, a 3x3x3 map showing its immediate surroundings, its age (in turns)breeding counter and its global z coordinate.

The winner will be bot with the most specimen (instances) surviving after 1000 rounds.

  • Whales (W) start with 10% more specimen.
  • Sharks (S) can make an additional moveMove before their move-action pairregular action. They will receive their updated surroundings after the first move. The first move must be made into an empty cell or it will be ignored.
  • Squid (Q) can see further and are provided with a 5x5x5 map of their surroundings.

They constantly move in the +y direction. About half of the nets will point and move in the opposite direction. They are indestructible, and any animal landing in the same cell as a net will die.

Jellyfish (J) are found in the sharks' breeding grounds. If there's a jellyfish adjacent to another animal, that animal cannot move. Jellyfish choose uniformly randomly from Paper and Scissors(unless that animal is also a Jellyfish). If there are any player animalsJellyfish move in the adjacent cells,alternating pattern such that it always stays in the jellyfish will move randomly towards onecentral 3 layers of themthe sharks' breeding grounds: twice down, twice up. If no player animalsanimal is around, each Jellyfish moves in the following pattern: 2 turnsthey will move straight down and in a random diagonal upwards direction; 2 turns straight down (such that its effect always remains withinpossibly diagonal) direction up. If there is an animal in one of the shark layer9 cells in the current direction, the jellyfish will move to that cell (or if multiple cells are occupied will pick a random one of these).

Mantis shrimp (M) are only found on the ground (lowest z coordinate of the squid layer). Each turn there is a 10% chance that the shrimp will cause a cavitation bubble, which will blind all animals within a radius of 4 (Chessboard distance) for the next turn. Shrimp always attack with Scissors. They walk randomly but all in unison (don't ask me how they do it).

The Fights

Each fight is basically a non-uniform coin flip for who survives with the following probabilities:

  • If a bot picked Breed it always dies.
  • Nets are indestructible and hence always survive.
  • Jellyfish and Mantis shrimp will survive with a probability of 1/3.
  • If two bots fight, the odds are 50:50; except if one of the participants is in their own breeding grounds, in which case their chance of survival drops to 1/3 (because animals are unalert in their breeding grounds and that totally makes sense).

Every turn, each bot makes a move and performs an action.

The move can be one cell in any orthogonal or diagonal direction as well as staying in the same cell. If two or more animals or hazards move to the same cell they fight until only one of them remains.

The possible actions are

  • Rock, Paper, Scissors: In the case of a fight, these are your attacks. The normal RPS rules apply. Ties are broken pseudorandomly.
  • Breed: If the animal's age is at least 100 and you don't move and the animal is in its species' breeding ground, there is a 10% chance that a new animal will spawn on a random adjacent cell. In the case of a fight, you will die (even if your opponent also chooses Breed).

Your animal will be provided with the arena size, a 3x3x3 map showing its immediate surroundings, its age (in turns) and its global z coordinate.

The winner will be bot with the most specimen surviving after 1000 rounds.

  • Whales (W) start with 10% more specimen.
  • Sharks (S) can make an additional move before their move-action pair. They will receive their updated surroundings after the first move. The first move must be made into an empty cell or it will be ignored.
  • Squid (Q) can see further and are provided with a 5x5x5 map of their surroundings.

They constantly move in the +y direction. About half of the nets will point and move in the opposite direction. They are indestructible, and any animal landing in the same cell as a net will die.

Jellyfish (J) are found in the sharks' breeding grounds. If there's a jellyfish adjacent to another animal, that animal cannot move. Jellyfish choose uniformly randomly from Paper and Scissors. If there are any player animals in the adjacent cells, the jellyfish will move randomly towards one of them. If no player animals is around, each Jellyfish moves in the following pattern: 2 turns in a random diagonal upwards direction; 2 turns straight down (such that its effect always remains within the shark layer).

Mantis shrimp (M) are only found on the ground (lowest z coordinate of the squid layer). Each turn there is a 10% chance that the shrimp will cause a cavitation bubble, which will blind all animals within a radius of 4 (Chessboard distance) for the next turn. Shrimp always attack with Scissors. They walk randomly but all in unison (don't ask me how they do it).

Every turn, each bot can do one of two things:

  • Move: The move can be one cell in any orthogonal or diagonal direction (as well as staying in the same cell, which technically shouldn't be called a "move"). Moves off the board (above the top or below the bottom layer) are ignored.

  • Breed: Each animal starts with a breeding counter at 100 which is decremented every time step if it's greater than 0. If the counter is zero and the animal is in its species' breeding ground, there is a 10% chance that a new animal will spawn on a random (orthogonally or diagonally) adjacent cell - this new animal will simply be a new instance of your bot. If this happens, the breeding counter is reset to 10.

If two animals or hazards move to the same cell they fight until only one of them remains. If more than two animals (or hazards) move the same cell, two of them are picked randomly for a fight until there is only one survivor left. For details on fighting see below.

Your animal will be provided with the arena size, a 3x3x3 map showing its immediate surroundings, its breeding counter and its global z coordinate.

The winner will be bot with the most specimen (instances) surviving after 1000 rounds.

  • Whales (W) start with 10% more specimen.
  • Sharks (S) can make an additional Move before their regular action. They will receive their updated surroundings after the first move. The first move must be made into an empty cell or it will be ignored.
  • Squid (Q) can see further and are provided with a 5x5x5 map of their surroundings.

They constantly move in the +y direction. About half of the nets will point and move in the opposite direction.

Jellyfish (J) are found in the sharks' breeding grounds. If there's a jellyfish adjacent to another animal, that animal cannot move (unless that animal is also a Jellyfish). Jellyfish move in alternating pattern such that it always stays in the central 3 layers of the sharks' breeding grounds: twice down, twice up. If no animal is around, they will move straight down and in a random (possibly diagonal) direction up. If there is an animal in one of the 9 cells in the current direction, the jellyfish will move to that cell (or if multiple cells are occupied will pick a random one of these).

Mantis shrimp (M) are only found on the ground (lowest z coordinate of the squid layer). Each turn there is a 10% chance that the shrimp will cause a cavitation bubble, which will blind all animals within a radius of 4 (Chessboard distance) for the next turn. They walk randomly but all in unison (don't ask me how they do it).

The Fights

Each fight is basically a non-uniform coin flip for who survives with the following probabilities:

  • If a bot picked Breed it always dies.
  • Nets are indestructible and hence always survive.
  • Jellyfish and Mantis shrimp will survive with a probability of 1/3.
  • If two bots fight, the odds are 50:50; except if one of the participants is in their own breeding grounds, in which case their chance of survival drops to 1/3 (because animals are unalert in their breeding grounds and that totally makes sense).
Rollback to Revision 9
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
deleted 45 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 43 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
deleted 82 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 114 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 353 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 8 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 8 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 1 character in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
added 78 characters in body
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading
Source Link
Martin Ender
  • 198.2k
  • 14
  • 181
  • 311
Loading