9 vector<string> stringToVector(string str){
10 vector<string> strings;
12 istringstream ist(str);
14 strings.push_back(str);
20 int main(int argc, char** argv){
23 cout << "Syntax: " << argv[0] << " <file> \"init state\" \"goal state\"" << endl;
27 ifstream file(argv[1]);
29 cerr << "Cannot open input file: " << argv[1] << endl;
33 vector<Action> actions;
39 getline(file,effects);
40 getline(file,precond);
41 cout << exec << ":" << effects << ":" << precond << endl;
42 if (effects == "") continue;
43 actions.push_back(Action(exec, stringToVector(precond), stringToVector(effects)));
45 Planner p(actions, stringToVector(argv[2]), stringToVector(argv[3]));