Summary

This is a port of the Entelect Challenge 2019

This verson is reduced to 300 rounds and 50ms per turn (Originally 400 turns and 1000ms per turn)
Rules will be updated when they become available.

  The Goal

Manage a team of worms to strategically outwit your opponent.

  Rules

In a match 2 players with 3 worms each will play against each other. The goal is to be the last player with any conscious worms left.

The Map

The game is played on a grid of 33x33 cells. Every cell is one of the following types:

  • Air - worms can move into and shoot through air cells
  • Dirt - worms cannot move into or shoot through dirt cells, it has be dug out first
  • Deep Space - worms cannot interact with deep space cells

Cells can contain powerups. Powerups are picked up when a worm moves onto a cell.

  • A Healthpack will immediately restore 10 health to the worm who picks it up.

Every cell has a coordinate in the form X,Y starting from 0,0 in the top left corner and increasing downwards and to the right.

The commands

In every round each player can submit one command for their active worm. The active worm will be determined by the game engine

Move

The format of the move command is move x y

  • x y is the coordinate of the cell the worm is moving to
  • Worms can move to any adjacent air cells (including diagonally)
  • Worms cannot move to cells occupied by another worm
  • Worms cannot move to dirt or deep space cells
  • If two worms move to same cell in the same turn:
    • Both worms will take damage
    • Worms will either swap places or stay in their current positions (with an equal probability)

Dig

The format of the dig command is dig x y

  • x y is the coordinate of the cell the worm is digging out
  • Worms can dig any adjacent dirt cells (including diagonally)
  • Digging a dirt cells will change its type to air
  • Two worms digging the same cell in the same turn is a valid move

Shoot

The format of the shoot command is shoot {direction}

  • {direction} can be any of the eight principal directions: N (North), NE (North-East), E (East), SE (South-East), S (South), SW (South-West), W (West), NW (North-West)
  • Shooting distance is measured in euclidean distance. To determine if a cell is in range, calculate its euclidean distance from the worm's position, round it downwards to the nearest integer (floor), and check if it is less than or equal to the max range
  • Shots are blocked by dirt and deep space cells
  • The first worm in range in the shooting direction will lose health equal to the weapon's damage
  • When a worm's health is 0 or lower, it will fall unconscious and be removed from the map
  • Be careful! Friendly fire could hit your own worms

Do Nothing

The nothing command can be used when a Player does not want to do anything.

Game mechanics

All commands submitted in a round will be evaluated in the following order:

  1. Movement
  2. Digging
  3. Shooting

This implies the following regarding command interaction:

  • A worm cannot move into a cell that another worm is digging open in this round
  • A worm can dig open a path for another worm's shot
  • A worm can move into range of another worm's shot
  • A worm can move out of range of another worm's shot
  • Two worms can dig open the same dirt cell in a single round

Scoring

Player scores will only be considered in the case of a tie:

  • The maximum amount of rounds (300) have passed and there is more than one player left
  • If both players lost their last worm in the same round

The total score value is determined by adding together the player's average worm health and the points for every single command the they played:

  • Attack:
    • Shooting any worm unconscious gives 40 points
    • Shooting an enemy worm gives 20 points
    • Shooting one of your own worms will reduce your points by 20
    • A missed attack gives 2 points
  • Moving gives 5 point
  • Digging gives 7 points
  • Doing nothing gives 0 points
  • An invalid command will reduce your points by 4
Victory Conditions
  • Shoot all your opponents worms unconscious.
  • In case of a tie: score more points than your opponent.
Lose Conditions
  • Your opponent wins.
  • Your program does not provide output in time.
  • Your program provides invalid output.

  Expert Rules

Comming soon...

  Game Input

Initialization input
Line 1: one integer myPlayerId, Your player Id.
Input for one game turn
First line: an integer roundNum, The current round number
Next line: an integer mapSize, The size of the game map
Next mapSize lines: A string with length mapSize, describing the current state of the map
  • 0 A Worm owned by player id 0
  • 1 A Worm owned by player id 1
  • . An unoccupied air cell
  • # A dirt cell
  • X A deep space cell
Next line: an integer numOfPlayers, The number of Players in the game.
Next numOfPlayers lines: one line per Player.
Each Player is represented by
  • an integer playerId, The Id of the Player
  • an integer score, The Players score thus far into the game.
  • an integer nextWormId, The wormId of the next worm being moved.
Next line: an integer numOfWorms, The number of Worms in the game.
Next numOfWorms lines: one line per Worm.
Each Worm is represented by
  • an integer wormId, The Id of the Worm
  • an integer ownerId, Id of the Player the worm belongs to.
  • an integer health, Health points the worm has left.
  • an integer wormX, The X Position of the worm.
  • an integer wormY, The Y position of the worm.
  • an integer digRange, The Range the worm is allowed to dig (always 1 for this league).
  • an integer moveRange, The Range the worm is allowed to move (always 1 for this league).
  • an integer weaponDamage, The amount of damage the worms weapon does (always 8 for this league).
  • an integer weaponRange, The wormId The range of this worms weapon (always 4 for this league).
Next line: an integer numOfPotions, The number of potions on the map.
Next numOfPotions lines: one line per Potion.
Each Potion is represented by
  • an integer potionId, The Id of the Potion
  • a string potionType, The type of potion (always 'health' for this league).
  • an integer potionStrength, The number of healing points the potion has (always 10 for this league).
  • an integer potionX, The X Position of the Potion.
  • an integer potionY, The Y position of the Potion.
Output for one game turn
  • move x y
  • dig x y
  • shoot {direction}
Constraints

Response time for the first turn ≤ 1000 ms
Response time per turn ≤ 50 ms