Macro-FF: Improving AI Planning with Automatically Learned Macro-Operators