40 likes | 222 Views
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
E N D
Chapter 4Practical 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 • { 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) }
Key BDI Functions Percepts action B D I options filter brf
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