Mar 01, 2006 01:04
I spent this afternoon writing some really awesome and really involved code for my thesis. The inspiration is Gillespie's algorithm for exact stochastic simulation of coupled chemical reactions that he put out in 1977. I've been gushing about this all day so I might as well gush to you all as well. The Gillespie algorithm (to the best of my knowledge) is the best way to do what it does, in the sense that any other algorithm is less accurate, less efficient, or both. But it took forever to be discovered. Maybe Dijkstra's shortest path algorithm was like this. I don't know.
But my story. I'd been coding all afternoon and night and finally had something that worked at around 10:30p. I set it loose on a long computation and decided to try thinking, in bed. I woke up at around 12:30a and eagerly went over to my computer to see how things were going. Disappointment. In a few hours, it had only worked through about five iterations. This was in line with the gloomy prediction of how the algorithm would run that I gave to my thesis advisor. It was understandable that my code could run this slowly but it definitely wasn't cool. But then I looked more closely. I had given the command for the computational heavy lifting in the wrong window. I stopped the job and started the right one, in the right window. I'm on fifty-nine iterations right now.
I should get to bed soon, but I'll wait until the endorphins wear off.
coding,
thesis,
incoherent,
algorithms