X-Git-Url: https://ruin.nu/git/?p=popboot.git;a=blobdiff_plain;f=planner.h;h=8d116933f14a6d0122aaa0182ca22f21686ca277;hp=4846fd9166a908b0a0d54b7b592455d24cfce0b5;hb=a1941ebc8535c578f0989f847794917096274f8e;hpb=50f9b29fed8c97deac825a31c35bb7759abca04f diff --git a/planner.h b/planner.h index 4846fd9..8d11693 100644 --- a/planner.h +++ b/planner.h @@ -1,12 +1,39 @@ #ifndef __PLANNER_H__ #define __PLANNER_H__ -#include + +#include +#include +#include +#include +#include +#include "action.h" + +class Node; class Planner { public: + Planner(std::vector actions, Literals init, Literals goal); + ~Planner(); + + void execute(); + protected: - Node start; - std::hash_map addedNodes; + + void makePlan(Node* node); + void addNode(Node* node); + + sem_t _nodes; + sem_t _list; + std::queue _executedNodes; + + Node* _start; + Node* _finish; + __gnu_cxx::hash_map _addedEffects; + __gnu_cxx::hash_map _actionEffects; + Literals _init; + Literals _goal; + std::vector _addedNodes; + std::vector _actions; }; #endif