Distributed Systems. Silvia Rossi 081. Intelligent

Size: px
Start display at page:

Download "Distributed Systems. Silvia Rossi 081. Intelligent"

Transcription

1 Distributed Systems Silvia Rossi 081 Intelligent

2 30% for attending classes Grading 30% for presenting a research paper 40% for writing and discussing paper (design of a multi-robot system), pages.

3 E.D. Durfee, V.R. Lesser Next week paper Partial global planning: A coordination framework for distributed hypothesis formation. IEEE Trans. On Systems, Man, and Cybernetics, 21(5), Sept. 1991, p

4 Lynne E. Parker Next-next week paper Adaptive Heterogeneous Multi-Robot Teams Neurocomputing 28, 1998, pp.75-92

5 DISTRIBUTED CSP

6 Distributed CSP Each variable is owned by a different agent. The goal is still to find a global variable assignment that meets the constraints, but each agent decides on the value of his own variable with relative autonomy. While he does not have a global view, each agent can communicate with his neighbors in the constraint graph. 6

7 Distributed CSP A distributed algorithm for solving a CSP has each agent engage in some protocol that combines local computation with communication with his neighbors. A good algorithm ensures that such a process terminates with a legal solution (or with a realization that no legal solution exists) and does so quickly. 7

8 Asynchronous Backtracking Algorithm Assumptions: A total ordering on the agents. Each binary constraint is known to both the constrained agents and is checked in the algorithm by the agent with the lower priority between the two. A link in the constraint network is always directed from an agent with higher priority to an agent with lower priority. 8

9 Communication model Processes communicate by sending messages. A process can send messages to other processes iff the process knows the addresses/identifiers of other processes. The delay in delivering a message is finite, though random. F or the transmission between any pair of processes, messages are received in the order in which they were sent. 9

10 Asynchronous Backtracking Algorithm Agents instantiate their variables concurrently and send their assigned values to the agents that are connected to them by outgoing links. All agents wait for and respond to messages. After each update of his assignment, an agent sends his new assignment along all outgoing links. An agent who receives an assignment, tries to find an assignment for his variable that does not violate a constraint with the assignment he received. 10

11 Asynchronous Backtracking Algorithm ok? messages are messages carrying an agent s variable assignment. A i places the received assignment in a data structure called agent_view. A i checks if his current assignment is still consistent with his agent_view. If it is consistent, A i does nothing. If not, then A i searches his domain for a new consistent value. If he finds one, he assigns his variable that value and sends ok? messages to all lower-priority Otherwise, A i backtracks. 11

12 Asynchronous Backtracking Algorithm The backtrack operation is executed by sending a Nogood message. Nogood is an inconsistent partial assignment; The Nogood consists of A i s agent_view; The Nogood is sent to the agent with the lowest priority among the agents whose assignments are included in the inconsistent tuple. A i who sends a Nogood message to agent A j assumes that A j will change his assignment. Therefore, A i removes from his agent_view the assignment of A j ; A i makes an attempt to find an assignment for A j s variable that is consistent with the updated agent_view. 12

13 Asynchronous Backtracking Algorithm when received (Ok?, (Aj, dj )) do add (Aj, dj ) to agent_view check_agent_view when received (Nogood, nogood) do add nogood to Nogood list forall (Ak, dk) nogood, if Ak is not a neighbor of Ai do add (Ak, dk) to agent_view request Ak to add Ai as a neighbor add Ak as a neighbor check_agent_view 13

14 Asynchronous Backtracking Algorithm procedure check_agent_view when agent_view and current_value are inconsistent do if no value in Di is consistent with agent_view then backtrack else select d Di consistent with agent_view current_value d send (ok?, (Ai, d)) to lowerpriority neighbors 14

15 Asynchronous Backtracking Algorithm procedure backtrack nogood some inconsistent set, using hyperresolution or similar procedure if nogood is the empty set then broadcast to other agents that there is no solution terminate this algorithm else select (Aj, dj) nogood where Aj has the lowest priority in nogood send (Nogood, nogood) to Aj remove (Aj, dj) from agent_view check_agent_view 15

16 Asynchronous Backtracking Algorithm Complete 16

17 Asynchronous Backtracking Algorithm {red, blue} X 1 X 2 {red, blue} X 1 X 2 X 1 X 3 X 2 X 3 X 3 {red, blue}

18 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2, blue)} X 1 X 2 X 3 {cur_val,(x 3, blue)}

19 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} (ok?,(x1,blue)) {cur_val,(x 2, blue)} X 1 X 2 (ok?,(x1,blue)) (ok?,(x2,blue)) X 3 {cur_val,(x 3,blue)}

20 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,blue)} {loc_view,(x 1,blue)} X 1 X 2 X 3 {cur_val,(x 3,blue)} {loc_view,(x 1, blue),(x 2,blue)}

21 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,blue)} {loc_view,(x 1,blue)} X 1 X 2 check_agent_view X 3 {cur_val,(x 3,blue)} {loc_view,(x 1, blue),(x 2,blue)}

22 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,blue)} {loc_view,(x 1,blue)} X 1 X 2 X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,blue)}

23 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,red)} {loc_view,(x 1,blue)} X 1 X 2 (ok?,(x2,red)) X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,blue)}

24 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,red)} {loc_view,(x 1,blue)} X 1 X 2 X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

25 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,red)} {loc_view,(x 1,blue)} X 1 X 2 check_agent_view X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

26 Asynchronous Backtracking Algorithm {cur_val,(x 1, blue)} {cur_val,(x 2,red)} {loc_view,(x 1,blue)} X 1 X 2 (nogood, (X1,blue), (X2,red)) X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

27 Asynchronous Backtracking Algorithm {cur_val,(x {cur_val,(x 1, blue)} 2,red)} {loc_view,(x 1,blue)} {nogood,(x1,blue), (X2,red)} X 1 X 2 X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

28 Asynchronous Backtracking Algorithm {cur_val,(x {cur_val,(x 1, blue)} 2,red)} {loc_view,(x 1,blue)} (nogood, (X1,blue)) {nogood,(x1,blue), (X2,red)} X 1 X 2 X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

29 {cur_val,(x 1, blue)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm X 1 X 2 {cur_val,(x 2,red)} {loc_view,(x 1,blue)} {nogood,(x1,blue), (X2,red)} X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

30 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm (ok?,(x1,red)) X 1 X 2 {cur_val,(x 2,red)} {loc_view,(x 1,blue)} {nogood,(x1,blue), (X2,red)} (ok?,(x1,red)) X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

31 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm (ok?,(x1,red)) X 1 X 2 {cur_val,(x 2,red)} {loc_view,(x 1,blue)} {nogood,(x1,blue), (X2,red)} (ok?,(x1,red)) X 3 {cur_val,(x 3,red)} {loc_view,(x 1, blue),(x 2,red)}

32 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm X 1 X 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} X 3 {cur_val,(x 3,blue)} {loc_view,(x 1, red),(x 2,red)}

33 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm X 1 X 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} (ok?,(x2,blue)) X 3 {cur_val,(x 3,blue)} {loc_view,(x 1, red),(x 2,blue)}

34 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm X 1 X 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} (nogood, (X1,red), (X2,blue)) X 3 {cur_val,(x 3,blue)} {loc_view,(x 1, red),(x 2,blue)}

35 {cur_val,(x 1, red)} {nogood,(x1,blue)} Asynchronous Backtracking Algorithm X 1 X 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} {nogood,(x1,red), (X2,blue)} X 3 {cur_val,(x 3,red)} {loc_view,(x 1, red),(x 2,blue)}

36 Asynchronous Backtracking Algorithm {cur_val,(x 1, red)} {nogood,(x1,blue)} (nogood, (X1,red)) X 1 X 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} {nogood,(x1,red), (X2,blue)} X 3 {cur_val,(x 3,red)} {loc_view,(x 1, red),(x 2,blue)}

37 Asynchronous Backtracking Algorithm {cur_val,(x 1, red)} {nogood,(x1,blue)} {nogood,(x1,red)} X 1 X {nogood{}} 2 {cur_val,(x 2,blue)} {loc_view,(x 1,red)} {nogood,(x1,blue), (X2,red)} {nogood,(x1,red), (X2,blue)} X 3 {cur_val,(x 3,red)} {loc_view,(x 1, red),(x 2,blue)}

38 Asynchronous Backtracking Algorithm {cur_val,(x 1 =blue)} {cur_val,(x 2 =blue)} X 1 X 2 X 3 {cur_val,(x 3 =blue)}

39 39

40 40

41 41

42 The four queens problem 42

43 The four queens problem A1 = 1 A2 =1 A3 1 A4 sends a Nogood to A3 and removes the assignment of A3 from his Agent_View. Then, he assigns the value 2 43

44 The four queens problem A1 = 1 A2 3 44

45 The four queens problem A1 = 1 A2 = 4 A3 4 45

46 The four queens problem A1 = 1 A2 = 4 A3 2 46

47 The four queens problem 47

48 The four queens problem 48

49 The four queens problem 49

50 The four queens problem 50

51 PLANNING

52 Linear Planning Limitations Assumes goal independence and goals are dealt with linearly: it does not work on next goal until a plan for the current one is found. Incompleteness: there is a solution but the planner can t find it. Non-optimality: can t find optimal solution (Sussman s Anomaly).

53 State-space planning We initially have a space of situations (where you are, what you have, etc.) The plan is a solution found by searching through the situations to get to the goal A progression planner searches forward from initial state to goal state A regression planner searches backward from the goal Ideally this leads to reduced branching you are only considering things that are relevant to the goal

54 Plan-space planning An alternative is to search through the space of plans, rather than situations. Start from a partial plan which is expanded and refined until a complete plan that solves the problem is generated. Refinement operators add constraints to the partial plan and modification operators for other changes. We can still use STRIPS-style operators: Op(ACTION: RightShoe, PRECOND: RightSockOn, EFFECT: RightShoeOn) Op(ACTION: RightSock, EFFECT: RightSockOn) Op(ACTION: LeftShoe, PRECOND: LeftSockOn, EFFECT: LeftShoeOn) Op(ACTION: LeftSock, EFFECT: leftsockon) could result in a partial plan of [RightShoe, LeftShoe]

55 Partial-order planning A linear planner builds a plan as a totally ordered sequence of plan steps A non-linear planner (aka partial-order planner) builds up a plan as a set of steps with some temporal constraints constraints of the form S1<S2 if step S1 must comes before S2. One refines a partially ordered plan (POP) by either: adding a new plan step, or adding a new constraint to the steps already in the plan. A POP can be linearized (converted to a totally ordered plan) by topological sorting

56 Least commitment Non-linear planners embody the principle of least commitment only choose actions, orderings, and variable bindings that are absolutely necessary, leaving other decisions till later avoids early commitment to decisions that don t really matter A linear planner always chooses to add a plan step in a particular place in the sequence A non-linear planner chooses to add a step and possibly some temporal constraints

57 Non-linear plan A non-linear plan consists of (1) A set of steps {S 1, S 2, S 3, S 4 } Each step has an operator description, preconditions and post-conditions (2) A set of causal links { (S i,c,s j ) } Meaning a purpose of step S i is to achieve precondition C of step S j (3) A set of ordering constraints { S i <S j } if step S i must come before step S j

58 Causal Link: Action Ac (consumer) has precondition Q that is established in the plan by Ap(producer). 58

59 Step At threatens link (Ap, Q, Ac) if: 1. At has (not Q) as an effect, and 2. At could come between Ap and Ac, i.e. O u (Ap< At< Ac) is consistent 59

60 Soluzione Una soluzione è un piano completo e consistente In un piano completo ogni precondizione di un passo viene raggiunta da qualche altro passo. Un passo raggiunge una condizione se la condizione è uno degli effetti del passo e se nessun altro passo può eliminare la condizione. In un piano consistente non c è alcuna contraddizione nell ordinamento o nei vincoli sui legami

61 The initial plan Every plan starts the same way S1:Start Initial State Goal State S2:Finish

62 InitialPlan For uniformity, represent initial state and goal with two special actions: Start: no preconditions, initial state aseffects, must be the first step in the plan. Finish: no effects Goals as preconditions must be the last step in the plan.

63 Trivial example Operators: Op(ACTION: RightShoe, PRECOND: RightSockOn, EFFECT: RightShoeOn) Op(ACTION: RightSock, EFFECT: RightSockOn) Op(ACTION: LeftShoe, PRECOND: LeftSockOn, EFFECT: LeftShoeOn) Op(ACTION: LeftSock, EFFECT: leftsockon) S1:Start RightShoeOn ^ LeftShoeOn S2:Finish Steps: {S1:[Op(Action:Start)], S2:[Op(Action:Finish, Pre: RightShoeOn^LeftShoeOn)]} Links: {} Orderings: {S1<S2}

64 Solution Start Left Sock Right Sock Left Shoe Right Shoe Finish

65 Linearizzazioni

66 POP POP is sound and complete POP Plan is a solution if: All preconditions are supported (by causal links), i.e., no open conditions. No threats Consistent temporal ordering By construction, the POP algorithm reaches a solution plan 66

67 Example Op(ACTION: START, PRECONDITION: nil, EFFECT: AT(HOME) and SELLS(STORE,DRILL) and SELLS(SUPER,MILK) and SELLS(SUPER, BREAD)) Op(ACTION: FINISH, PRECONDITION: HAVE(DRILL) and HAVE(MILK) and HAVE(BREAD) and AT(HOME), EFFECT: nil) Op(ACTION: GO(x), PRECONDITION: AT(x), EFFECT: AT(y) and not AT(x)) Op(ACTION: BUY(x), PRECONDITION: AT(SHOP) and SELLS(SHOP,x), EFFECT: HAVE(x)) 67

68 InitialPlan 68

69 69

70 70

71 71

72 Corretto? 72

73 Piani con condizioni 73

74 Demotion 74

75 Promotion 75

76 76

77 77

78 Piano Totale 78

79 Heuristics Heuristics for selecting plans: Number of steps N Unsolved preconditions OP Often uses an algorithm A * with heuristics: f(p)=n(p) + OP(P) 79

80 Non-linear plan A non-linear plan consists of (1) A set of steps {S 1, S 2, S 3, S 4 } Each step has an operator description, preconditions and post-conditions (2) A set of causal links { (S i,c,s j ) } Meaning a purpose of step S i is to achieve precondition C of step S j (3) A set of ordering constraints { S i <S j } if step S i must come before step S j A non-linear plan is completeiff Every step mentioned in (2) and (3) is in (1) If S j has prerequisite C, then there exists a causal link in (2) of the form (S i,c,s j ) for some S i If (S i,c,s j ) is in (2) and step S k is in (1), and S k threatens (S i,c,s j ) (makes C false), then (3) contains either S k <S i or S j >S k

81 Consistent Plan Consistent plan: No cycles in the ordering constraint; No conflicts with the causal links. A consistent plan with no open precondition is a solution 81

82 1) The initial plan contains Start and Finish the ordering constraint Start < Finish, no causal links all the preconditions in Finish as open preconditions. 82

83 2) The successor function arbitrarily picks one open precondition p on an action B and generates a successor plan for every possible consistent way of choosing an action A that achieves p. Consistency is enforced as follows: 1. The causal link A ->p B and the ordering constraint A < B are added to the plan. Action A may be an existing action in the plan or a new one. If it is new, add it to the plan and also add Start < A and A < Finish. 83

84 2) The successor function arbitrarily picks one open precondition p on an action B and generates a successor plan for every possible consistent way of choosing an action A that achieves p. 2. Resolve conflicts between the new causal link and all existing actions. A conflict between A ->p B and C is resolved by making C occur at some time outside the protection interval B < C C < A We add successor states for either or both if they result in consistent plans 84

85 3) The goal test checks whether a plan is a solution to the original planning problem. Because only consistent plans are generated, the goal test just needs to check that there are no open preconditions. 85

86 POP 86

87 Nonlinear Planning P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY P: ON(B,A) ON(C,B) -: +:

88 Open preconditions The plan is incomplete P: HOLDING(B) CLEAR(A) -: CLEAR(A) HOLDING(B) +: ON(B,A) CLEAR(B) HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY P: ON(B,A) ON(C,B) -: +:

89 P: HOLDING(B) CLEAR(A) -: CLEAR(A) HOLDING(B) +: ON(B,A) CLEAR(B) HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) P: HOLDING(C) CLEAR(B) -: CLEAR(B) HOLDING(C) +: ON(C,B) CLEAR(C) HANDEMPTY P: ON(B,A) ON(C,B) -: +:

90 P: HOLDING(B) CLEAR(A) -: CLEAR(A) HOLDING(B) +: ON(B,A) CLEAR(B) HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) P: ON(B,A) ON(C,B) -: P: HOLDING(C) +: CLEAR(B) -: CLEAR(B) HOLDING(C) +: ON(C,B) CLEAR(C) HANDEMPTY Pickup(C)

91 Other possible achiever Pickup(B) Achievers Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Threat Stack(C,B) P: CLEAR(B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

92 Pickup(B) P: CLEAR(B) Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) P: CLEAR(B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

93 A consistent plan is one in which there is no cycle and no conflict between achievers and threats Pickup(B) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY A conflict can be eliminated by constraining the ordering among the actions or by adding new actions Note the similarity with constraint propagation Stack(B,A) Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

94 Pickup(B) P: HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

95 Pickup(B) P: HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) Pickup(C) P: HANDEMPTY P: ON(B,A) ON(C,B) -: +:

96 ~ Most-constrained-variable heuristic in CSP choose the unachieved precondition that can be satisfied in the fewest number of ways ON(C,TABLE) Pickup(B) P: HANDEMPTY CLEAR(B) ON(B,TABLE) Stack(B,A) P: HOLDING(B) CLEAR(A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Stack(C,B) P: HOLDING(C) CLEAR(B) Pickup(C) P: HANDEMPTY CLEAR(C) ON(C,TABLE) P: ON(B,A) ON(C,B) -: +:

97 Pickup(B) Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Putdown(C) Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

98 Pickup(B) Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Unstack(C,A) Putdown(C) Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

99 Pickup(B) P: HANDEMPTY Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Unstack(C,A) Putdown(C) Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

100 Pickup(B) Stack(B,A) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Unstack(C,A) Putdown(C) Stack(C,B) Pickup(C) P: ON(B,A) ON(C,B) -: +:

101 Pickup(B) P: -: +: ON(A,TABLE) ON(B,TABLE) ON(C,A) CLEAR(B) CLEAR(C) HANDEMPTY Unstack(C,A) Putdown(C) P: HOLDING(C) P: HANDEMPTY CLEAR(B) ON(B,TABLE) The plan is complete because every precondition of every step is added by some previous step, and no intermediate step deletes it P: HANDEMPTY CLEAR(C) ON(C,A) Stack(B,A) P: HOLDING(B) CLEAR(A) Stack(C,B) P: HOLDING(C) CLEAR(B) Pickup(C) P: HANDEMPTY CLEAR(C) ON(C,TABLE) P: ON(B,A) ON(C,B) -: +:

102 (R&N:11. ) FROM STRIPS TO PDDL 102

103 PDDL Planning Domain DefinitionLanguage The STRIPS language is very simple The language was extended, resulting into ADL, which incorporates among others: universal and existential quantification Conditional effects A common language to all planners is needed for problem and domain specification, and PDDL has been created There are many versions up to version PDDL 2.1 (there are successors), that allows among others: specification of execution cost for operators Variable types for operators Continuous change 103

104 PDDL - Predicates Predicate defines the property of an object, which can be TRUE of FALSE Example: Cloudy Big Yellow Use in PDDL Example: (Yellow T-Shirt) 104

105 Variables / Types PDDL?iterator int?bigstructure mystruct In PDDL data types are not predefined :types int mystruct 105

106 (and ( Yellow TShirt ) ( Big Shoes ) ) ( not ( Yellow Shoes ) ) ( and ( Yellow TShirt ) ( not ( Yellow Shoes ) ) ) PDDL not and or 106

107 PDDL - ForAll Let the all TShirts in this world be Yellow (:typestshirt) (:predicates (Yellow?things TShirt) ) ( forall (?things TShirt) (Yellow?things) ) This implies that the property Yellow should be true for all objects in the domain that are of type TShirt 107

108 PDDL - Exists If there exists even one Yellow shoe (:typesshoes) (:predicates (Yellow?things Shoes) ) ( exists (?things Shoes) (Yellow?things) ) This evaluates to TRUE if there exists one or more objects which has the property Yellow. 108

109 PDDL Domain Definition Requirements packages to be used Types user defined types Constants constant to be used in this domain Predicates definition of truth statements Action - operators Preconditions predicates that must be TRUE before this operator is applied Effects predicates that become true after this operator is applied 109

110 Logistic Domain (define (domain logistics) (:requirements :strips :typing) (:types truck airplane-vehicle package vehicle-physobj airport location -place city place physobj-object) (:predicates (in-city?loc -place?city -city) (at?obj-physobj?loc-place) (in?pkg -package?veh -vehicle))...) 110

111 Operators (:action load-truck...) (:action load-airplane...) (:action unload-truck...) (:action unload-airplane...) (:action drive-truck...) (:action fly-airplane :parameters (?p -airplane?s -airport?d -airport) :precondition (and (at?p?s) (not (=?s?d))) :effect (and (at?p?d) (not (at?p?s)))) 111

112 PDDL Problem Definition Define the problem to be solved Initial State define predicates which are true at the beginning of the problem Goal State - define predicates which are true at the end of the problem 112

113 Problem Definition (define (problem log1) (:domain logistics) (:objects (ob0 ob1 ob2 -package) (c2 c1 c0 -city) (po2 po1 po0 -location) (a2 a1 a0 -airport) (tr2 tr1 tr0 -truck) (pl1 pl2 -airplane)) (:init (in-city a2 c2) (in-city po2 c2) (at tr2 po2) (in-city a1 c1) (in-city po1 c1) (at tr1 po1) (in-city a0 c0) (in-city po0 c0) (at tr0 po0) (at ob1 a1) (in ob0 pl0) (in ob2 tr1) (at pl2 a1) (at pl1 a2)) (:goal (at-obj ob1 a2))) 113

114 RicherOperators (define (domain BriefcaseDomain) (:requirements :strips :equality :typing :conditional-effects) (:types location physicalobject) (constants (Briefcase physicalobject) (predicates (in?x -physicalobject?l -location) (into?x?y -physicalobject) ) (:action MoveBriefcase :parameters (?m?l location) :precondition (and (in Briefcase?m) (not (=?m?l))) :effect (and (in Briefcase?l) (not (en Briefcase?m)) (forall (?z) (when (and (into?z Briefcase ) (not (=?z Briefcase ))) (and (in?z?l) (not (in?z?m)))))) ) 114

115 (R&N:11.4,11.5,11.6) MORE ON GRAPHPLAN 115

116 Planning graph Directed, leveled graph with alternating layers of nodes Odd layers represent candidate propositions that might hold at time I Even layers represent candidate actions that we might possibly execute at time I, including maintain actions We can only execute one real action at any step, but the data structure keeps track of which actions are possibilities

117 Basic idea Construct a graph that encodes constraints on possible plans Use this planning graph to constrain search for a valid plan Planning graph can be built for each problem in relatively short time

118 Problem handled by GraphPlan STRIPS operators: conjunctive preconditions, no conditional or universal effects, no negations Finds shortest plans (by some definition) Sound, complete and will terminate with failure if there is no plan.

119 Planning graph Nodes divided into levels, arcs go from one level to the next For each time period, a state level and an action level Arcs represent preconditions, adds and deletes

120 What actions and what literals? Add an action in level Ai if all its preconditions are present in level Pi Add a precondition in level Pi if it is the effect of some action in level Ai-1 (including no-ops frame problem) Level P0 has all the literals from the initial state

121 Simple NASA domain Literals: at X L X is at location L fuel R rocket has fuel in X R X is in the rocket Actions: load X L load X onto rocket at location L (X and R must be at L) unload X L unload X from rocket at location L (R must be at L, X must be in L) move L L move rocket from L to L (R must be at L and have fuel; moving uses up the fuel) Graph representation: Solid black lines: preconditions/effects Dotted red lines: negated preconditions/effects

122 Example planning graph at A L load A L at A L load A L at A L at B L load B L at B L load B L at B L at R L move L P at R L move L P at R L fuel R fuel R fuel R unload A P at A P in A R in B R move P L in A R in B R unload B P at B P at R P at R P Props Time 1 Actions Time 1 Props Time 2 Actions Time 2 Props Time 3 Actions Time 3 Goals

123 Exclusion relations (mutexes) Two actions (or literals) are mutually exclusive at some stage if no valid plan could contain both. Can quickly find and mark some mutexes: Inconsistent Effects: one action negates an effect of the other Interference: One of the effects of one action is the negation of the precondition of the other Competing needs: If some precond of one action is mutex with a precond of the other action Inconsistent support: Two propositions are mutex if all ways of creating them both are mutex

124 Example planning graph at A L at B L at R L fuel R load A L at A L nop load B L at B L nop move L P at R L nop fuel R Inconsistent nop effects in A R in B R load A L nop load B L nop move L P nop nop nop move P L nop at A L at B L at R L fuel R in A R in B R unload A P unload B P at A P at B P at R P nop at R P Props Time 1 Actions Time 1 Props Time 2 Actions Time 2 Props Time 3 Actions Time 3 Goals

125 Example planning graph at A L at B L at R L fuel R load A L nop load B L nop move L P nop nop at A L at B L at R L fuel R in A R in B R load A L nop load B L nop move L P nop nop nop move P L nop at A L at B L at R L fuel R in A R in B R unload A P unload B P at A P at B P at R P nop at R P Props Time 1 Actions Time 1 Props Time 2 Actions Time 2 Props Time 3 Actions Time 3 Goals

126 A slightly different planning graph at A L at B P at R L fuel R Interference load A L nop nop move L P nop nop at A L at B P at R L fuel R in A R load A L nop load B P nop move L P nop nop nop move P L nop at A L at B L at R L Competing needs fuel R unload A P in A R unload B P in B R at A P at B P Inconsistent support at R P nop at R P Props Time 1 Actions Time 1 Props Time 2 Actions Time 2 Props Time 3 Actions Time 3 Goals

127 Mutex: Summary Actions A,B are mutex at level i if no valid plan could possibly contain both at i: inconsistent effects: A s effects negate one of B s effects interference: A s effects delete one of B s preconditions, or vice-versa competing needs: A & B have mutex preconditions Propositions P,Q are mutex at level i if no valid plan could possibly contain both at i inconsistent support: If at i, all ways to achieve P exclude all ways to achieve Q

128 GraphPlan algorithm (without termination) Grow the planning graph (PG) until all goals are reachable and not mutex. (If PG levels off first, fail) Search the PG for a valid plan If none found, add a level to the PG and try again

129 Valid plans A valid plan is a planning graph where: Actions at the same level don t interfere (delete each other s preconditions or add effects) Each action s preconditions are made true by the plan Goals are satisfied

130 Extending the planning graph Action level: For each possible instantiation of each operator (including no-ops), add if all of its preconditions are in the previous level and no two are mutex. Proposition level: Add all effects of actions in previous level (including no-ops). Mark pairs of propositions mutex if all ways to create one are mutex of all ways to create the other

131 Creating the planning graph is usually Theorem 1: fast The size of the t-level PG and the time to create it are polynomial in t, n (= number of objects), m (= number of operators) and p (= propositions in the initial state)

132 Searching for a plan Backward chain on the planning graph Complete all goals at one level before going back: At each level, pick a subset of actions to achieve the goals that are not mutex. Their preconditions become the goals at the earlier level. Build subset by picking each goal and choosing an action to add. Use one already selected if possible. Do forward checking on remaining goals.

133 SATplan Formulate the planning problem as a CSP Assume that the plan has k actions Create a binary variable for each possible action a: Action(a,i) (TRUE if action a is used at step i) Create variables for each proposition that can hold at different points in time: Proposition(p,i) (TRUE if proposition p holds at step i)

134 Constraints Only one action can be executed at each time step (XOR constraints) Constraints describing effects of actions Persistence: if an action does not change a proposition p, then p s value remains unchanged A proposition is true at step i only if some action (possibly a maintain action) made it true Constraints for initial state and goal state

135 Planning as CSP Constraint-satisfaction problem (CSP) Given: set of discrete variables, domains of the variables, and constraints on the specific values a set of variables can take in combination, Find an assignment of values to all the variables which respects all constraints Compile the planning problem as a constraintsatisfaction problem (CSP) Use the planning graph to define a CSP

136 Representing the Planning Graph as a CSP

137 Summary: classical planning Representations in planning Representation of action: preconditions + effects Approaches: State-space search Plan-space search Constraint-based search

Planning. Some material taken from D. Lin, J-C Latombe

Planning. Some material taken from D. Lin, J-C Latombe RN, Chapter 11 Planning Some material taken from D. Lin, J-C Latombe 1 Logical Agents Reasoning [Ch 6] Propositional Logic [Ch 7] Predicate Calculus Representation [Ch 8] Inference [Ch 9] Implemented Systems

More information

Silvia Rossi! Planning. Lezione n.! Corso di Laurea:! Informatica! Insegnamento:! Sistemi! multi-agente! ! A.A !

Silvia Rossi! Planning. Lezione n.! Corso di Laurea:! Informatica! Insegnamento:! Sistemi! multi-agente!  ! A.A ! Silvia Rossi! Planning 4 Lezione n.! Corso di Laurea:! Informatica! Insegnamento:! Sistemi! multi-agente! Email:! silrossi@unina.it! A.A. 2014-2015! Agent Planning! (R&N:11.1,11.2) Additional reading:

More information

Planning II. Introduction to Artificial Intelligence CSE 150 Lecture 12 May 15, 2007

Planning II. Introduction to Artificial Intelligence CSE 150 Lecture 12 May 15, 2007 Planning II Introduction to Artificial Intelligence CSE 150 Lecture 12 May 15, 2007 Administration Your second to last Programming Assignment is up - start NOW, you don t have a lot of time The PRIZE:

More information

Planning. Introduction

Planning. Introduction Planning Introduction Planning vs. Problem-Solving Representation in Planning Systems Situation Calculus The Frame Problem STRIPS representation language Blocks World Planning with State-Space Search Progression

More information

3. Knowledge Representation, Reasoning, and Planning

3. Knowledge Representation, Reasoning, and Planning 3. Knowledge Representation, Reasoning, and Planning 3.1 Common Sense Knowledge 3.2 Knowledge Representation Networks 3.3 Reasoning Propositional Logic Predicate Logic: PROLOG 3.4 Planning Planning vs.

More information

Plan Generation Classical Planning

Plan Generation Classical Planning Plan Generation Classical Planning Manuela Veloso Carnegie Mellon University School of Computer Science 15-887 Planning, Execution, and Learning Fall 2016 Outline What is a State and Goal What is an Action

More information

3. Knowledge Representation, Reasoning, and Planning

3. Knowledge Representation, Reasoning, and Planning 3. Knowledge Representation, Reasoning, and Planning 3.1 Common Sense Knowledge 3.2 Knowledge Representation Networks 3.3 Reasoning Propositional Logic Predicate Logic: PROLOG 3.4 Planning Introduction

More information

Primitive goal based ideas

Primitive goal based ideas Primitive goal based ideas Once you have the gold, your goal is to get back home s Holding( Gold, s) GoalLocation([1,1], s) How to work out actions to achieve the goal? Inference: Lots more axioms. Explodes.

More information

INF Kunstig intelligens. Agents That Plan. Roar Fjellheim. INF5390-AI-06 Agents That Plan 1

INF Kunstig intelligens. Agents That Plan. Roar Fjellheim. INF5390-AI-06 Agents That Plan 1 INF5390 - Kunstig intelligens Agents That Plan Roar Fjellheim INF5390-AI-06 Agents That Plan 1 Outline Planning agents Plan representation State-space search Planning graphs GRAPHPLAN algorithm Partial-order

More information

Introduction to Planning COURSE: CS40002

Introduction to Planning COURSE: CS40002 1 Introduction to Planning COURSE: CS40002 Pallab Dasgupta Professor, Dept. of Computer Sc & Engg 2 Outline Planning versus Search Representation of planning problems Situation calculus STRIPS ADL Planning

More information

Planning. Planning. What is Planning. Why not standard search?

Planning. Planning. What is Planning. Why not standard search? Based on slides prepared by Tom Lenaerts SWITCH, Vlaams Interuniversitair Instituut voor Biotechnologie Modifications by Jacek.Malec@cs.lth.se Original slides can be found at http://aima.cs.berkeley.edu

More information

Planning (What to do next?) (What to do next?)

Planning (What to do next?) (What to do next?) Planning (What to do next?) (What to do next?) (What to do next?) (What to do next?) (What to do next?) (What to do next?) CSC3203 - AI in Games 2 Level 12: Planning YOUR MISSION learn about how to create

More information

Intelligent Systems. Planning. Copyright 2010 Dieter Fensel and Ioan Toma

Intelligent Systems. Planning. Copyright 2010 Dieter Fensel and Ioan Toma Intelligent Systems Planning Copyright 2010 Dieter Fensel and Ioan Toma 1 Where are we? # Title 1 Introduction 2 Propositional Logic 3 Predicate Logic 4 Reasoning 5 Search Methods 6 CommonKADS 7 Problem-Solving

More information

Classical Planning. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Classical Planning. CS 486/686: Introduction to Artificial Intelligence Winter 2016 Classical Planning CS 486/686: Introduction to Artificial Intelligence Winter 2016 1 Classical Planning A plan is a collection of actions for performing some task (reaching some goal) If we have a robot

More information

Planning (Chapter 10)

Planning (Chapter 10) Planning (Chapter 10) http://en.wikipedia.org/wiki/rube_goldberg_machine Planning Example problem: I m at home and I need milk, bananas, and a drill. What do I do? How is planning different from regular

More information

Planning. Introduction

Planning. Introduction Introduction vs. Problem-Solving Representation in Systems Situation Calculus The Frame Problem STRIPS representation language Blocks World with State-Space Search Progression Algorithms Regression Algorithms

More information

Planning. Why not standard search? What is Planning. Planning language. Planning 1. Difficulty of real world problems

Planning. Why not standard search? What is Planning. Planning language. Planning 1. Difficulty of real world problems Planning Based on slides prepared by Tom Lenaerts SWITCH, Vlaams Interuniversitair Instituut voor Biotechnologie Modifications by Jacek.Malec@cs.lth.se Original slides can be found at http://aima.cs.berkeley.edu

More information

Planning Algorithms Properties Soundness

Planning Algorithms Properties Soundness Chapter MK:VI III. Planning Agent Systems Deductive Reasoning Agents Planning Language Planning Algorithms State-Space Planning Plan-Space Planning HTN Planning Complexity of Planning Problems Extensions

More information

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2014

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2014 Set 9: Planning Classical Planning Systems ICS 271 Fall 2014 Planning environments Classical Planning: Outline: Planning Situation calculus PDDL: Planning domain definition language STRIPS Planning Planning

More information

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2013

Set 9: Planning Classical Planning Systems. ICS 271 Fall 2013 Set 9: Planning Classical Planning Systems ICS 271 Fall 2013 Outline: Planning Classical Planning: Situation calculus PDDL: Planning domain definition language STRIPS Planning Planning graphs Readings:

More information

Planning as Search. Progression. Partial-Order causal link: UCPOP. Node. World State. Partial Plans World States. Regress Action.

Planning as Search. Progression. Partial-Order causal link: UCPOP. Node. World State. Partial Plans World States. Regress Action. Planning as Search State Space Plan Space Algorihtm Progression Regression Partial-Order causal link: UCPOP Node World State Set of Partial Plans World States Edge Apply Action If prec satisfied, Add adds,

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Lecturer 7 - Planning Lecturer: Truong Tuan Anh HCMUT - CSE 1 Outline Planning problem State-space search Partial-order planning Planning graphs Planning with propositional logic

More information

Commitment Least you haven't decided where to go shopping. Or...suppose You can get milk at the convenience store, at the dairy, or at the supermarket

Commitment Least you haven't decided where to go shopping. Or...suppose You can get milk at the convenience store, at the dairy, or at the supermarket Planning as Search-based Problem Solving? Imagine a supermarket shopping scenario using search-based problem solving: Goal: buy milk and bananas Operator: buy Heuristic function: does = milk

More information

Vorlesung Grundlagen der Künstlichen Intelligenz

Vorlesung Grundlagen der Künstlichen Intelligenz Vorlesung Grundlagen der Künstlichen Intelligenz Reinhard Lafrenz / Prof. A. Knoll Robotics and Embedded Systems Department of Informatics I6 Technische Universität München www6.in.tum.de lafrenz@in.tum.de

More information

Artificial Intelligence. Planning

Artificial Intelligence. Planning Artificial Intelligence Planning Planning Planning agent Similar to previous problem solving agents Constructs plans that achieve its goals, then executes them Differs in way it represents and searches

More information

1 What is Planning? automatic programming. cis716-spring2004-parsons-lect17 2

1 What is Planning? automatic programming. cis716-spring2004-parsons-lect17 2 PLANNING 1 What is Planning? Key problem facing agent is deciding what to do. We want agents to be taskable: give them goals to achieve, have them decide for themselves how to achieve them. Basic idea

More information

Planning. What is Planning. Why not standard search? Planning 1

Planning. What is Planning. Why not standard search? Planning 1 Planning Based on slides prepared by Tom Lenaerts SWITCH, Vlaams Interuniversitair Instituut voor Biotechnologie Modifications by Jacek.Malec@cs.lth.se Original slides can be found at http://aima.cs.berkeley.edu

More information

Creating Admissible Heuristic Functions: The General Relaxation Principle and Delete Relaxation

Creating Admissible Heuristic Functions: The General Relaxation Principle and Delete Relaxation Creating Admissible Heuristic Functions: The General Relaxation Principle and Delete Relaxation Relaxed Planning Problems 74 A classical planning problem P has a set of solutions Solutions(P) = { π : π

More information

Planning Chapter

Planning Chapter Planning Chapter 11.1-11.3 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer Typical BW planning problem A C B A B C Blocks world The blocks world is a micro-world consisting of a

More information

Planning. Artificial Intelligence 1: Planning. What is Planning. General language features. Planning language. Difficulty of real world problems

Planning. Artificial Intelligence 1: Planning. What is Planning. General language features. Planning language. Difficulty of real world problems Planning Artificial Intelligence 1: Planning Lecturer: Tom Lenaerts SWITCH, Vlaams Interuniversitair Instituut voor Biotechnologie The Planning problem Planning with State-space search Partial-order planning

More information

CS 621 Artificial Intelligence. Lecture 31-25/10/05. Prof. Pushpak Bhattacharyya. Planning

CS 621 Artificial Intelligence. Lecture 31-25/10/05. Prof. Pushpak Bhattacharyya. Planning CS 621 Artificial Intelligence Lecture 31-25/10/05 Prof. Pushpak Bhattacharyya Planning 1 Planning Definition : Planning is arranging a sequence of actions to achieve a goal. Uses core areas of AI like

More information

Constraint Satisfaction Problems Part 2

Constraint Satisfaction Problems Part 2 Constraint Satisfaction Problems Part 2 Deepak Kumar October 2017 CSP Formulation (as a special case of search) State is defined by n variables x 1, x 2,, x n Variables can take on values from a domain

More information

Automated Planning. Plan-Space Planning / Partial Order Causal Link Planning

Automated Planning. Plan-Space Planning / Partial Order Causal Link Planning Automated Planning Plan-Space Planning / Partial Order Causal Link Planning Jonas Kvarnström Automated Planning Group Department of Computer and Information Science Linköping University Partly adapted

More information

Artificial Intelligence 1: planning

Artificial Intelligence 1: planning Artificial Intelligence 1: planning Lecturer: Tom Lenaerts Institut de Recherches Interdisciplinaires et de Développements en Intelligence Artificielle (IRIDIA) Université Libre de Bruxelles Planning The

More information

CMU-Q Lecture 6: Planning Graph GRAPHPLAN. Teacher: Gianni A. Di Caro

CMU-Q Lecture 6: Planning Graph GRAPHPLAN. Teacher: Gianni A. Di Caro CMU-Q 15-381 Lecture 6: Planning Graph GRAPHPLAN Teacher: Gianni A. Di Caro PLANNING GRAPHS Graph-based data structure representing a polynomial-size/time approximation of the exponential search tree Can

More information

1: planning. Lecturer: Tom Lenaerts

1: planning. Lecturer: Tom Lenaerts Artificial Intelligence 1: planning Lecturer: Tom Lenaerts Institut de Recherches Interdisciplinaires et de Développements en Intelligence Artificielle (IRIDIA) Université Libre de Bruxelles Planning The

More information

Activity Planning and Execution I: Operator-based Planning and Plan Graphs. Assignments

Activity Planning and Execution I: Operator-based Planning and Plan Graphs. Assignments Activity Planning and Execution I: Operator-based Planning and Plan Graphs Slides draw upon material from: Prof. Maria Fox, Univ Strathclyde Brian C. Williams 16.410-13 October 4 th, 2010 Assignments Remember:

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

15-381: Artificial Intelligence Assignment 4: Planning

15-381: Artificial Intelligence Assignment 4: Planning 15-381: Artificial Intelligence Assignment 4: Planning Sample Solution November 5, 2001 1. Consider a robot domain as shown in Figure 1. The domain consists a house that belongs to Pat, who has a robot-butler.

More information

Artificial Intelligence II

Artificial Intelligence II Artificial Intelligence II 2013/2014 - Prof: Daniele Nardi, Joachim Hertzberg Exercitation 3 - Roberto Capobianco Planning: STRIPS, Partial Order Plans, Planning Graphs 1 STRIPS (Recap-1) Start situation;

More information

Where are we? Informatics 2D Reasoning and Agents Semester 2, Planning with state-space search. Planning with state-space search

Where are we? Informatics 2D Reasoning and Agents Semester 2, Planning with state-space search. Planning with state-space search Informatics 2D Reasoning and Agents Semester 2, 2018 2019 Alex Lascarides alex@inf.ed.ac.uk Where are we? Last time... we defined the planning problem discussed problem with using search and logic in planning

More information

Artificial Intelligence Planning

Artificial Intelligence Planning Artificial Intelligence Planning Instructor: Vincent Conitzer Planning We studied how to take actions in the world (search) We studied how to represent objects, relations, etc. (logic) Now we will combine

More information

CPS 270: Artificial Intelligence Planning

CPS 270: Artificial Intelligence   Planning CPS 270: Artificial Intelligence http://www.cs.duke.edu/courses/fall08/cps270/ Planning Instructor: Vincent Conitzer Planning We studied how to take actions in the world (search) We studied how to represent

More information

A deterministic action is a partial function from states to states. It is partial because not every action can be carried out in every state

A deterministic action is a partial function from states to states. It is partial because not every action can be carried out in every state CmSc310 Artificial Intelligence Classical Planning 1. Introduction Planning is about how an agent achieves its goals. To achieve anything but the simplest goals, an agent must reason about its future.

More information

KI-Programmierung. Planning

KI-Programmierung. Planning KI-Programmierung Planning Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2007/2008 B. Beckert: KI-Programmierung p.1 Outline Search vs. planning STRIPS operators Partial-order planning The real

More information

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable //7 Review: Constraint Satisfaction Problems Constraint Satisfaction Problems II AIMA: Chapter 6 A CSP consists of: Finite set of X, X,, X n Nonempty domain of possible values for each variable D, D, D

More information

Planning. Introduction to Planning. Failing to plan is planning to fail! Major Agent Types Agents with Goals. From Problem Solving to Planning

Planning. Introduction to Planning. Failing to plan is planning to fail! Major Agent Types Agents with Goals. From Problem Solving to Planning Introduction to Planning Planning Failing to plan is planning to fail! Plan: a sequence of steps to achieve a goal. Problem solving agent knows: actions, states, goals and plans. Planning is a special

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Section 1 3 Constraint Satisfaction 1 Outline Constraint Satisfaction Problems (CSP) Backtracking search for CSPs Local search for CSPs Constraint Satisfaction

More information

cis32-ai lecture # 22 wed-26-apr-2006 Partial Order Planning Partially ordered plans Representation

cis32-ai lecture # 22 wed-26-apr-2006 Partial Order Planning Partially ordered plans Representation cis32-ai lecture # 22 wed-26-apr-2006 Partial Order Planning today s topics: partial-order planning decision-theoretic planning The answer to the problem we ended the last lecture with is to use partial

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Announcements Grading questions:

More information

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens CS 188: Artificial Intelligence Fall 2008 Announcements Grading questions: don t panic, talk to us Newsgroup: check it out Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted

More information

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018 DIT411/TIN175, Artificial Intelligence Chapter 7: Constraint satisfaction problems CHAPTER 7: CONSTRAINT SATISFACTION PROBLEMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 30 January, 2018 1 TABLE

More information

Constraint Satisfaction Problems (CSPs)

Constraint Satisfaction Problems (CSPs) 1 Hal Daumé III (me@hal3.name) Constraint Satisfaction Problems (CSPs) Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 7 Feb 2012 Many

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 Announcements Project 1: Search is due next week Written 1: Search and CSPs out soon Piazza: check it out if you haven t CS 188: Artificial Intelligence Fall 2011 Lecture 4: Constraint Satisfaction 9/6/2011

More information

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints

Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Validating Plans with Durative Actions via Integrating Boolean and Numerical Constraints Roman Barták Charles University in Prague, Faculty of Mathematics and Physics Institute for Theoretical Computer

More information

AI Planning. Introduction to Artificial Intelligence! CSCE476/876, Spring 2012:! Send questions to Piazza!

AI Planning. Introduction to Artificial Intelligence! CSCE476/876, Spring 2012:!  Send questions to Piazza! AI! CSCE476/876, Spring 2012:! www.cse.unl.edu/~choueiry/s12-476-876/! Send questions to Piazza! Berthe Y. Choueiry (Shu-we-ri)! Avery Hall, Room 360! Tel: +1(402)472-5444! 1 Reading! Required reading!

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Chapter 6 of Russell & Norvig] Constraint satisfaction problems (CSPs) Standard search problem:

More information

CS 4100/5100: Foundations of AI

CS 4100/5100: Foundations of AI CS 4100/5100: Foundations of AI Constraint satisfaction problems 1 Instructor: Rob Platt r.platt@neu.edu College of Computer and information Science Northeastern University September 5, 2013 1 These notes

More information

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Constraint Satisfaction Problems Prof. Scott Niekum The University of Texas at Austin [These slides are based on those of Dan Klein and Pieter Abbeel for CS188 Intro to

More information

Dipartimento di Elettronica Informazione e Bioingegneria. Cognitive Robotics. SATplan. Act1. Pre1. Fact. G. Gini Act2

Dipartimento di Elettronica Informazione e Bioingegneria. Cognitive Robotics. SATplan. Act1. Pre1. Fact. G. Gini Act2 Dipartimento di Elettronica Informazione e Bioingegneria Cognitive Robotics SATplan Pre1 Pre2 @ 2015 Act1 Act2 Fact why SAT (satisfability)? 2 Classical planning has been observed as a form of logical

More information

Probabilistic Belief. Adversarial Search. Heuristic Search. Planning. Probabilistic Reasoning. CSPs. Learning CS121

Probabilistic Belief. Adversarial Search. Heuristic Search. Planning. Probabilistic Reasoning. CSPs. Learning CS121 CS121 Heuristic Search Planning CSPs Adversarial Search Probabilistic Reasoning Probabilistic Belief Learning Heuristic Search First, you need to formulate your situation as a Search Problem What is a

More information

Nonlinear State-Space Planning: Prodigy4.0

Nonlinear State-Space Planning: Prodigy4.0 Nonlinear State-Space Planning: Prodigy4.0 Manuela Veloso Carnegie Mellon University Computer Science Department Planning - Fall 2001 Planning - Problem Solving Newell and Simon 1956 Given the actions

More information

Planning. CPS 570 Ron Parr. Some Actual Planning Applications. Used to fulfill mission objectives in Nasa s Deep Space One (Remote Agent)

Planning. CPS 570 Ron Parr. Some Actual Planning Applications. Used to fulfill mission objectives in Nasa s Deep Space One (Remote Agent) Planning CPS 570 Ron Parr Some Actual Planning Applications Used to fulfill mission objectives in Nasa s Deep Space One (Remote Agent) Particularly important for space operations due to latency Also used

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

An Evaluation of Blackbox Graph Planning

An Evaluation of Blackbox Graph Planning An Evaluation of Blackbox Graph Planning John Duchi, James Connor, and Bruce Lo jduchi@stanford.edu, jconnor@stanford.edu, brucelo@cs.stanford.edu, I. Introduction Stanford University CS227: Assignment

More information

Lecture Overview. CSE3309 Artificial Intelligence. The lottery paradox. The Bayesian claim. The lottery paradox. A Bayesian model of rationality

Lecture Overview. CSE3309 Artificial Intelligence. The lottery paradox. The Bayesian claim. The lottery paradox. A Bayesian model of rationality CSE3309 Lecture Overview The lottery paradox A Bayesian model of rationality Lecture 15 Planning Dr. Kevin Korb School of Computer Science and Software Eng. Building 75 (STRIP), Rm 117 korb@csse.monash.edu.au

More information

Announcements. CS 188: Artificial Intelligence Fall 2010

Announcements. CS 188: Artificial Intelligence Fall 2010 Announcements Project 1: Search is due Monday Looking for partners? After class or newsgroup Written 1: Search and CSPs out soon Newsgroup: check it out CS 188: Artificial Intelligence Fall 2010 Lecture

More information

CSE 473: Artificial Intelligence

CSE 473: Artificial Intelligence CSE 473: Artificial Intelligence Constraint Satisfaction Luke Zettlemoyer Multiple slides adapted from Dan Klein, Stuart Russell or Andrew Moore What is Search For? Models of the world: single agent, deterministic

More information

Search vs. planning. Planning. Search vs. planning contd. Outline

Search vs. planning. Planning. Search vs. planning contd. Outline Search vs. planning Planning onsider the task get milk, bananas, and a cordless drill Standard search algorithms seem to fail miserably: Go To Pet Store Talk to Parrot uy a Dog Go To School Go To lass

More information

Lecture 7. Search. Search. Foundations of Constraint Programming

Lecture 7. Search. Search. Foundations of Constraint Programming Lecture 7 1 Outline Introduce search trees Discuss various types of labeling trees, in particular trees for - forward checking - partial look ahead - maintaining arc consistency (MAC) Discuss various search

More information

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set:

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set: Announcements Homework 1: Search Has been released! Due Monday, 2/1, at 11:59pm. On edx online, instant grading, submit as often as you like. Project 1: Search Has been released! Due Friday 2/5 at 5pm.

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Office hours Office hours for Assignment 1 (ASB9810 in CSIL): Sep 29th(Fri) 12:00 to 13:30 Oct 3rd(Tue) 11:30 to 13:00 Late homework policy You get four late

More information

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems Constraint Satisfaction Problems N variables domain D constraints x 1 x 2 Instructor: Marco Alvarez University of Rhode Island (These slides

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Constraint Satisfaction Problems Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Inference The core topic of the following lectures

More information

Chapter 6 Planning-Graph Techniques

Chapter 6 Planning-Graph Techniques Lecture slides for Automated Planning: Theory and Practice Chapter 6 Planning-Graph Techniques Dana S. Nau CMSC 722, AI Planning University of Maryland, Spring 2008 1 Motivation A big source of inefficiency

More information

Cognitive Robotics 2016/2017

Cognitive Robotics 2016/2017 based on Manuela M. Veloso lectures on PLNNING, EXEUTION ND LERNING ognitive Robotics 2016/2017 Planning:, ctions and Goal Representation Matteo Matteucci matteo.matteucci@polimi.it rtificial Intelligence

More information

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3)

Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.3) Games and Adversarial Search II Alpha-Beta Pruning (AIMA 5.) Some slides adapted from Richard Lathrop, USC/ISI, CS 7 Review: The Minimax Rule Idea: Make the best move for MAX assuming that MIN always replies

More information

Planning and Acting. CITS3001 Algorithms, Agents and Artificial Intelligence. 2018, Semester 2

Planning and Acting. CITS3001 Algorithms, Agents and Artificial Intelligence. 2018, Semester 2 Planning and Acting CITS3001 Algorithms, Agents and Artificial Intelligence Tim French School of Computer Science and Software Engineering The University of Western Australia 2018, Semester 2 Summary We

More information

CSE 3402: Intro to Artificial Intelligence Planning

CSE 3402: Intro to Artificial Intelligence Planning CSE 3402: Intro to Artificial Intelligence Planning Readings: Russell & Norvig 3 rd edition Chapter 10 (in 2 nd edition, Sections 11.1, 11.2, and 11.4) 1 CWA Classical Planning. No incomplete or uncertain

More information

Classical Planning Problems: Representation Languages

Classical Planning Problems: Representation Languages jonas.kvarnstrom@liu.se 2017 Classical Planning Problems: Representation Languages History: 1959 3 The language of Artificial Intelligence was/is logic First-order, second-order, modal, 1959: General

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

CS W4701 Artificial Intelligence

CS W4701 Artificial Intelligence CS W4701 Artificial Intelligence Fall 2013 Chapter 6: Constraint Satisfaction Problems Jonathan Voris (based on slides by Sal Stolfo) Assignment 3 Go Encircling Game Ancient Chinese game Dates back At

More information

Planning. Search vs. planning STRIPS operators Partial-order planning. CS 561, Session 20 1

Planning. Search vs. planning STRIPS operators Partial-order planning. CS 561, Session 20 1 Planning Search vs. planning STRIPS operators Partial-order planning CS 561, Session 20 1 What we have so far Can TELL KB about new percepts about the world KB maintains model of the current world state

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Bernhard Nebel, and Martin Riedmiller Albert-Ludwigs-Universität

More information

CSC2542 Planning-Graph Techniques

CSC2542 Planning-Graph Techniques 1 Administrative Announcements Discussion of tutorial time Email me to set up a time to meet to discuss your project in the next week. Fridays are best CSC2542 Planning-Graph Techniques Sheila McIlraith

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 10. Action Planning Solving Logically Specified Problems using a General Problem Solver Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel

More information

AUTOMATED PLANNING Automated Planning sequence of actions goal

AUTOMATED PLANNING Automated Planning sequence of actions goal AUTOMATED PLANNING Automated Planning is an important problem solving activity which consists in synthesizing a sequence of actions performed by an agent that leads from an initial state of the world to

More information

Announcements. CS 188: Artificial Intelligence Spring Today. Example: Map-Coloring. Example: Cryptarithmetic.

Announcements. CS 188: Artificial Intelligence Spring Today. Example: Map-Coloring. Example: Cryptarithmetic. CS 188: Artificial Intelligence Spring 2010 Lecture 5: CSPs II 2/2/2010 Pieter Abbeel UC Berkeley Many slides from Dan Klein Announcements Project 1 due Thursday Lecture videos reminder: don t count on

More information

APPLYING CONSTRAINT SATISFACTION TECHNIQUES TO AI PLANNING PROBLEMS. Daniel Buettner A THESIS. Presented to the Faculty of

APPLYING CONSTRAINT SATISFACTION TECHNIQUES TO AI PLANNING PROBLEMS. Daniel Buettner A THESIS. Presented to the Faculty of APPLYING CONSTRAINT SATISFACTION TECHNIQUES TO AI PLANNING PROBLEMS by Daniel Buettner A THESIS Presented to the Faculty of The Graduate College at the University of Nebraska In Partial Fulfillment of

More information

Distributed Graphplan

Distributed Graphplan Distributed Graphplan Mark Iwen & Amol Dattatraya Mali Electrical Engineering & Computer Science University of Wisconsin, Milwaukee, WI 53211 iwen2724@uwm.edu, mali@miller.cs.uwm.edu, Fax: 1-414-229-2769

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

The Distributed Constraint Satisfaction Problem: Formalization and Algorithms

The Distributed Constraint Satisfaction Problem: Formalization and Algorithms IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, VOL. 10, NO. 5, SEPTEMBER/OCTOBER 1998 673 The Distributed Constraint Satisfaction Problem: Formalization and Algorithms Makoto Yokoo, Edmund H. Durfee,

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

More information

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm Announcements Homework 4 Due tonight at 11:59pm Project 3 Due 3/8 at 4:00pm CS 188: Artificial Intelligence Constraint Satisfaction Problems Instructor: Stuart Russell & Sergey Levine, University of California,

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

Artificial Intelligence Constraint Satisfaction Problems

Artificial Intelligence Constraint Satisfaction Problems Artificial Intelligence Constraint Satisfaction Problems Recall Search problems: Find the sequence of actions that leads to the goal. Sequence of actions means a path in the search space. Paths come with

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information