The CSC180 AI v. AI Pong Tournament

pong

We will have a Pong tournament for AI engines as part of CSC180 this year. The entry submission deadline will be Nov. 25. Teams of up to two people will be allowed.

Prizes: 4 points for first place, 3 points for seconds place, 2 points for third place, 0.5 points for beating the chaser by at least 150 points when playing to 1000 points.

The game mechanics are included in PongAIvAI and a sample AI engine (which you have to beat to qualify for the class tournament) is at chaser_ai.py. 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.)

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

I used a Python construct called classes when programming PongAIvAI. It's not essential to have a thorough understanding of classes (chaser_ai.py isn't doing anything with them that you cannot get out of the docstring, for example), but you can catch up by reading e.g. Chapter 15 of Think Python. Note that I likely do not have time to cover Python classes during lecture -- this is an optional assignment and optional material.

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.3ms

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 our discretion for tie break purposes. There is a 0.3 ms limit on how long it takes for your function to return a move. For timing purposes, the tournament will be run on ECF or a faster machine. The parameters will stay the same as in PongAIvAI by default, but may be altered for tie-break purposes.

Submission instructions

Please submit a file named pong_ai.py, which must contain the function pong_ai, which will be called the same way chaser_ai.chaser() is called.

Good Luck!

Valid HTML 4.01 Transitional