Ruby code for solving the Runaway Robot game on Hacker.org