CS823 Reasoning for Intelligent Agents Resit Coursework: Temporal Planning
This coursework requires you to build a temporal and numeric planning problem, generate plans using a temporal planner, and experiment with different features of PDDL2.2.
This coursework has 4 parts:
1. Write a PDDL2.2 domain and problem for the Temporal Logistics Scenario.
Copyright By PowCoder代写 加微信 powcoder
2. Use a temporal planner to find a plan and extend the domain and problem to include delivery deadlines.
3. Use the planner to find an optimal plan that satisfies the deadlines.
4. Using the planner and problem file, find a plan that optimises the alternative quality metric described below.
Each part is described in the sections below.
On MyPlace you will have to submit a single archive containing:
• PDDL domain and problem files.
• A text file with the optimal plan from part 2. (plan_part2.txt)
• A text file with the optimal plan from part 3. (plan_part3_N.txt)
1. Write a domain and problem for the Temporal Logistics Scenario
The first part of the assignment is to write a PDDL domain and problem for the temporal logistics scenario.
The logistics scenario has the following objects:
• 11 ground waypoints, connected together as shown in figure 1. • 1 lighthouse and one sky waypoint.
• 4 packages.
• 2 drivers, 2 trucks, 1 plane, and 1 ship.
The initial state in figure 1 shows the starting locations of all of the objects.
Figure 1: Illustration of the Initial State.
The domain should define not only as set of propositions, but also types and numeric functions. For example:
(:predicates
(robot_at ?v – robot ?wp – waypoint)
(visited ?wp – waypoint)
(:functions
(distance ?a ?b – waypoint)
The durative actions in the domain should model the following details:
• Packages can be loaded into and unloaded from trucks, planes, and boats (10 time units).
• Drivers can walk between connected waypoints (at a speed of 0.5).
• Drivers can get into and out of trucks (10 time units).
• Trucks with drivers can drive between connected waypoints (at a speed of 1).
• The boat and the plane don’t need drivers to move. They can only travel over the blue and yellow edges (connected to the lighthouse and the sky respectively).
• The boat travels at a speed of 1.5.
• The plane travels at a speed of 2.
The problem file should specify the types of the objects, for example:
wp0 wp1 wp2 wp3 wp4 wp5 wp6 wp7 wp8 wp9 – waypoint
kenny – robot
The problem file should also specify the goal condition:
• Packages 1 and 3 are at waypoint wp9. • Packages 2 is at the lighthouse.
• Package 4 is at wp2.
• both drivers are at wp1.
These positions are illustrated in figure 2. Note: The final positions of the vehicles is not important. Submission files: There is nothing to upload to MyPlace for this part of the assignment.
package 3 package 1
75 package 2
Figure 2: Illustration of the Goal State.
2. Use a temporal planner to find a plan and extend the domain and problem to include delivery deadlines
The second part of the assignment is to find an optimal plan, and then set a deadline on package 1 equal to its delivery time in this optimal plan.
Steps for running the planner:
1. Download the planner from MyPlace (OPTIC) and extract it to the folder with your domain and problem.
2. Open a terminal and navigate to the folder with the planner.
3. Run the planner with the following command (assuming that your domain and problem files are named this way):
./OPTIC domain.pddl problem.pddl
You should see output similar to this:
digraph plan {
Step5 [label=”Step 5: (goto_waypoint kenny wp0 wp2):2[20]”,
Step4 [label=”Step 4: (goto_waypoint kenny wp0 wp2):0[20]”,
Step3 [label=”Step 3: (goto_waypoint kenny wp1 wp0):2[1]”,
;;;; Solution Found
; Time 0.00
0.001: (goto_waypoint kenny wp0 wp1) [1.600] ; (10)
1.602: (goto_waypoint kenny wp1 wp0) [1.600] ; (1)
3.203: (goto_waypoint kenny wp0 wp2) [1.600] ; (20)
The first part is a graph of the plan in DOT format. The second part is the PDDL plan. Copy this output from the terminal and save it in a text file. Note: you can also follow the steps posted on MyPlace to run the planner on the lab machines remotely.
Steps for adding the deadline:
You should add a deadline to the problem file (in the initial state) using TILs. Hint: you might need to add a new predicate to the domain that models whether or not a package is allowed to be delivered. A TIL could look like this:
(at 459.102 (not (deliverable package1)))
The deadline should be:
• Only for package 1.
• The deadline should be equal to the time package 1 was delivered in the PDDL plan produced above. • The package should finish unloading at its goal destination on or before the deadline.
Submission files: Your submitted archive should include both domain and problem PDDL files (including the deadline) and also the PDDL plan.
3. Alternative quality metric
The final part of the assignment is to find a plan that optimises a metric.
By experimenting with the deadline in the problem file, you should find the plan that:
1. Minimises the time taken to deliver package 1.
2. Given this, minimises the remaining plan duration.
Hint: you should try this in more than one step, e.g. find a plan for package 1, then use deadlines to find a better one, and so on. Submission files: Your submitted archive should include the new plan with the filename: “plan_part3_N”, where N
is the minimal time to deliver package 1, rounded to the nearest integer.
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com