+
+ if (argc != 4){
+ cout << "Syntax: " << argv[0] << " <file> \"init state\" \"goal state\"" << endl;
+ return 1;
+ }
+
+ ifstream file(argv[1]);
+ if (!file){
+ cerr << "Cannot open input file: " << argv[1] << endl;
+ exit(2);
+ }
+
+ vector<Action> actions;
+ while (!file.eof()){
+ string exec;
+ string precond;
+ string effects;
+ getline(file,exec);
+ getline(file,effects);
+ getline(file,precond);
+ cout << exec << ":" << effects << ":" << precond << endl;
+ if (effects == "") continue;
+ actions.push_back(Action(exec, stringToVector(precond), stringToVector(effects)));
+ }
+ Planner p(actions, stringToVector(argv[2]), stringToVector(argv[3]));