Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE...

26
Techniques de l’intelligence artificielle (MIF24) 6 mars Olivier Georgeon 13 mars INTELLIGENCE ARTIFICIELLE 20 mars DEVELOPPEMENTALE 27 mars 3 avril Alain Mille 10 avril RAISONNEMENT A PARTIR DE CAS Rendu projet 17 avril 24 avril Vacances 1 mai 8 mai 15 mai Samir Akkouche 22 mai Alain Mille 29 mai Samir Akkouche 5 juin SYSTEMES MULTI AGENTS Rendu projet 12 juin Responsable de l’UE: Alain MILLE Evaluation: - Projets: 70% - Exam: 30%

Transcript of Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE...

Page 1: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Techniques de l’intelligence artificielle (MIF24)

6 mars Olivier Georgeon

13 mars INTELLIGENCE ARTIFICIELLE

20 mars DEVELOPPEMENTALE

27 mars

3 avril Alain Mille

10 avril RAISONNEMENT A PARTIR DE CAS Rendu projet

17 avril

24 avril Vacances

1 mai

8 mai

15 mai Samir Akkouche

22 mai Alain Mille

29 mai Samir Akkouche

5 juin SYSTEMES MULTI AGENTS Rendu projet

12 juin

19 juin Exam

26 juin Rendu projet

Responsable de l’UE:Alain MILLE

Evaluation:- Projets: 70%- Exam: 30%

Page 2: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Initiation à l’intelligence artificielle développementale

13 mars [email protected]

http://www.oliviergeorgeon.com/

Temps

http://e-ernest.blogspot.fr/ 2/50

Page 3: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Plan du jour

• Démonstration– Comment augmenter la complexité?

• Explications– Formalisation du problème– Implémentation d’une solution possible

• Travaux Dirigés

Page 4: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Exemple

Avancer ou cogner (5) (-10)Tourner (-3)Toucher droite/ devant / gauche (-1)

Cogner:

Toucher:

http://e-ernest.blogspot.fr/ 4/45

Page 5: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Environnement plus complexe

Page 6: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Robot e-puck

http://e-ernest.blogspot.fr/ 6/45

Page 7: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Augmenter la complexité de l’agent

• Principe de ecological balance– Pfeifer (1996). Building fungus eaters: Design principles of

autonomous agents

• Principle de sensorimotor coordination– Classification, perception, […] and memory should be viewed as

sensorimotor coordination rather that as individual modules• Principe développemental.

– Affinage progressif des perceptions et actions– Développement céphalocaudal?

Balanced Unbalance Balanced

http://e-ernest.blogspot.fr/ 7/45

Page 8: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Système visuel rudimentaire

http://e-ernest.blogspot.fr/ 8/45

Page 9: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Interactions Avancer

Tourner à gauche

Tourner à droite

Inchangé (0)

Apparition (10)

Rapprochement (10)

Disparition (-10)

Temps

GaucheDroite

3 x 4 x 4 = 48 interactions primitives

Page 10: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Comportement « diagonal »

http://e-ernest.blogspot.fr/ 10/45

Page 11: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Comportement tengentiel

http://e-ernest.blogspot.fr/ 11/45

Page 12: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Problème spatial

http://e-ernest.blogspot.fr/ 12/45

Problème de la persistance des objets: Apprendre qu’il y a des objets « cibles » et des objets « murs » et que la présence d’un objet mur peut expliquer qu’on ne voit plus l’objet cible

Page 13: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

« Decision Process »

Environment

outputt Inputt

Agent

http://e-ernest.blogspot.fr/ 13/50

Un agent est un programme qui interagit avec un environnement au cours du temps.

Concevoir les inputs comme une « perception » et les outputs comme une « action » est déjà un biais de modélisation !- exemple: toucher est à la fois une action et une perception.

Page 14: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Problème général

(-3)(-3)(-1)

(-1)

(5)

(-10)

Un ensemble « d’outputs » possibles A :

Un ensemble « d’inputs » possible O:

Un ensemble “d’interactions” possibles I = A x O (valués) :

(-1)

(-1)

(-1)

(-1)

True / False

(-3)(-3)

Il y a des régularités séquentielles

(i11, i12 … i1n) (i21, i22 … i2m)

http://e-ernest.blogspot.fr/ 14/45

Page 15: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Régularités séquentielles hiérarchiques

Après : , résulte plus probablement en que en

http://e-ernest.blogspot.fr/ 15/45

Après : , la séquence peut probablement être réalisée

Après la séquence : , la séquence peut probablement être réalisée

Etc…

Page 16: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Différentes échelles de temps

Environnement

output input

AgentAuto-programmation

Auto-programmation

http://e-ernest.blogspot.fr/ 16/45

Page 17: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Modèle sensorimoteur

Environment

output input

Agent

Interaction primitive

Pfeifer & Scheier (1994). From perception to action: The right direction?Dennett (2009). Darwin’s ‘‘strange inversion of reasoning”. Piaget (1937) La construction du réel chez l’enfant.

• Considérer la perception comme un « construit cognitif » plutôt que comme un input.

Perception

http://e-ernest.blogspot.fr/ 17/45

Page 18: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

active

Trajectoire développementale

Activeapprend

interaction

Temps

Niveau

interaction

interaction

interaction

interaction

active

apprend

interaction

interaction

interaction

Le modèle d’auto-programmation

interaction

http://e-ernest.blogspot.fr/ 18/45

Page 19: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Formalisation

(-3)(-3)(-1)

(-1)

(5)

(-10)

Un ensemble I des interactions primitives possibles (valuées) :

(-1)

(-1)

(-1)

(-1) (-3)(-3)

http://e-ernest.blogspot.fr/

19/45

Agent

r(et) ℝ ℝ

et ℝ I

Environnement

it ℝ I

Au temps t-L’agent choisit une interaction intentionnelle it

-L’environnement renvoie une interaction effectuée et

-Si et=it alors it est correctement effectuée

Page 20: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Exemple de « la petite boucle »Un ensemble d’interactions possibles (avec des valeurs):

i1 (5) i3 (-3) i5 (-1)i7 (-1) i9 (-1)i2 (-10) i4 (-3) i6 (-1) i8 (-1) i10 (-1)

Les interactions sont organisées en ensembles « d’intéractions alternatives ».

alt1 = {i1, i2} alt2 = {i3} alt3 = {i4}

alt4 = {i5, i6} alt5 = {i7, i8} alt6 = {i9, i10}

- Après i7 , it alt1 résulte plus probablement en i1 qu’en i2 .

- Après i9, i3, i1, i8 , i4, i7, i1 peut souvent être effectuée.

- Après i8 , la séquence i9, i3, i1 c peut souvent être effectuée.

Page 21: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Agent auto-programmant

Interaction sérielle : is = i1, … ik, avec i1, … ik I

Effectuer successivement ses intéractions primitives

Si la jeme intéraction primitive incorrecte:

Si toutes les interactions primitives effectuée correctement: et = it Jt

Interaction sérielle interrompue au pas j : et = i1, … ij-1, ej Jt

Soit Jt l’ensemble des Interactions sérielles connues par l’agent au temps t

Effectuer une interaction sérielle:

Une interaction sérielle fonctionne comme un « programme senrorimoteur » appris

Valeur motivationnelle r(is) = r(i1) +, … + r(ik)

Page 22: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Agent auto-programmant

http://e-ernest.blogspot.fr/

Agent

r(et) ℝ ℝ

et ℝ I

Environnement

it ℝ I

Environnement « connu » au temps t

Mécanisme décisionnel au temps t

ist ℝ Jt est ℝ Jt

Page 23: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Exemple de trace

Page 24: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Parti-pris de modélisationProblème « réel »

Agent

r(et) ℝ ℝ

et ℝ I

Environnement

it ℝ I

Problème formalisé

Agent

r(st) ℝ ℝ

ot ℝ O

Environnement

at ℝ A

Modèle perception-cognition-action

Modèle sensorimoteur

Etc.

Solutions implémentées

Algorithme 1Algorithme 2…

Algorithme 3Algorithme 4…

Page 25: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Exercice

• Deux interactions possibles I = {i1,i2}

• Environnements– Env1: et = it

– Env2: Si it=i1 alors et=i2, si it=i2 alors et = i1

– Env3: se comporte alternativement comme env1 puis comme env2• Systèmes motivationnels :

– Mot1: r(i1) = 1, r(i2) = -1

– Mot2: r(i1) = -1, r(i2) = 1

• Implémenter un agent qui apprenne à effectuer les interactions positives dans tout environnement ℝ {env1,env2,env3}.

Page 26: Techniques de lintelligence artificielle (MIF24) 6 marsOlivier Georgeon 13 marsINTELLIGENCE ARTIFICIELLE 20 marsDEVELOPPEMENTALE 27 mars 3 avrilAlain Mille.

Implémentation• Main.java

– Public static void main() • Agent agent = new Agent(); Environnement env = new Environnement();• Interaction i1 = new Interaction(1); Interaction i2 = new Interaction(-1);• agent.addInteraction(i1); agent.addInteraction(i2);• env.addInteraction(i1);env.addInteraction(i2);• While()

– Interaction = agent.step(prev_interaction);– prev_interaction = env.step(interaction); – System.out.println(interaction);

• Agent.java– Agent0: choisit toujours l’interaction qui a la plus forte valeur.

• Environnement.java• Interaction.java