Writing

17 posts. Older ones were rescued from divergentblue.com (2006–2020).

Live demo
Oct 16, 2026

I Failed Every Colorblind Test, But I'm Not Exactly Colorblind

I built my own color vision test, ran about 5,900 trials on myself, and drew a map of what I actually see. The results were... eye-opening.

Oct 10, 2026

spect: Survival Prediction with Any Classifier

My dissertation research ended in an R package on CRAN: turn time-to-event data into a classification problem, stack a few models, and get a survival curve for every individual.

From the archive Restored from the old blog, 2006–2020.

Live demo
May 11, 2020

Classify Your Face – in a Web Browser!

A VGG16-based network that guesses gender from a photo with about 95% accuracy, now running in your browser. Plus what its mistakes reveal about the labels.

Dec 15, 2019

What's the Average Face?

Averaging 202,599 celebrity photos pixel by pixel, and then the average man, woman, hat-wearer and more.

Dec 14, 2019

A Geometric One-Liner

Which boxes have a volume equal to their surface area? One line of Python finds them all, and a week of brute force can't find any more.

May 30, 2017

Siege!

Using a genetic algorithm to pick a troop allocation for FiveThirtyEight's Riddler castle-war puzzle.

Sep 4, 2015

72 Hours > Lifetime

Twenty-five years of wanting to make a video game, finally done in one Ludum Dare weekend.

Jun 17, 2015

Jocks vs. Nerds

In a round-robin league, how many wins does it take to guarantee a playoff spot, and how few can still sneak you in?

May 19, 2013

Entropy: The opposite of chaos

Which image below looks more disorderly? Which seems more chaotic? Perhaps these seems like trick questions - they're not. They may seem like leading…

Nov 24, 2012

When Will This Game End?

As it turns out, the NCAA publishes every overtime game including the number of overtimes. We'll come back to this later, but I decided to ask a more…

Oct 22, 2012

Derangement Can Solve Your Problems

Here is a very fun and surprising result which is not really new, but if you haven't seen it, you really should. The problem looks like this: I had a…

Aug 18, 2012

Rage Faces and Math

A co-worker of mine recently emailed me a link to a rage face comic with the following: 'Is this always true??? I mean the math part... Stephen???' Knowing…

Jul 27, 2012

The Story of Squaring a Triangle

Back in 1998, I overheard my high school math teacher musing to another teacher about the following problem: Given a line segment of unit length, select any…

Jul 19, 2012

Learning to play Mancala

Because I love genetic algorithms and video games, I always wanted to create some artificial intelligence that learns to play a game. My first attempt is…

Jul 15, 2012

Excel Dice Rolling Simulator

Probability distributions have a way of yielding unexpected and counter-intuitive results, so I thought it might be fun and instructive to build a…

Jul 10, 2012

How long will it take to get to Free Parking?

According to the official rules of Monopoly, landing on the Free Parking space results in no action, however, many house rules include some sort of…

Jun 27, 2012

Introduction: Games are fun

This blog will house projects and expositions about the intersection of math, computer science, and video games. For now, enjoy a short AMV created by yours…