Archive :
-
AI learns to play Mario : Deep Reinforcement Learning applied to Super Mario Bros
23 Feb 2026 in Tinkering . Tags : AI , reinforcement learning , simulation , emergence , scientific programmingThis is a live feed of my Deep Reinforcement Learning agent training on the original Super Mario Bros game.
The agent is a custom implementation of the Rainbow DQN paper from 2017. It stays pretty close to what’s described in the papers. There are however a few custom tweaks. I’ll update this article soon with more details.
This originally started as a pedagogical implementation of the original Deep Q Network paper from 2015 for a course I taught. I then kept implementing improvements to this paper until I reached the algorithm described in the Rainbow paper.
Read more... -
Mitosis in the Gray-Scott model : writing shader-based chemical simulations
The Gray Scott Model of Reaction Diffusion is an interesting instance of emergence. By simulating a small chemical system that involves only a few components and reactions, complex and mesmerizing patterns appear.
You can interact with the simulation above by clicking on it to drop some green and you can reset it by pressing the previous (⏮️) button.
Although the local rules and the underlying math are quite simple, there is some heavy computations involved. For each time step in the simulation, we must apply these rules to compute the concentrations of every involved component at every possible location. Running such a simulation on a CPU would be extremely slow. GPUs, however, are specifically built to handle large volumes of a single small computation in parallel.
This post is an introduction to writing such simulations using GLSL ES, with a basic implementation of the Gray Scott model that runs in the browser on Shadertoy that is less than 100 lines of code.
Read more...