Programming Complex Behavior in DNA-Based Molecular Circuits and Robots