Algorithms for Modular Self-reconfigurable Robots: Decision Making, Planning, and Learning