Conditional and iterative planning