lesson_02.md 3.4 KB

AI - lesson 02

Nota: mancano i grafici nella parte finale (agent types)

Francesco Arrigoni

9 October 2015

Intelligent Agents

Agent
Environment

An agent has a perception of the environment and executes an action on the former.

  • P: all the possible perceptions
  • A: all the possible actions

P and A are both finite sets.

Considering a camera with a resolution of 512x512 and 8bit depth, we have $256^{512x512}$ possible pictures. It is a huge number but is finite.

I can define an agent function: $$f:P^* \rightarrow A$$ $|P^*|= \infty$, $P^+$ if we exclude $\varepsilon$

An agent program is a computational model of the agent function.


Vacuum Cleaner example

A|B -|- Perception

$P={[A,\text{dirty}],[A,\text{clean}],[B,\text{dirty}],[B,\text{clean}]}$

If the robot had three sensors, the perception would be triple.

Action

$A={\text{Right}, \text{Left}, \text{Suck}, \text{Moop}}$

We can put the perceptions and actions in a tabular form

$P^*$ $f$ $A$
$[A,\text{clean}]$ $\text{Right}$
$[A,\text{dirty}]$ $\text{Suck}$
$[B,\text{clean}]$ $\text{Left}$
$[B,\text{dirty}]$ $\text{Suck}$
$[A,\text{clean}]$ $[A,\text{clean}]$ $\text{Right}$
$[A,\text{clean}]$ $[A,\text{dirty}]$ $\text{Suck}$
... ... ...

The environment is dynamic

The environment is changing also while the agent does nothing. It can happen that the environment is nondeterministic

The Environment can be

  • Dynamic
  • or Stochastic

We now have to specify a Performance Measure.

The best possible agent is called rational agent,
it selects actions in order to maximise the expected value of the performance function, given what the agent knows so far.

Knowledge sources:

  • Sequence of perceptions
  • Initial knowledge

An agent is rational also if it doesn't know anything.
There is no need to know everything to be rational.

An environment could be fully or partially observable. It depends on the sensors of the agent.
e.g. a Google Car's environment is partially observable.

Environment

  • can be
    • Discrete or Continuous
    • Known or Unknown
    • Fully or Partially observable
    • Single or Multi agent
    • Deterministic or Stochastic
    • Episodic or Sequential
    • Static or Dynamic

We will focus on single agent, deterministic, fully observable, static environments.

Now we should move to the agent program.

Agent program

simple reflex agents

for example ROOMBA

agent

What the world look like $\leftarrow$
$\downarrow$ environment
Action reuse $\rightarrow$ What actually should i

This model performs well when the environment is fully observable.

model-based reflex agents

A baby that see a person that hides will think that he has disappered forever.
Model-based agents are able to reconstruct the state of a partially observable environment.

goal-based agents

for example: chess

This is the kind of agent that we will be studying.

utility-based agents

This agent will assign a real number to every possible actions according to the happiness of the agent in doing that action.

All those types of agents are subject to learning.