ACADEMIC YEAR

2025 / 2026

Stochastic Parrots

Implement Llama 2 inference in C from scratch and then run a small LLM on a regular laptop. A nice excuse to look under the hood of the systems everyone keeps talking about, and to see firsthand why a 1 GB parrot says the things it says.

  • Matrix multiplication
  • Quantization
  • Sampling and temperature

→ github.com/aaleta/2026_1_stochastic_parrots

TinyStories 110M (left) and TinyLlama (right), generating text token by token on a laptop CPU. The students quickly discovered the parrots have opinions about whether they will pass the exam.

In the exam we asked them to ask the LLM whether they would pass the exam. Apparently they hadn’t even tried once before the exam, and the parrots were not optimistic about their chances.

Doomscrolling

A student wanders the first floor of the Faculty of Science the week before exams, trying to ambush professors with last-minute questions. Unfortunately they are also a victim of doomscrolling: their eyes stay glued to TikTok, so they move in a correlated random walk. Stress builds up as time passes; finding a professor resets it, running out of time triggers a panicked flight from the building.

  • Correlated random walk
  • von Mises distribution
  • Collision detection
  • Videogame physics (SDL3)

→ github.com/aaleta/2026_2_doomscrolling

In the exam, celebrating the anniversay of the 2025 Iberian Peninsula blackout, we switched off the lights: the student could now only see what falls inside the cone lit up by their phone screen, and has to find the professors essentially in the dark.

The assignment (left) and the exam blackout extension (right). Stress and battery tick down; finding a professor buys back some calm.

ACADEMIC YEAR

2024 / 2025

Solar System

Simulate a small solar system with multiple planets orbiting a star — Verlet integration, gravitational forces, and a little data visualisation on the side. Integrating a system of coupled ODEs is always a bit tricky, and many students struggled in interesting ways.

  • Verlet integration
  • Gravitational forces
  • Data visualisation

→ github.com/aaleta/2025_1_solar_system

Particle-detection looking simulation
Quasar-like trajectories
Wrong sign — planets repelling
Helix — beautiful by accident

So many wrong things happening — quasar simulator, wrong sign, a helix that ended up rather beautiful.

Then, in the exam, we asked them to add small modifications so they could divert an asteroid heading for Earth (Armageddon style). Let’s just say we need to find better pilots for our future space missions.

Missile veering off
Missile, take two
Wrong aim
Verlet integration gone wrong

Asteroid-diversion attempts from the exam.

Rumba

A small 2D videogame, written in C against the SDL3 library, where a robot vacuum (a Rumba) tries to clean the first floor of the Faculty of Science. Random walk, collision detection, and just enough videogame physics that students could see their code in action.

  • Random walk
  • Monte Carlo
  • Collision detection
  • Videogame physics (SDL3)

→ github.com/aaleta/2025_2_rumba

Once the battery went below a certain threshold, the Rumba had to return to its charging dock to recharge and resume cleaning.

In the exam we asked one short question, and let them use any resources they wanted (internet, ChatGPT, books, classmates): "What Rumba should we buy? Justify your answer." Let’s just say they weren’t ready for such a difficult question.

ACADEMIC YEAR

2023 / 2024

Harmonic Oscillator

The first assignment of the redesigned course — implement Euler and Verlet integration to simulate a harmonic oscillator, and compare their accuracy. In the exam, students were asked to add small modifications to their code, such as a slightly different potential.

  • Euler method
  • Verlet integration

→ github.com/aaleta/2024_1_oscilador

Position of the harmonic oscillator over time

Position of the harmonic oscillator over time.

Brownian Motion

Simulate a student who may have had a few too many drinks moving across a 2D grid, dodging buildings, and trying to make it to class on time. Random number generation, Monte Carlo, and a bit of collision detection.

  • Random number generation
  • Monte Carlo
  • Collision detection

→ github.com/aaleta/2024_2_brownian

Completely wasted students trying to get to class.

But good students always know how to find their way, even if drunk (hint: Metropolis algorithm).

§ — Notes

Other resources.

  • ES · 2018/19
    Los malditos punteros

    Notes on how pointers actually work in C — from the 2018/19 cohort at the University of Zaragoza.

    PDF ↗

I am also the 3rd-year academic advisor for the Physics B.Sc. See the advising page →