IFT615 – Intelligence artificielle Planification temporelle Éric Beaudry eric/ Étudiant au...

Post on 04-Apr-2015

108 views 1 download

Transcript of IFT615 – Intelligence artificielle Planification temporelle Éric Beaudry eric/ Étudiant au...

IFT615 – Intelligence artificielle

Planification temporelleÉric Beaudry

http://planiart.usherbrooke.ca/~eric/

Étudiant au doctorat en informatiqueLaboratoire Planiart

Sujets

• Planification temporelle• Planification avec actions simultanées

Planification classique

• Chaque action a une durée implicite (unitaire).• Un plan est une séquence d’actions.• Recherche A*.• «Planification heuristique» = planification

basée sur une recherche avec une heuristique indépendante du domaine.

Plans séquentiels Pos=p1

Pos=p3Pos=p2Pos=p7

Déplacer(p1,p2)

Livrer(m1,p5)

Déplacer(p1,p2)

Déplacer(p1,p2)

… …Pos=p3

Pos=p5

Pos=p5

Déplacer(p3,p5)

Prendre(m1,p3)

MissionLivrer message m1 de p3 à p5

État initialPosition = p1

Plan1. SeDéplacer(p1, p3)2. PrendreMsg(m1, p3)3. SeDéplacer(p3, p5)4. Livrer(m1, p5)

p1

p2

p3p4

p5

p6p7

p8

p9 p10p11

PLANIFICATION DE MISSIONS POUR ROBOTS SUR MARS

Exemple d’une application nécessitant des actions temporelles (concurrente)

5

Image Source : htt

p://marsrovers.jpl.nasa.gov/gallery/artw

ork/hires/rover3.jpg

6

Transport Problem

r1 r2 r3 r4

r5 r6

r1 r2 r3 r4

r5 r6

Initial State Goal State

robot robot

7

Classical Planning (A*)

Goto(r5,r1)

Goto(r5,r2

)

Take

(…)

Goto(…)…

… … … …

… …

Modification pour planification temporelle

• Préconditions Conditions– at start– at end– over all

• L’état a un temps.• Les actions une une durée.

9

Classical Planning

Time=0

Temporal Planning : add current-time to states

Goto(r5, r1)

Goto(r1, r5)

Time=60

Goto(r5, r1)

Time=120

Goto(r1, r5)

Planification temporelle par recherche à chainage avant

• Augmentation de l’espace d’états– Chaque état contient une file d’événements

(agenda) qui mémorise les effets futurs («delayed effects»).

– Un état : • Estampille temporelle• Contenu de l’état (faits)• Une file d’événements futurs

11

Concurrent Mars Rover Problem

InitializeSensor()Goto(a, b) AcquireData(p)

Cond

ition

sEff

ets

Cond

ition

sEff

ets

Cond

ition

sEff

ets

at begin: robotat(a)over all: link(a, b)

at begin: not at(a)at end: at(b)

atbegin: not initialized()

at end: initialized()

over all: at(p) initialized()

at end: not initialized() hasdata(p)

12

Exemple de problème

r1 r2 r3 r4

r5 r6

Initial State

robot

r1 r2 r3 r4

r5 r6

Goal State

Picture r2 .

robot hasCamera (Sensor) is not initialized.

13

Action Concurrency Planning

Time=0

Position=r5

Time=0

120: Position=r2

Goto(r5,r2

)

Goto(c1, r3)

Time=0

150: Position=r3

Time=0

90: Initialized=True

Position=r5

InitCamera()

Time=0

90: Initialized=True120: Position=r2

InitCamera()

…Goto(c1, p1)

Time=90

Position=r5Initialized=True$AdvTemps$

État initial

Position=undefinedPosition=undefined

Position=undefined

14

(Suite) Time=0

120: Position=r2Goto(r5, r2

)

Time=0

90: Initialized=True120: Position=r2

InitCamera()

…Time=0

Position=r5Initialized=False

Time=90

120:+ Position=r2

Position=undefinedInitialized=True

$AdvTemps$

Time=120Position=r2 Initialized=True

$AdvTemps$

Initial State

Time=120

Position=r2

130: HasPicture(r2)=True130: Initialized=False

[120,130] Position=r2

TakePicture()

Time=130Position=r2Initialized=FalseHasPicture(r2)

$AdvTemps$

Position=undefinedInitialized=False

Position=undefinedInitialized=False

15

Extracted Solution Plan

Goto(r5, r2)

InitializeCamera()

TakePicture(r2)

Time (s)0 120906040