
MMOFPS (in development)
An in-development massively multiplayer first-person shooter project. Its public teaser is deliberately sparse—“The world is empty. For now.”—while the engine itself remains private.

Tech Tree (JavaScript)
A map of human knowledge in the spirit of Sid Meier’s Alpha Centauri, running from the first stone tools to the open frontier. Each of its more than 1,700 nodes is a discovery linked to the discoveries it stood on, and gold rings mark open problems and unbuilt technology. Solve one, or make real progress on it, and your name goes on the tree. The data and code are on GitHub, where anyone can propose new nodes.
![The Möbius band as a line bundle over the circle: over each point (x, y) of the white circle sits the image line of the matrix [[1+x, y], [y, 1−x]].](https://christianhagg.com/wp-content/uploads/prog-bezout-lean-v3.jpg)
Bézout Counterexample (Lean 4)
A Lean 4 formalization of my paper with A. Mörtberg, which answers a question of Helmer from 1943. It constructs a Bézout domain over which the explicit 2×2 matrix [[1+x, y], [y, 1−x]] has no Smith normal form, the obstruction being the Möbius line bundle on the circle. Every numbered statement in the paper is formalized, using only Lean’s three standard axioms.

Leanest Ellipse (Lean 4)
A Lean 4 formalization of my paper An Ellipse Criterion for Exact Nonuniqueness in the Planar Interior Radon Problem: a nonzero function supported in one convex set can integrate to zero over every line meeting a second one exactly when an ellipse fits between them. All 15 numbered results are formalized across 63 modules, together with the integral geometry they rest on.

Pandora’s Shell (Python)
An MCP server that lets AI assistants such as Claude run terminal commands on your computer, with output capture, working directories and timeouts.

LLMCodeOptimizer (Python)
Uses a locally hosted large language model to speed up Python functions. Starting from an initial implementation, it repeatedly asks the model for a faster version, runs each candidate against the expected output, and keeps the fastest correct one. The picture shows a real run with Qwen3-14B on the sum of the first 10,000 primes.

Neural Digits (Python)
A simple neural network that allows users to train, test, and perform digit recognition on the MNIST dataset with over 99% accuracy with sufficient training. Users can train from scratch, use a saved model, and use their own images for digit prediction.

Relaxed Newton Fractals (Python)
Plots the basins of attraction of the relaxed Newton method z ↦ z − a·P(z)/P′(z) for any polynomial P, coloring each starting point by the root it converges to. A real or complex relaxation parameter a bends the classical Newton fractal into spirals, as in this picture of z⁵ − 1 with a = 1.3 + 0.4i.

Universal Slideshow (Python)
A lightweight fullscreen image slideshow for Windows, macOS and Linux, built on pygame. It finds your Pictures folder on its own, shuffles the images and advances on a timer, and the arrow keys step back and forth. Shown here browsing some of my artwork.

Custom Maze Solver (JavaScript)
Allows the user to upload an image of a maze (or choose a premade one), then finds a shortest (Manhattan) pixel path between two chosen points by using Dijkstra’s algorithm.

Markov Chain Text Generator (JavaScript)
Lets the user enter a sample text, then generates text that is similar to it by using a first-order Markov chain.

3D Wireframe Engine (Java)
A simple 3D engine that uses the drawLine() method from the Java Graphics library and Euler angles to render an interactive wireframe environment from scratch. Use the arrow keys and QWEASD to navigate.

Wolfram Spiral Automaton (JavaScript)
A cellular automaton inspired by Stephen Wolfram’s elementary cellular automaton rules. Here, the the cell wanders outward in a counterclockwise spiral in an infinite square grid. For each step, its color (among three possibilities, by default) is determined by the colors of its eight adjacent cells. The rule (which is displayed by setting verbose=true in the URL) for how coloring is performed is randomized by default, but can be specified in the URL via the parameter rule (i.e. append &rule=3c… to the URL). Here is a gallery of some generated images.

Julia Set Randomizer (PHP)
Generates random Julia set PNG images using the PHP GD Graphics Library. Adjust the image size with the width and height parameters, and experience unique fractal patterns with each refresh. Explore the source code or generate multiple Julia sets simultaneously.

Polynomial Shadow (Mathematica)
Takes a univariate polynomial P and plots shadow(P,n), i.e. the union of all zeros of all orders of the derivative of Pⁿ, where n is a fixed natural number. In the plot, the large dots and squares are the zeros and critical points of P, respectively, the triangle is the center of mass of the zeros of P, and the small squares are the branch points of equations (1.3) and (1.4) in the z-plane in my paper that the program is based on. Here is the code in text format, and here is a gallery of some shadows.