The answer is... A neural network! Probably a buggy and bad one, but it works. I set it up to play a game that I made in Petit Computer. The boxes are all representations of neurons connected by lines that are dendrites. When one box is filled, it toggles neurons that it's connected to. Unfortunately, my system for optimizing it isn't working, but for now it's cool.