Creating a Smarter Membrane: Automatic Code Generation for Modular Self-Reconfigurable Robots.