ch. 2 – intelligent agents

6
Ch. 2 – Intelligent Agents Supplemental slides for CSE 327 Prof. Jeff Heflin

Upload: danno

Post on 22-Feb-2016

13 views

Category:

Documents


0 download

DESCRIPTION

Ch. 2 – Intelligent Agents. Supplemental slides for CSE 327 Prof. Jeff Heflin. Agent. Agent. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Ch. 2 – Intelligent Agents

Ch. 2 – Intelligent Agents

Supplemental slides for CSE 327Prof. Jeff Heflin

Page 2: Ch. 2 – Intelligent Agents

Agent

Environment

sensors

actuators

?

Agent

percepts

actions

rational agent: For each possible percept sequence, a rational agent should select an action that is expected to maximize its performance measure, given the evidence provided by the percept sequence and whatever built-in knowledge the agent has.

Page 3: Ch. 2 – Intelligent Agents

function TABLE-DRIVEN-AGENT(percept)returns an action

persistent: percepts, a sequence, initially emptytable, a table of actions, indexed by

percept sequences

append percept to the end of perceptsaction LOOKUP(percepts, table)return action

From Figure 2.7, p. 47

Table Driven Agent

Page 4: Ch. 2 – Intelligent Agents

function TABLE-DRIVEN-AGENT (percept)returns an action

persistent: percepts, a sequence, initially emptytable, a table of actions, indexed by percept sequences

append percept to the end of perceptsaction LOOKUP(percepts, table)return action

From Figure 2.7, p. 47

Table Driven Agentfunction

name inputoutput type

persistent variables: maintain values between function calls, like instance variables in OO, but can only be referenced within the function

assignment operation

output value

function call

Page 5: Ch. 2 – Intelligent Agents

Rock, Scissors, Paper Table Driven Agent

Percept Sequence Action

<Start> Rock

<Start, Win(Rock,Scissors)> Rock

<Start, Lose(Rock,Paper)> Scissors

<Start, Tie(Rock,Rock)> Paper

<Start, Win(Rock,Scissors), Win (Rock,Scissors)> Rock

<Start, Win(Rock,Scissors), Lose(Rock,Paper)> Scissors

<Start, Win(Rock,Scissors), Tie(Rock,Rock)> Paper

<Start, Lose(Rock,Paper), Win(Scissors,Paper)> Scissors

<Start, Lose(Rock,Paper), Lose(Scissors,Rock)> Paper

<Start, Lose(Rock,Paper), Tie(Scissors,Scissors)> Rock

…. …

Page 6: Ch. 2 – Intelligent Agents

Goal-Based Agent

sensors

actuatorsAgent

Environment

What the world is like now

What action I should do nowGoals

State

How the world evolves

What my actions doWhat it will be like if I do action A

From Fig. 2.13, p. 52