The UofT AI v. AI Pong Tournament 2016


The UofT AI v. AI Pong Tournament gives you the opportunity to get started with programming games using PyGame, compete against other UofT students, and win prizes and diplomas!

Prizes: Gold, Silver, and Bronze medals for each member of the teams that win first, second, and third places. Diplomas for teams that earn Honourable Mention. (Get bragging rights for your resume!).

The game mechanics are included in and a sample AI engine (which you have to beat to qualify for the class tournament) is at To run PongAIvAI, you need to install Python 2 and PyGame. (For Windows, I recommend downloading the latest version of PyGame for Python 2 from here. See the PyGame download page for other platforms. CDF has PyGame installed)

You can run in Python 2 if you download into the same folder, after you install PyGame for Python 2. See lines 392-393 in for how to set the AI/human input functions for PongAIvAI.

Uncomment line 83 and comment out line 82 once your function doesn't produce errors (line 83 suppresses all errors and simply doesn't move the paddle). Line 83 only accepts input for 0.3 ms


All UofT undergraduate students are eligible to participate. Previous contestants are only eligible if they submit a substantially new entry.

Tournament Format

The format will be determined after the number of entries is known. We will try to hold the final live. (Though that is not guaranteed.) Game parameters will not change by default (except for the score needed to win), but may change at the discretion of the organizer for tie break purposes. There is a 0.3 ms limit on how long it takes for your function to return a move. The tournament will be run on wolf.cdf or an equivalent machine. The parameters will stay the same as in PongAIvAI by default, but may be altered for tie-break purposes.

Submission insturctions and rules

Teams of one or two students are allowed to enter the tournament.

Please submit a single python file whose name is [team_name].py. In the file, indicate the team name, the names of the members of the team, and the student numbers of the members of the team. The file must contain the function pong_ai, which will be called the same way that chaser_ai.pong_ai() is called.

Global variables are, of course, allowed. That way, you can figure out the velocity of the ball etc.

Only import math and import numpy are allowed by default. Non-math/numpy/scipy imports without prior permission are not allowed. Meddling with PongAIvAI is not allowed. To qualify for the tournament, you must beat chaser_ai by at least 1000:850. Please submit the file to by 23PM on March 10, 2016.

Good Luck!

NEW: Results

Gold: Simeon Krastnikov

Silver: Alaa Ahmed and Omar Baghdady

Bronze: Charles Huang and Brendan Neal

Certificate of Achievement: Sarkhan Bayramli


Email Michael Guerzhoy at guerzhoy at

Valid HTML 4.01 Transitional