Skip to main content

Explore CIP

Education is (not) a game!

Learning Artificial Intelligence by building agents that play games autonomously. Team challenges, games and automated feedback connect theory with practice and encourage steady work throughout the semester.

  • Davide CarneiroESTG — P.PORTO
Illustration of a laptop displaying a decision diagram and code, connected to yellow platforms where a blue agent tests different jumping paths.

The challenge

How can Artificial Intelligence concepts become more approachable when the syllabus is broad, requires abstract thinking and draws on mathematical knowledge?

In the Artificial Intelligence course, the challenge was to sustain students' engagement and help them move from theoretical understanding to application. The practice sought to give students reasons to experiment, persist and learn from results while becoming more independent.

Games offered a setting that many students already knew. Turning that familiarity into learning required demanding tasks and appropriate support: learning to install or integrate an emulator should not consume the time intended for understanding and applying algorithms.

Learning objectives

By developing an agent that can play autonomously, students work towards:

  • Applying Artificial Intelligence techniques and algorithms to concrete problems.
  • Developing software, testing solutions and improving them in response to results.
  • Exploring an agent's ability to generalise and adapting a solution to different challenges.
  • Planning and managing a team project throughout the semester.
  • Strengthening autonomy, creativity, teamwork and problem-solving skills.

What underpins the practice

The practice combines learning through projects with gamification. Students learn by building and refining a solution, while game elements help sustain interest and make progress visible.

The pedagogical framework adapts Ron Oliver's 1999 work to computing education and hybrid learning. It brings together three complementary elements:

  • Learning tasks: programming challenges that encourage students to seek and apply knowledge.
  • Learning supports: emulators, simulation environments, programming interfaces, code examples and starter solutions.
  • Learning resources: documentation, books, scientific texts and class materials that connect concepts with their application.

A constructive team competition links these elements across the semester. Its purpose is to encourage students to learn and improve while maintaining academic expectations and preventing tools from creating unnecessary obstacles.

How it works

1. Prepare a game and the necessary support. The lecturer chooses an environment, such as Super Mario Bros or Robocode, and designs challenges around the intended learning. Students receive programming interfaces (APIs), starter projects, examples and, where needed, virtual machines with the emulator and tools already configured.

2. Form teams and develop an agent. Each team chooses its own name and builds a software agent that plays autonomously, using one or more Artificial Intelligence techniques. The project provides a shared setting for the concepts explored in class.

3. Set complementary challenges. In Super Mario Bros, for example, agents may aim to progress as far as possible from world 1-1, maximise points or coins, or finish a world in the shortest time. Each challenge offers opportunities to explore different techniques and improve earlier work.

4. Provide feedback throughout the semester. An automated mechanism tests solutions and updates an online team leaderboard. The practice has used Kaggle and, in other course editions, a service provided by the lecturer. Results help each group understand its agent's performance and decide what to try next.

5. Connect experience with knowledge. Documentation and class materials support the interpretation of results and the application of algorithms. Competition remains positive and constructive, encouraging sustained effort and independent work.

Assessment of learning

Assessment retains two components: a practical team project and an individual theoretical examination. Gamification is part of developing and assessing the project; it does not replace individual assessment.

During the semester, automated tests and the team leaderboard provide feedback on the quality of solutions. Students can observe the effects of their changes and use that information to improve their agents, with less dependence on an immediate response from the lecturer.

Game rankings are therefore part of project feedback. Course assessment continues to combine practical application in teams with each student's theoretical understanding.

Results and lessons

The lecturer observed greater student motivation and participation after introducing the approach. He also reported that this engagement allowed him to explore the syllabus in greater depth and increase the complexity of the problems addressed.

Each edition of the course was monitored using the Academic Motivation Scale, which distinguishes intrinsic motivation, extrinsic motivation and amotivation. Analysis of data gathered over the years identified intrinsic motivation as the component most closely associated with student engagement. Informal feedback and course surveys, in editions with enough responses, indicated a very positive appraisal of the experience.

The work led to three papers at education conferences, two editions of the GaLePro workshop in 2021 and 2022, and the 2022 special issue Gamification of the Learning Process in IxD&A. The experience also contributed to ESTG's participation in the European FACILITATE-AI project, which focused on teaching Artificial Intelligence, particularly to teenagers.

A key lesson is the importance of preparing the game setting. Its educational value depends on tasks that align with the syllabus, support that frees time for learning, and feedback that helps students guide their own work.

How to adapt

The approach can begin with a single project and a small set of challenges before expanding to a whole semester.

  • Start with the learning objectives. Choose the game or simulation for the opportunities it offers to apply course concepts, and identify what each challenge helps students learn.
  • Reduce technical barriers. Provide starter code, clear instructions and an accessible execution environment so that setting up tools does not become the main task.
  • Build in progression. Set challenges that allow students to reuse, test and improve an earlier solution instead of starting again each time.
  • Make feedback useful. Show results that help students understand their solution and decide on their next steps, beyond their position on the leaderboard.
  • Support constructive competition. Value improvement and collaboration within each team, maintaining an environment in which students feel able to participate.
  • Retain individual assessment and listen to students. Combine the project with an appropriate way to check each person's understanding, and gather feedback to refine the experience.

The essential connection is between challenge, support and learning. Participation should not depend on students' prior experience with particular games or tools.

Resources and materials

Implementation uses games or simulators, interaction APIs, starter projects, code examples and, where needed, virtual machines prepared by the lecturer. Supporting documentation explains how to use these resources and relates them to the Artificial Intelligence concepts studied in class.

Further reading includes the paper presenting the pedagogical framework, the IxD&A special issue on gamification and the FACILITATE-AI project, which provides materials on teaching Artificial Intelligence.

Join our newsletter

Enter your email to keep up with everything we do.