Saltar al contenido

Hockey is Melting Down

Educational air hockey with an adaptive AI trained with PPO and self-play. Every level gives back a piece of the planet's balance.

Client
Universidad del Norte
Year
2025
Built with
PythonPygamePPOMachine learning
Level selection screen with the climate villains and locked levels

The challenge

An opponent that neither bores nor humiliates

An educational climate game has a double problem. If the message outweighs the match, nobody plays twice; if the opponent is scripted, players find the trick in ten minutes and the game is over.

Difficulty had to come from the opponent's behavior, not from a faster puck. That rules out rule-based AI and requires training an agent, with everything that implies: an observation space that describes the whole table and a reward system that doesn't reward winning at any cost.

  1. 01A rule-based opponent becomes predictable in a few games
  2. 02A faster puck isn't difficulty, it's frustration
  3. 03The climate message can't interrupt the game
  4. 04The agent must run in real time, without a GPU
  5. 05Training without a human opponent available
  6. 06Measuring improvement against something other than itself

How it was solved

The story

An air hockey game that blends competition with climate awareness. It is built with Python and Pygame, and the opponent is an adaptive AI trained with Proximal Policy Optimization (PPO) and self-play: it wins 81% of games against strong baselines.

Each level is an environmental problem with its own villain, and beating it restores that part of the planet: trash in the Arctic (Basuraura), the ozone hole (UVBlade), a smog storm (Smogetron), a vanished forest (Deforestix) and urban heat (HeatCore).

The technical core: a hybrid PPO and self-play architecture with behavior correction, a 21-dimension observation space (positions, velocities and trajectory prediction), adaptive self-play against earlier versions of the agent itself, and a multi-objective reward system with curriculum learning.

Melting polar ice works as a metaphor: you watch it melt while you play. Published in OnBoard Knowledge Journal (2025). Built with Flavio Arregocés, Cristian González, Bella Mejía and Yovany Zhu at Universidad del Norte, Barranquilla.

Gameplay and planet status: melting ice, factories and progress bars

Results

What is live and working

  • The agent wins 81% of games against strong baselines.
  • Difficulty emerges from learned behavior, not from hand-tuned parameters.
  • The melting ice works as the scoreboard: the planet's state IS the progress.
  • Published in OnBoard Knowledge Journal (2025), peer reviewed.
  • First place at the Universidad del Norte Gamer Fair.
  • Self-play removes the need for a human opponent during training.

Team

  • Flavio Arregocés · Development
  • Cristian González · Development
  • Bella Mejía · Development
  • Jorge Sánchez · Development and AI
  • Yovany Zhu · Development

Next case study

LaRueda