1 / 6

Chapter 4 Practical Reasoning Agents

Chapter 4 Practical Reasoning Agents. CSE 431 – Intelligent Agents. A Blocks World Problem. initial state { On(A,Table) , On(B,Table) , On(C,Table) , Clear(A) , Clear(B) , Clear(C) , Clear(Table) , Block(A) , Block(B) , Block(C) } goal state

Download Presentation

Chapter 4 Practical Reasoning Agents

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4Practical Reasoning Agents CSE 431 – Intelligent Agents

  2. A Blocks World Problem • initial state • { On(A,Table) , On(B,Table) , On(C,Table) , Clear(A) , Clear(B) , Clear(C) , Clear(Table) , Block(A) , Block(B) , Block(C) } • goal state • { On(C,Table) , On(B,C) , On(A,B) } • actions • Move(b,x,y) Pre: { On(b,x) , Clear(b) , Clear(y) , Block(y) } Del: { On(b,x) , Clear(y) } Add: { On(b,y) , Clear(x) }MoveToTable(b,x) Pre: { On(b,x) , Clear(b) } Del: { On(b,x) } Add: { On(b,Table) , Clear(x) }

  3. Key BDI Functions Percepts action B D I options filter brf

  4. Practical Reasoning Agent B  B0;I  I0;while true do get next percept p through see() function; B  brf(B, p)D  options(B,I); I  filter(B,D,I); plan(B,I,Ac); while not (empty() or succeeded(I,B) or impossible(I,B)) do hd(); execute(); tail(); get next percept p through see() function; B  brf(B, p); if reconsider(I,B) then D  options(B,I); I  filter(B,D,I); end-if if not sound(,I,B) then plan(B,I,Ac) end-if end-whileend-while From Fig. 4.3, p. 75

  5. Blocks World in Jam (1) GOALS: ACHIEVE blocks_stacked; FACTS: FACT ON “Block5” “Block4”; FACT ON “Block4” “Block3”; FACT ON “Block1” “Block2”; FACT ON “Block2” “Table”; FACT ON “Block3” “Table”; FACT CLEAR “Block1”; FACT CLEAR “Block5”; FACT CLEAR “Table”; Plan: { NAME: “Top-level plan” GOAL: ACHIEVE blocks_stacked; CONTEXT: BODY: ACHIEVE ON “Block3” “Table”; ACHIEVE ON “Block2” “Block3”; ACHIEVE ON “Block1” “Block2”; }

  6. Blocks World in Jam (2) Plan: { NAME: “Stack blocks that are already clear” GOAL: ACHIEVE ON $OBJ1 $OBJ2; CONTEXT: BODY: ACHIEVE CLEAR $OBJ1; ACHIEVE CLEAR $OBJ2; PERFORM move $OBJ1 $OBJ2; UTILITY: 10; FAILURE: EXECUTE print “\n\nStack blocks failed:\n\n”; } Plan: { NAME: “Clear a block” GOAL: ACHIEVE CLEAR $OBJ; CONTEXT: FACT ON $OBJ2 $OBJ; BODY: ACHIEVE ON $OBJ2 “Table”; EFFECTS: RETRACT ON $OBJ2 $OBJ FAILURE: EXECUTE print “\n\nClearing blocks failed:\n\n”; }

More Related