P. 1
Algorithms

Algorithms

Ratings: (0)|Views: 168|Likes:
Published by Sijar Ahmed
AI algorithm
AI algorithm

More info:

Categories:Types, Research
Published by: Sijar Ahmed on Jun 16, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

12/03/2013

pdf

text

original

 
1
INTRODUCTION
1
 
2
INTELLIGENT AGENTS
function
T
ABLE
-D
RIVEN
-A
GENT
(
percept 
)
returns
an action
persistent
:
percepts
, a sequence, initially empty
table
, a table of actions, indexed by percept sequences, initially fully specifiedappend
percept 
to the end of 
perceptsaction 
L
OOKUP
(
percepts
,
table
)
return
action 
Figure 2.3
The T
ABLE
-D
RIVEN
-A
GENT
program is invoked for each new percept and returns anaction each time. It retains the complete percept sequence in memory.
function
R
EFLEX
-V
ACUUM
-A
GENT
([
location 
,
status
])
returns
an action
if 
status
=
Dirty 
then return
Suck 
else if 
location 
=
A
then return
Right 
else if 
location 
=
then return
Left 
Figure 2.4
The agent program for a simple reflex agent in the two-state vacuum environment. Thisprogram implements the agent function tabulated in Figure
??
.
function
S
IMPLE
-R
EFLEX
-A
GENT
(
percept 
)
returns
an action
persistent
:
rules
, a set of condition–action rules
state
I
NTERPRET
-I
NPUT
(
percept 
)
rule
R
ULE
-M
ATCH
(
state
,
rules
)
action 
rule
.A
CTION
return
action 
Figure 2.6
A simple reflex agent. It acts according to a rule whose condition matches the currentstate, as defined by the percept.
2
 
3
function
M
ODEL
-B
ASED
-R
EFLEX
-A
GENT
(
percept 
)
returns
an action
persistent
:
state
, the agent’s current conception of the world state
model 
, a description of how the next state depends on current state and action
rules
, a set of condition–action rules
action 
, the most recent action, initially none
state
U
PDATE
-S
TATE
(
state
,
action 
,
percept 
,
model 
)
rule
R
ULE
-M
ATCH
(
state
,
rules
)
action 
rule
.A
CTION
return
action 
Figure 2.8
A model-based reflex agent. It keeps track of the current state of the world, using aninternal model. It then chooses an action in the same way as the reflex agent.

Activity (13)

You've already reviewed this. Edit your review.
1 thousand reads
1 hundred reads
jj_thomas liked this
saiprashant liked this
kl11l2468 liked this
setarehkoochak liked this
vamsidhar2008 liked this
sandyguru05 liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->