Rewrote stochastic/random_search with CoffeeScript.