Course Level
Knowledge Unit
Fundamental Programming Concepts
Collection Item Type

In this 2018 Nifty assignment, students write an AI engine for the game of Pong. Pong is a game enjoyed by people in general, by the CS1 community in particular, and by pigeons. In this open-ended assignment, students write an AI engine for Pong from scratch. Students can have their AI engines play against each other, and participate in a class-wide tournament. To design good AI engines, students have to read, understand, and modify the game engine code. The assignment is accessible to any CS1 student, but leaves room for a lot of exploration and creativity — we have had success engaging both excellent students who had little difficulty in CS1 and students who found CS1 challenging. 

NOTE: This is not a traditional CS1 assignment so it might make more sense used as a lab assignment or a bonus assignment.


Be careful using competition in assignments. Students who have less experience with computing may find a competition to be daunting and demoralizing. This can also be true for students who may be wondering if they belong in computing (e.g., because they don't fit the stereotypes of who does computing). If you do choose to use a competition, be sure to employ Effective Encouragement and set a tone of civility.

Engagement Highlights

In a world of intelligent technology, learning about the construction of AI algorithms can be meaningful and relevant to many students. This material also encourages student interaction by providing for a tournament between the engines students build.

Computer Science Details

Programming Language

Material Format and Licensing Information

Creative Commons License