The larvae growing inside Mexican jumping beans could help develop algorithms for micro-robots.