Use a CSP solver to write the PlanGenerator.