CS156
Chris Pollett
Jan. 30, 2012
function TABLE-DRIVEN-AGENT (percept) returns an action
persistent: percepts, a sequence, initially empty;
#can think of this as a static var
table, a table of actions,
indexed by percept sequences;
#think of as a const
append percept to the end of percepts;
action := Lookup(percepts, table);
return action;
Which of the following is true?
The key challenge of AI is to find out how to write programs that produce rational behavior from a smallish program rather than a vast table. We next look at four kinds of agent programs that embody most intelligent systems.
function REFLEX-VACUUM-AGENT ([location, status]) returns as action
if(status == Dirty) then return Suck;
else if(location == A) then return Right;
else if(location == B) then return Left;
Above state space could be as large as 64 x 63 x 62 x 61 x 60 x 59 x 58 x 57
Can reduce search space by requiring newly placed queens not to be attack-able by existing queens. (2,057 possible)