Skip to main content
3 of 11
added 5 characters in body
mbomb007
  • 23.6k
  • 27
  • 42

#Snakes on a Torus

This would be representative of the classic Snake video game, but multiplayer. The game would be 2-4 players.

###Game Description:

Each of the 2-4 snakes will always start at one of four fixed position on the board. Each snake continuously moves forwards at a constant rate. A snake stops moving upon death. The board wraps in both directions, but would be graphically represented as a grid (plane) in an actual game with people, so think of it as "snakes on a plane" if you wish. The dimensions of the grid are TBD.

Apples and poison apples (referred to as Blues and Reds) will spawn in random locations on the board, either at a random rate, or only to replace one as it's consumed (TBD). An blue increases your snake's length by 3. A red reduces your snake's length by 2 (to a minimum of 2). Both are useful in managing your snake's length.

A snake's length will increase by n by the tail not moving for n turns. A snake's length will decrease by n by the tail moving an extra space for n turns. Eating one blue followed immediately by one red should hold the tail for 1 turn, then continue as normal (they cancel).

Your snake will die if its head collides with its body or the body of another snake, whether alive or dead.

###Your Bot's Job:

You will create a bot to play this game by submitting which of the 3 directions to move (turn left, straight, turn right) based on information including:

  • Each snake's current length
  • A delimited, ordered list of your snake's tiles and orientation
  • A delimited, ordered list of every enemy snake's tiles and orientation, and whether the snake is dead or alive.
  • The location of every apple on the board
  • The location of every poison apple on the board
  • Each player's numbers of wins, kills, and deaths.

You will likely be creating class that is an instance of a base class Snake, and implementing the necessary methods. If a move is not returned in the appropriate time-frame, your snake will move straight.

###The Winner:

Each snake will be pitted against each other snake multiple times. The one which has the highest score after the most games wins. Scoring TBD, but will likely be something like +100 per win, +10 per death on your snake (someone ran into you), -10 per death. Tied games will be possible, since there will be allowed a short period of time while the last snake is alone on the map, in case it would die soon after winning.

###Suggestions?

I don't know how soon I will get to making a controller, etc, but let me know what you think. If enough people are interested, I could invest time in it.

Suggestions for input format would be great. (2D matrix of integer types, multiple lists, etc)?

This is based directly off of a game I've played, which I think is called either "Worm ed 2" (as in Worm: edition 2) or "Wormed 2". I was unable to find the game in a short search. The game is likely old, and I don't know where it could be found online if at all.

mbomb007
  • 23.6k
  • 27
  • 42