Total Order Planner
Description: This deliverable is a Total Order Planner, Given a goal, initial state and a set of
actions this planner will design a plan of actions to travel from the initial state to the final
state(which is the goal).
Example:This is what my code outputs on these inputs.
Input
NOACTIONS 4 NOACTIONSEND
ACTION1ACTIONMove,Box,Floor,TablePRECONDITIONSYES,At,Box,Floor;NO,At,Box,TableEFFECTSNO,At,Box,Floor;YES,At,Box,Table ENDACTIONENDACTION1
ACTION2ACTIONMove,Box,Table,FloorPRECONDITIONSYES,At,Box,Table;NO,At,Box,FloorEFFECTSNO,At,Box,Table;YES,At,Box,Floor ENDACTIONENDACTION2
ACTION3ACTIONMove,Ball,Table,FloorPRECONDITIONSYES,At,Ball,Table;NO,At,Ball,FloorEFFECTSNO,At,Ball,Table;YES,At,Ball,Floor ENDACTIONENDACTION3
ACTION4ACTIONMove,Ball,Floor,TablePRECONDITIONSYES,At,Ball,Floor;NO,At,Ball,TableEFFECTSNO,At,Ball,Floor;YES,At,Ball,Table ENDACTIONENDACTION4
INITIALSTATEYES,At,Box,Floor;YES,At,Ball,TableENDINITIALSTATE
STARTGOALYES,At,Box,Table;YES,At,Ball,FloorENDGOAL
Output
CURRENT YESLIST
Array ( [0] => BoxTable [1] => BallFloor )
Move,Ball,Table,Floor
Move,Box,Floor,Table
The above example says that the ball is in the table and the box is in the floor. It also says what the goal of the problem statement is that
the ball should be in the floor
and the box in the table. Given the set of actions the algorithm will choose appropriate action and perform the action, to achieve the goal.
Please download the planner. There are 4 goal files inside the zip folder, to test whichever one please rename it as 'goals.txt'.
|