Gradient Descent: An Educational Roguelike for Learning Neural Network Training

Hamza Hanif, sumra khan, Muhammad Bilal Khan, Inam ur Rehman, Rizwan Qureshi, Basim AzamNeurIPS 2026 Education Track 2026

TL;DR

Gradient Descent is a browser-based roguelike card game that teaches the practical, day-to-day art of training neural networks. Instead of just doing backpropagation calculus on paper, players draw from a shared deck of models, activations, losses, and compute budgets, then watch live loss curves to diagnose failures like overfitting or vanishing gradients—with permadeath raising the stakes.

What Problem Does This Paper Address?

Classroom machine learning often focuses on the mathematics of gradient descent, leaving students unprepared for the messy, experimental reality of applied ML research. In practice, engineers and researchers have to choose among rapidly evolving architectures, optimizers, and compute budgets, and then figure out what went wrong when a training run inevitably fails.

The authors bridge this gap by turning model selection and failure diagnosis into a hands-on, resource-constrained game. Rather than being told which architecture is "correct," learners build practical instincts by experimenting under realistic constraints.

Methods

The authors built a browser-playable roguelike card game (using React/Vite and deployed on GitHub Pages, requiring no installation).

  • The Core Loop: Players draw from a single shared deck across a run, dragging Model, Compute, Activation, Loss, and Helper cards into a build zone and hitting RUN.
  • Visual Feedback: An animated SVG train/validation loss curve and a live training log immediately reveal whether the problem is solved or if the run suffered from underfitting, overfitting, vanishing gradients, unstable training, conflicting multi-model builds, or flat collapse.
  • Roguelike Mechanics: A failed run ends the attempt (permadeath), turning every card and discard into a meaningful resource decision. Solving problems earns compute currency for a Grant Committee shop, where players can buy one-time bonuses like Peer Review hints, Second Attempt, Safety Net, Transfer Learning, Recycle, and GPU Lab Access.
  • Card Pools: The game includes 10 model families (MLP, CNN, 1D/3D-CNN, RNN/LSTM, Transformer, GNN, U-Net, Mamba, KAN), 4 compute tiers (laptop CPU to datacenter), 4 activations (ReLU, GELU, Sigmoid, Tanh), 4 losses (cross-entropy, MSE, contrastive, focal), and helpers (Dropout, Data Augmentation, Early Stopping, Normalization, Ensemble, Lion, AI Scientist). Each card includes a tooltip explaining what it changes and how well it fits the current problem.
  • Modes & Reproducibility: It features a Learn Mode, a timed Speedrun Mode with a userboard, a Notebook that unlocks a page per solved problem, and seeded "flavour" randomization so instructors can give a whole class the exact same deck and problem order.

Datasets

Rather than evaluating the game on a benchmark dataset, the game itself features ten problems based on real open-science ML challenges:

  • Particle Physics: Higgs ML, jet classification, IceCube neutrinos
  • Astronomy & Cosmology: Exoplanet transits, Quijote
  • Gravitational Waves: G2Net
  • Earth Science: ClimateNet
  • Chemistry: ESOL/Tox21
  • Biology: TCGA gene expression, protein structure

Each problem briefing specifies the data type, dataset size, target variable, evaluation metric, and why the problem matters.

Key Insights and Ideas

  • Instincts over memorization: Learning through direct experimentation—seeing why a model, activation, and loss combination fails under compute constraints—builds practical diagnostic instincts rather than rote memorization.
  • Connecting the classroom to the frontier: By including modern architectures like Mamba (selective state-space models), KAN (Kolmogorov–Arnold Networks with learnable spline functions), and the Lion optimizer alongside classic defaults like MLPs and ReLU, the game reflects how rapidly the space of viable ML choices is evolving.
  • Permadeath as a teaching tool: Making a failed run end the attempt forces players to treat compute, cards, and discards as real experimental trade-offs, mirroring the resource constraints of actual ML research.

Key Results

Not discussed in the paper.

Limitations and Future Work

The game assumes roughly first-year university ML exposure—players need to know what a model, loss function, and activation roughly do. Because of this, it is less suited for complete pre-university beginners, though an in-game tutorial, card tooltips, and Learn Mode help lower the barrier. Conversely, graduate students will move through it quickly, though the permadeath structure and shrinking deck can still serve as a fast discussion prompt for seminars on experimental design.

For future and extension work, the authors provide an open-source repository with documented steps for adding new cards and problems, allowing instructors to inspect, adapt, or extend the game for their own courses.

Summary updated

BibTeX
@inproceedings{hanif2026gradient,
  author = {Hamza Hanif and sumra khan and Muhammad Bilal Khan and Inam ur Rehman and Rizwan Qureshi and Basim Azam},
  title = {{Gradient Descent: An Educational Roguelike for Learning Neural Network Training}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=fK6f1aFVPs},
}

Loading related content...

Figure