Kaynağa Gözat

Added AI lesson2, modified readme

Federico Amedeo Izzo 9 yıl önce
ebeveyn
işleme
baaf876c17

+ 6 - 6
Artificial Intelligence/lesson_01.md

@@ -4,20 +4,20 @@
 ###### francesco.arrigoni@polimi.it - 02 23993475
 ###### Wed 14:00 - 16:00 send email first
 ##### 7 October 2015
-### 1. Introduction
+### 1. Introduction to Artificial Intelligence
 During the course we will see methods to develop __intelligent agents__.
 In particular we will see various methods in order of complexity but not necessarily in chronological order.
 
 The algorithms will be presented in pseudocode, no real implementations will be shown, for implementations examples go to aima.cs.berkeley.edu
 
-####Relation between AI and other courses:
+#### Relation between AI and other courses:
 Relating to *Soft Computing*, in AI are shown general method for creating intelligent agents, in SC are shown some recent techniques in particular, in *Autonomous Agents and MultiAgent Systems* are shown methods to connect different intelligent agents.
 In *Machine Learning / Data Mining* the topic is how to improve an intelligent agent by making it learn.
 There are also some philosophical questions which are faced in *Computer Ethics*.
 ---
 ### Artificial Intellicence
 
-####1. Act as humans
+#### 1. Act as humans
 Create machines or entities who can act as humans.
 ```
 Alan Turing in 1950 defined the imitation game, later being known as the turing test.
@@ -41,18 +41,18 @@ The computer is considered as a __black box__, the internal working of the compu
 
 A problem related to this test is that the decision may depend on one interogator or another.
 
-####2. Think as humans
+#### 2. Think as humans
 The goal of Artificial Intelligence is to build machines that work exactly as a human brain, in other words to create machines that think as humans.
 
 The problem with this approach is that our scientific knowledge is not sufficiend to reproduce a human mind.
 
-####3. Think rationally
+#### 3. Think rationally
 Artificial Intellicence is building machines that think rationally.
 Like building machines that think logically and are able to solve problems.
 
 The fact is that human being are not *completely rational*, our intelligence doesn't stop to proving theorem or *modus ponens*
 
-####4. Act rationally <- the one adopted during the course
+#### 4. Act rationally <- the one adopted during the course
 To be considered intelligent, a machine must be able to not only think rationally but in general to __do the right thing__.
 Act rationally can be seen as a way of maximising the results.
 This is the most *scientifically* and *engineering* oriented definition.

+ 124 - 0
Artificial Intelligence/lesson_02.md

@@ -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.

+ 2 - 2
README.md

@@ -1,7 +1,7 @@
-# polimd
+# polimd - README
 Lecture notes taken mainly to avoid sleeping in class
 
 The idea is the following:
-- take notes in markdown 
+- take notes in markdown
 - embed mathematical formulas in latex
 - use pandoc to compile in pdf the document