Robot Tournament

For your final project/the last 3 labs, you will be working with your lab group to develop an agent in Unity with ML Agents to compete in the Ball Capture Robot Tournament. The basic rules of the game are as follows:

  • Two robots will be competing at a time
  • The competition will take place in a rectangular arena
  • The two robots will start out at their home bases at 2 opposite corners of the arena
  • The goal: carry as many balls on the field as possible back on to your base within the time limit
    • Winners are determined by:
      1. Who has the most balls in their base
      2. Who is carrying the most (if 1 is tied)
      3. Who is closer to their base (if 1 and 2 are tied)
  • Each robot’s abilities include:
    • Moving forward and backward
    • Rotating around its y-axis
    • Carry any number of balls (though its speed will be affected by the number of balls being carried)
    • Shoot lasers to stun opponent (the robot won’t be able to move while shooting)
    • Steal balls from the other base

The Goal

To develop a model for the robot using reinforcement training to compete in this game.

Here is the demo of what the game will look like. Feel free to play around with the game and start exploring potential strategies that you can employ.

The controls are as follows:

  • Use left/right arrow keys to rotate, and up/down arrow keys to move forward and backward
  • Use the Space key to shoot lasers
  • “a” key will rotate the agent towards the nearest target and move towards it
  • “s” key will rotate the agent towards the base and move towards it
  • For camera view:
    • Press 1 for bird-eye view,
    • 2 for agent 1’s perspective (and 2 again for first-person view),
    • 3 for agent 1’s perspective (and 3 again for first-person view),
    • and 4 for vertical split view of both agents

The game will start when you click start game and ends after 2 minutes, with the winner being the one with more balls in their base. To replay, simply reload the page.

Note that the final game might differ slightly from the demo version as we are continuing to make small balance changes.