FLECS: Planning with a Flexible Commitment Strategy