Codyfight

Easy to enter, hard to master

Codyfight is a competitive AI game dedicated to tech nerds. Create your AI robot and compete with others!

Game API

POST
https://game.codyfight.com
Description
Start a new game by the given mode. Use your robot API key obtained during the registration.
Parameters
string api_key Robot API key
integer mode Game mode {1 - custom robot, 2 - random robot}
string opponent Opponent robot name if game mode is set to 1

All parameters are being passed through url (query params).
Example requests

Matchmaking with custom user (robot):
POST https://game.codyfight.com?api_key=xxxx-xxxx-xxxx-xxxx&mode=1&opponent=robotName

Matchmaking with random user (robot):
POST https://game.codyfight.com?api_key=xxxx-xxxx-xxxx-xxxx&mode=2
Responses
Response content type: application/json
Code Body
201
400 coming soon
Description
Get a game state for the given robot. Used to check whether robot action is required, etc. Check response example below.
Parameters
string api_key Robot API key

All parameters are being passed through url (query params).
Example requests

Get current game state:
GET https://game.codyfight.com?api_key=xxxx-xxxx-xxxx-xxxx
Responses
Response content type: application/json
Code Body
200
400 coming soon
PUT
https://game.codyfight.com
Description
Perform robot movement to the map position x & y. Use this endpoint when robot action is required.
Parameters
string api_key Robot API key
integer x Agent position x value on the map
integer y Agent position y value on the map

All parameters are being passed through url (query params).
Example requests

Move agent to position x & y:
PUT https://game.codyfight.com?api_key=xxxx-xxxx-xxxx-xxxx&x=3&y=3
Responses
Response content type: application/json
Code Body
200
400 coming soon
PLAY
Repeat steps 3 & 4 until game ends. Read more!

What is Codyfight?

Codyfight is a competitive AI game where 2 robots meet for a fight. The main goal of the game is to strategically manage your robot’s movement to collect more points than the opponent. There are two ways to play Codyfight. First, you can create your own AI robot using any programming language you like. This way your AI robot controls the game via API. The second option is to simply control the robot yourself in real-time via our website.

Main rules

  • Codyfight is a turn-based game played in 5 rounds.
  • One round has a total of up to 25 turns.
  • Each round ends up when someone scores points or each player runs out of turns.
    In the latter case, no one earns points.

How to score points in Codyfight?

  • You get 5 points when your robot leaves the playfield via exit first.
  • You get 15 points when your robot catches the pig. To do that, the robot must cage the pig so it cannot move in any direction.
    Only the robot which made the last move is awarded.
  • In case both players have the same amount of points at the end of all rounds, the victory is awarded to the player who caught the pig more times.

Playfield

Codyfight is played on a 7x7 square-shaped grid:

  • surrounded by a wall;
  • with 2 exits at different sides of the map;
  • with 4 obstacles of 1x1 blocks around the center;
  • Playfield can be slightly altered by special agents because of their unique abilities.

Special Agents

To spice things up, special agents (NPCs) will appear during the game. They all are unique holding their own movement patterns and specific powers. Some of them might help you reach the goal or even grant rewards, while others might only disturb you. Special agents may provide extra challenges to get rewards (Note: the round doesn't end when a player receives bonuses when interacting with special agents).

Now, meet some of our highly respected special agents:

  • Pig. It moves randomly.
  • Common Rabbit. Savage look + some secret powers that you’ll figure out later.
  • Legendary Llama. Caging the Llama will grant bonuses for both players.
  • ... find out more!

Game modes

The game mode can be selected during the init phase. The mode parameter is set via a POST request to game.codyfight.com (see documentation above).

  • Mode 1: Matchmaking between two custom players, can be robot versus human.
    Max one turn (request) time: 10s.
  • Mode 2: Matchmaking between two random players can be robot versus human.
    Max one turn (request) time: 5s.
  • Mode 3: Rank-based matchmaking between two semi-random players. It’s a competitive arena exclusively for AI robots. Entry fee: 1 CodyTicket or DailyTicket. Here, players can get rank-based rewards, compete to get into TOP ranks (10 ranks total), and so on.
    Max one turn (request) time: 2s.
Map

Early access coming soon! Stay tuned in our Facebook

Spectate Game

Recently Played


Example Game Clients