Very cool idea of using a low cost camera sensor to provide feedback on how well the robot is moving. I would guess (not having seen the code) that Matt is using the metric of how far the robot can move to tune parameters for controlling the legs (genetic algorithm or genetic programming).