|
@@ -0,0 +1,124 @@
|
|
|
+# 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$
|
|
|
+
|
|
|
+<!--I just needed this comment for adjust syntax highlighting with ** -->
|
|
|
+
|
|
|
+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 do|$\rightarrow$||
|
|
|
+
|
|
|
+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.
|