- Have the highest score when the game ends.
This is a league based challenge.
Control your elemental tribe, hunt your prey, avoid your predator, and capture more enemies than your opponents to win the battlefield!
The game is played by 3 players on a square grid. Each player controls a tribe of elementals.
Each tribe has one element:
The tribes follow a cyclic relationship:
The map is a square grid made of the following cells:
Camps are walkable cells. Walls are not walkable.
All border cells of the grid are walls.
Each turn, output at least one command. Commands are separated by semicolons (
You may provide commands for only some of your elementals. Elementals without a command will wait.
If multiple commands target the same elemental in one turn, only the first is applied and the others are ignored.
A
Movement is 4-directional only (north, east, south, west); diagonal moves are not allowed.
If multiple shortest paths exist, the first step is chosen using this fixed priority order: north, then east, then south, then west.
If the target cannot be reached, the elemental stays in place.
Elementals can move through camps and through other elementals. Only walls block movement.
After all players' moves have been processed, all captures are resolved simultaneously.
If an elemental shares a cell with one or more elementals of its predator tribe, it is captured.
A captured elemental becomes a prisoner and is moved to the camp of the tribe that captured it.
Each captured elemental gives 1 point to the capturing tribe. Points are permanent, but a player who times out or outputs an invalid command loses the game regardless of the points they have earned.
Multiple elementals can stand on the same cell. A stack is not stronger than a single elemental: one predator is enough to capture all prey elementals on the cell.
If all three tribes are present on the same cell, the three tribes capture each other simultaneously.
Nothing special happens when a prey elemental enters an enemy camp: camps do not capture by themselves. Captures only occur when predator and prey elementals share the same cell.
A prisoner cannot move.
Prisoners do not participate in captures. They are ignored during capture resolution.
The game ends when one of the following happens:
Line 1: myTribe, your tribe (
Line 2: mapSize (integer), the size of the square map.
Next mapSize lines: one row of the map, containing mapSize characters.
Line 1: three space-separated integers: scoreW scoreF scoreP, the current scores of Water (W), Fire (F), and Plant (P) tribes.
Line 2: elementalsCount (integer), the total number of elementals in the game.
Next elementalsCount lines: the following space-separated values for each elemental:
A single line containing at least one command and at most elementalsCount commands.
Commands must be separated by semicolons (
Example:
0 MOVE 5 3;1 WAIT;2 MOVE 7 4

In a world shaped by primal forces, three elemental tribes wage an endless war for dominance. The Water, Fire, and Plant clans are bound by an ancient cycle of power, where each element can overpower another but is also vulnerable in turn.
Driven by instinct and survival, these elementals roam the battlefield, capturing enemies and rescuing allies to strengthen their ranks. Only the most cunning leader will master this delicate balance of aggression and caution.
Will you harness the cycle⦠or be consumed by it?