+ All Categories
Home > Documents > Artificial Intelligence II

Artificial Intelligence II

Date post: 23-Jan-2016
Category:
Upload: terri
View: 37 times
Download: 0 times
Share this document with a friend
Description:
Artificial Intelligence II. S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning. Planning. Planning versus problem solving Situation calculus Plan-space planning. Planning as Problem Solving. Planning Start state (S) Goal state (G) Set of actions - PowerPoint PPT Presentation
Popular Tags:
33
Artificial Intelligence II S. Russell and P. Norvig Artificial Intelligence: A Modern Approach Chapter 11: Planning
Transcript
Page 1: Artificial Intelligence II

Artificial Intelligence II

S. Russell and P. Norvig

Artificial Intelligence: A Modern Approach

Chapter 11: Planning

Page 2: Artificial Intelligence II

Planning

Planning versus problem solving

Situation calculusPlan-space planning

Page 3: Artificial Intelligence II

Planning as Problem Solving

Planning– Start state (S)– Goal state (G)– Set of actions

Find sequence of actions that get you from start to goal

Page 4: Artificial Intelligence II

What is Planning (more generally)?

Generate sequences of actions to perform tasks and achieve objectives.

Search for solution over abstract space of plans.Assists humans in practical applications

– design and manufacturing

– military operations

– games

– space exploration

Page 5: Artificial Intelligence II

Planning versus Problem Solving

Problem solving is basically state-space search, i.e., primarily an algorithm—not a representation.– initial state, goal-test, successor function

Planning is a combination of an algorithm (search) and a set of representations, usually situational calculus.– provides a way to “open up” the representation of

initial state, goal-test, and successor function– planner free to add actions to plan wherever needed– most parts of world independent from other parts, i.e.

nearly decomposable

Page 6: Artificial Intelligence II

Assumptions

Atomic time No concurrent actions Deterministic actions Agent is sole cause of change Agent is omniscient Closed World Assumption

Page 7: Artificial Intelligence II

Simple Planning Agent Algorithm

Generate a goal to achieveConstruct a plan to achieve goal from

current stateExecute plan until finishedBegin again with new goal

Page 8: Artificial Intelligence II

Planning Emphasizes what’s inside the goal and operators

“Open up” the representation of state, goals and operators State/Situation Representation: A conjunction of “facts”

– Ex: pyramid(C), on(A,B), on(B,Table), clear(A), handempty Goal Description: a conjunction of positive literals.

– Ex: on(A,B), on(B,C) Operators: given as “STRIPS-type” if-then rules.

STRIPS is the STanford Research Institute Problem Solver.– Action name: Description of action– Preconditions: Conjunction of positive literals representing what

must be true beforehand.– Effects: Conjunction of positive or negative literals

Name: pickup(x)

Preconditions: ontable(x), clear(x), handempty

Add: holding(x)

Del: ontable(x), clear(x), handempty

Page 9: Artificial Intelligence II

Representing States of the World

A

C

B

on(c,a),ontable(a),clear(c),ontable(b),clear(b),handempty()

Goal: on(b,c)

Page 10: Artificial Intelligence II

Strips Example

Action– Buy(x, store)

• Pre: At(store), Sells(store, x)• Eff: Have(x)

– Go(x, y)• Pre: At(x)• Eff: At(y), not At(x)

Goal– Have(Milk) and Have(Banana) and Have(Drill)

Start– At(Home) and Sells(SM, Milk) and Sells(SM, Banana) and

Sells(HW, Drill)

Page 11: Artificial Intelligence II

Planning as Search

Situation-Space SearchPlan-Space Search

Page 12: Artificial Intelligence II

Situation-Space Search

Search space: All possible world states or situations. Initial state defines one node. Goal node is a state where all goals in goal state are satisfied. Solution: Sequence of actions in path from start to goal.

Page 13: Artificial Intelligence II

Plan-Space Search

Search space: All possible (partial) plansPartial plan defines a node; an initial plan

is one nodeGoal node contains a plan which is

complete, satisfying all goals in goal stateThe node itself contains all of the

information for determining a solution plan

Page 14: Artificial Intelligence II

Planning Algorithms

Progression planners (forward chaining): consider the effect of all possible actions in a given state.

Regression planners (backword chaining):to achieve a goal, what must have been true in previous state.

At(Home)…

…Go(SM) Go(HW)

Have(M) and Have(B) and Have(D)

Buy(M,store)

At(store) and Sells(store,M) and Have(B) and Have(D)

Both have problem of lack of direction – what action or goal to pursue next.

Page 15: Artificial Intelligence II

Forward and Backward State-Space Search

Page 16: Artificial Intelligence II

Algorithm for Progression-Based Planner

1. Start from initial state

2. Find all operators whose preconditions are true in the initial state

3. Compute effects of operators to generate successor states

4. Repeat 2 and 3 until new state satisfies goal conditions

Page 17: Artificial Intelligence II

Progression Planning Example

Initial State S = {clear(A), clear(B), clear(C), ontable(A), ontable(B), ontable(C), handempty}

Operator = pickup(x) with = {x/A}Successor state T = {clear(B), clear(C),

ontable(B), ontable(C), holding(A)}Operator instance associated with the

action from S to T is pickup(A).

Name: pickup(x)

Preconditions: ontable(x), clear(x), handempty

Add: holding(x)

Del: ontable(x), clear(x), handempty

A CB

Page 18: Artificial Intelligence II

Algorithm for Regression-Based Planner

1. Start with goal node corresponding to goal to be achieved

2. Choose an operator that will add one of the goals

3. Replace the goal with the operator’s preconditions

4. Repeat 2 and 3 until you have reached the initial state

Page 19: Artificial Intelligence II

STRIPS Algorithm

A Goal-Stack Based Regression Planner: uses goal stack to maintain set of conjunctive goals yet to be achieved

Maintains a description of the current state, which is initially the given initial state

Approach:– Pick an order for achieving each of the goals– When each goal is popped from stack, if it is not already true in

current state, push onto the stack an operator that adds that goal.– Push onto the stack each precondition of that operator in some

order, and solve each of these sub-goals in the same fashion.– When all preconditions are solved (popped from stack), re-verify

that all of the preconditions are still true and apply the operator to create a new successor state description.

Page 20: Artificial Intelligence II

STRIPS Example

A

C

B

A

C

B

Initial State: clear(b), clear(c), on(c,a), ontable(a), ontable(b),handempty

Goal: on(a,c), on(c,b)

Pickup(x) P: ontable(x), clear(x), handempty E: holding(x), not ontable(x), not clear(x), not handempty

Putdown(x) P: holding(x) E: ontable(x), clear(x), handempty, not holding(x)

Stack(x,y) P: holding(x), clear(y) E: on(x,y), clear(x), handempty, not holding(x), not clear(y)

Unstack(x,y) P: clear(x), on(x,y), handempty E: holding(x), clear(y), not clear(x), not on(x,y), not handempty

Page 21: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(on(C,B), on(A,C))]

State = {clear(B), clear(C), on(C,A), ontable(A), ontable(B), handempty}

Page 22: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(on(C,B)), achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {clear(B), clear(C), on(C,A), ontable(A), ontable(B), handempty}

Page 23: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(clear(B),holding(C)), apply(Stack(C,B), achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {clear(B), clear(C), on(C,A), ontable(A), ontable(B), handempty}

Stack(x,y) P: holding(x), clear(y) E: on(x,y), clear(x), handempty, not holding(x), not clear(y)

Page 24: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(holding(C)), achieve(clear(B)), achieve(clear(B),holding(C)), apply(Stack(C,B), achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {clear(B), clear(C), on(C,A), ontable(A), ontable(B), handempty}

Page 25: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(handempty, clear(C), on(C,y)), apply(Unstack(C,y)), achieve(clear(B)), achieve(clear(B),holding(C)), apply(Stack(C,B), achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {clear(B), clear(C), on(C,A), ontable(A), ontable(B), handempty}

Unstack(x,y) P: clear(x), on(x,y), handempty E: holding(x), clear(y), not clear(x), not on(x,y), not handempty

Page 26: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(clear(B)), achieve(clear(B),holding(C)), apply(Stack(C,B), achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {clear(B), ontable(A), ontable(B), holding(C), clear(A)}

Plan so far = [Unstack(C,A)]

Unstack(x,y) P: clear(x), on(x,y), handempty E: holding(x), clear(y), not clear(x), not on(x,y), not handempty

Page 27: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(on(A,C)), achieve(on(C,B), on(A,C))]

State = {ontable(A), ontable(B), clear(A), on(C,B), clear(C), handempty}

Plan so far = [Unstack(C,A), Stack(C,B)]

Stack(x,y) P: holding(x), clear(y) E: on(x,y), clear(x), handempty, not holding(x), not clear(y)

Page 28: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(clear(C), holding(A)), apply(Stack(A,C)), achieve(on(C,B), on(A,C))]

State = {ontable(A), ontable(B), clear(A), on(C,B), clear(C), handempty}

Plan so far = [Unstack(C,A), Stack(C,B)]

Stack(x,y) P: holding(x), clear(y) E: on(x,y), clear(x), handempty, not holding(x), not clear(y)

Page 29: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(holding(A)), achieve(clear(C)), achieve(clear(C), holding(A)), apply(Stack(A,C)), achieve(on(C,B), on(A,C))]

State = {ontable(A), ontable(B), clear(A), on(C,B), clear(C), handempty}

Plan so far = [Unstack(C,A), Stack(C,B)]

Page 30: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(ontable(A), clear(A), handempty), apply(Pickup(A)), achieve(clear(C)), achieve(clear(C), holding(A)), apply(Stack(A,C)), achieve(on(C,B), on(A,C))]

State = {ontable(A), ontable(B), clear(A), on(C,B), clear(C), handempty}

Plan so far = [Unstack(C,A), Stack(C,B)]

Pickup(x) P: ontable(x), clear(x), handempty E: holding(x), not ontable(x), not clear(x), not handempty

Page 31: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(clear(C)), achieve(clear(C), holding(A)), apply(Stack(A,C)), achieve(on(C,B), on(A,C))]

State = {ontable(B), on(C,B), clear(C), holding(A)}

Plan so far = [Unstack(C,A), Stack(C,B), Pickup(A)]

Pickup(x) P: ontable(x), clear(x), handempty E: holding(x), not ontable(x), not clear(x), not handempty

Page 32: Artificial Intelligence II

STRIPS Example

Goal Stack = [achieve(on(C,B), on(A,C))]

State = {ontable(B), on(C,B), on(A,C), clear(A), handempty}

Plan so far = [Unstack(C,A), Stack(C,B), Pickup(A), Stack(A,C)]

Stack(x,y) P: holding(x), clear(y)

E: on(x,y), clear(x), handempty, not holding(x), not clear(y)

Page 33: Artificial Intelligence II

STRIPS Example

Goal Stack = []

State = {ontable(B), on(C,B), on(A,C), clear(A), handempty}

Plan so far = [Unstack(C,A), Stack(C,B), Pickup(A), Stack(A,C)]


Recommended