I built a layer of clojure code on top of the JNI bindings to get
an entirely functional interface to vba-rerecording. This
interface treats state of the emulator as an immutable object, and
allows me to do everything I could do with the lower level C
interface in a functional manner. Using this functional code, I
wrote search programs that take a particular game-state and try
out different combinations of button presses to get any desired
effect. By combining different styles of search with different
initial conditions