We will have a Pong tournament for AI engines as part of ESC180 this year. The entry submission deadline will be Dec. 4 23:59PM. 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 PyGame.
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 81 and comment out line 80 once your function doesn't produce errors (line 81 suppresses all errors and simply doesn't move the paddle). Line 81 only accepts input for 0.3ms
Please submit a file named pong_ai.py, which must contain the function pong_ai, which will be called the same way chaser_ai.pong_ai is called.
Good Luck!