9
Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan Kaufmann Publishers, 1998

Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Embed Size (px)

Citation preview

Page 1: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Agents that plan

K. V. S. Prasad

Notes for TIN171/DIT410 (Friday, 26 March 2010)

Based onNils Nilsson, “Artificial Intelligence: a new synthesis”,

Morgan Kaufmann Publishers, 1998

Page 2: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Agents that plan•Memory vs computation•State-space graphs•Searching explicit state spaces•Feature-based state spaces

Page 3: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Memory vs computation

• Reactive agents– Do very little computation• actions selected by designer, or by learning, or genes

– implemented in tables, or rules, or circuits

– need lots of memory– Designer must anticipate all situation/reaction– Can the agent compute what the designer would?• Agent would then need more time but less space

Page 4: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Computations by the agent

• Designer must specify these– not carry them out– E.g., predict the consequences of possible actions• If these can be learnt, or evolved

– Agent does things designer did not anticipate

• To predict consequences, agent must model–World– actions

Page 5: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

World states and actions

• Blocks world, make (ABC) from (A)(B)(C)• World modelled iconically• Actions by before-after pairs–move(A,B)• takes (A)(B)(C) to (AB)(C)• Takes (A)(BC) to (ABC)• Doesn't apply to (BA)(C)

• So we can look ahead one step. To goal?

Page 6: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

State-space graphs

• Nodes = world states• Arcs = actions• (A)(B)(C) –move(A,B)--> (AB)(C)– In blocks world, all actions reversible• (AB)(C) –move(A,T)-->(A)(B)(C)

– Where T is the table

– So agent can see:• to go from (A)(B)(C) to (ABC)• do move(B,C), move(A,B)

Page 7: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Plan = path in state-space graph

• Any of the nodes can be the goal• Sequence of actions needed (the plan)– Becomes path from initial to goal

• Assumptions– Can represent all relevant world states and

actions– No uncertainty in effect of actions– No other agent to change state

• Then no sensor needed while acting

Page 8: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Searching explicit state-spaces

• Start node is labelled 0• Propagate numbers in waves along arcs– So arc labelled 3 has 3 step path back to initial–Wave go breadth-first; other sequences possible

• Continue till you hit the goal• For single goal, can also back from goal to init

Page 9: Agents that plan K. V. S. Prasad Notes for TIN171/DIT410 (Friday, 26 March 2010) Based on Nils Nilsson, “Artificial Intelligence: a new synthesis”, Morgan

Feature-based state spaces

• Nodes now labelled by features– Feature = logical proposition

• Then what are actions?– STRIPS says an action is a triple• Precondition (what must be true for action to be

possible)• Add list (what features become true after action)• Delete list (what features become false after action)

• We are no longer in iconic world states!