Harvey Mudd College
Two pieces from these years are on the site: a replication of a study of Bach's chord functions (the paper, CS 151, Artificial Intelligence, fall 2013) and Evolving Boids (January 2015).
Evolving Boids
I had been interested for a while in cellular automata and emergent complexity, and the ability for computers to demonstrate how complexity can emerge from an initial set of conditions that appear simple and easy to understand. Conway's Game of Life is a classic example of that. But I felt drawn to take it in a more organic, biologically inspired direction.
The boids was a time period where I was basically just hand coding these projects as one HTML page and one JS file. And it was a little bit of a rejection of these more complicated frameworks that I had been working in. At the time there was some programming language snobbery, and especially snobbery about JavaScript not being a good language. So part of it was me experimenting with the good parts of JavaScript.
What I realized was that I wasn't gonna be interested in fine-tuning the parameters for the boids until they display flocking behavior, because then it wouldn't be an emergent system. So I wanted to figure out a way for them to develop that behavior themselves. I started to do experiments with giving them genomes, which meant I needed to create an environment with selection pressure.
I think the most amusing thing that happened on the project is that, even as I did this, and I just made it this very simple physics equation, the simplest solution is for the boids to just not move at all. If you put no forcing into the system at all, they just learn to stop moving, because then it's much less likely that they'll hit each other.
That discovery kind of frustrated me, because at the end of the day I really wanted something pretty, something that looked like flocks of birds. And realizing that I was gonna have to put my thumb on the scale to get that behavior, even in an evolutionary environment. It was amusing. Humbling, I guess.
Markov modeling the Bach chorales
I was taking music classes at the time, and for this project I wanted to do something surprising and delightful: using Markov models, but not in a domain where you would usually expect them to be used. So the original desire was, of course, to have the computer make music.
As we know now, it took hundred-billion-parameter models with reasoning and reinforcement learning to get to a place where the great, great, great, great, great grandchild of a Markov model could write music. So obviously it wasn't gonna work for my little toy project.
I didn't have nearly enough data in the Bach chorales to train a model to predict all four notes of the next frame of a chorale. Then also I would have to predict things like rests and note durations, and it just seemed hopeless. So I just switched to modeling the chord states. For every frame, I classified it as a chord. And that reduced the complexity of the data by a huge amount, such that the training set size that I had was large enough relative to what I was trying to model that I could get a reasonable output.
Bach is one of the early guys who starts to really use and think about chord progressions. And so I was hoping that that would come out in the results.
What the paper found: it followed Christopher White's method on 371 chorales. A three-state model recovered tonic, pre-dominant and dominant, cycling P → D → T. Larger models hinted at White's finer functions but never gave a stable answer.