Why probability in roboAcs? n OEen state of robot and state - - PowerPoint PPT Presentation

why probability in roboacs
SMART_READER_LITE
LIVE PREVIEW

Why probability in roboAcs? n OEen state of robot and state - - PowerPoint PPT Presentation

Probability: Review Pieter Abbeel UC Berkeley EECS Many slides adapted from Thrun, Burgard and Fox, ProbabilisAc RoboAcs Why probability


slide-1
SLIDE 1

Probability: ¡Review ¡

¡ Pieter ¡Abbeel ¡ UC ¡Berkeley ¡EECS ¡

¡ ¡ ¡ ¡ ¡ ¡ Many ¡slides ¡adapted ¡from ¡Thrun, ¡Burgard ¡and ¡Fox, ¡ProbabilisAc ¡RoboAcs ¡ ¡

slide-2
SLIDE 2

n OEen ¡state ¡of ¡robot ¡and ¡state ¡of ¡its ¡environment ¡are ¡unknown ¡and ¡

  • nly ¡noisy ¡sensors ¡available ¡

n Probability ¡provides ¡a ¡framework ¡to ¡fuse ¡sensory ¡informaAon ¡ à Result: ¡probability ¡distribuAon ¡over ¡possible ¡states ¡of ¡robot ¡and ¡environment

¡

n Dynamics ¡is ¡oEen ¡stochasAc, ¡hence ¡can’t ¡opAmize ¡for ¡a ¡parAcular ¡

  • utcome, ¡but ¡only ¡opAmize ¡to ¡obtain ¡a ¡good ¡distribuAon ¡over ¡
  • utcomes ¡ ¡ ¡

n Probability ¡provides ¡a ¡framework ¡to ¡reason ¡in ¡this ¡seLng ¡ à Ability ¡to ¡find ¡good ¡control ¡policies ¡for ¡stochasAc ¡dynamics ¡and ¡

environments ¡

Why ¡probability ¡in ¡roboAcs? ¡

slide-3
SLIDE 3

n State: ¡posiAon, ¡orientaAon, ¡velocity, ¡angular ¡rate ¡ n Sensors: ¡ ¡

n GPS ¡: ¡noisy ¡esAmate ¡of ¡posiAon ¡(someAmes ¡also ¡velocity) ¡ n InerAal ¡sensing ¡unit: ¡noisy ¡measurements ¡from ¡ ¡

(i)

3-­‑axis ¡gyro ¡[=angular ¡rate ¡sensor], ¡ ¡

(ii) 3-­‑axis ¡accelerometer ¡[=measures ¡acceleraAon ¡+ ¡gravity; ¡e.g., ¡measures ¡

(0,0,0) ¡in ¡free-­‑fall], ¡

(iii) 3-­‑axis ¡magnetometer ¡

n Dynamics: ¡

n Noise ¡from: ¡wind, ¡unmodeled ¡dynamics ¡in ¡engine, ¡servos, ¡blades ¡

Example ¡1: ¡Helicopter ¡

slide-4
SLIDE 4

n State: ¡posiAon ¡and ¡heading ¡ n Sensors: ¡

n Odometry ¡(=sensing ¡moAon ¡of ¡actuators): ¡e.g., ¡wheel ¡encoders ¡ ¡ n Laser ¡range ¡finder: ¡ ¡

n Measures ¡Ame ¡of ¡flight ¡of ¡a ¡laser ¡beam ¡between ¡departure ¡and ¡return ¡ ¡ n Return ¡is ¡typically ¡happening ¡when ¡hiLng ¡a ¡surface ¡that ¡reflects ¡the ¡beam ¡

back ¡to ¡where ¡it ¡came ¡from ¡

n Dynamics: ¡

n Noise ¡from: ¡wheel ¡slippage, ¡unmodeled ¡variaAon ¡in ¡floor ¡

Example ¡2: ¡Mobile ¡robot ¡inside ¡building ¡

slide-5
SLIDE 5

Axioms ¡of ¡Probability ¡Theory ¡

1 ) Pr( ≤ ≤ A

Pr(Ω) =1 Pr(A∪B) = Pr(A)+ Pr(B)− Pr(A∩B) Pr(φ) = 0

Pr(A) ¡denotes ¡probability ¡that ¡the ¡outcome ¡ω ¡is ¡an ¡element ¡of ¡ the ¡set ¡of ¡possible ¡outcomes ¡A. ¡A ¡is ¡oEen ¡called ¡an ¡event. ¡ ¡ Same ¡for ¡B. ¡ Ω ¡is ¡the ¡set ¡of ¡all ¡possible ¡outcomes. ¡ ϕ ¡is ¡the ¡empty ¡set. ¡

slide-6
SLIDE 6

A ¡Closer ¡Look ¡at ¡Axiom ¡3 ¡

A∩B A B

Pr(A∪B) = Pr(A)+ Pr(B)− Pr(A∩B)

Ω

slide-7
SLIDE 7

Using ¡the ¡Axioms ¡

Pr(A∪(Ω \ A)) = Pr(A)+ Pr(Ω \ A)− Pr(A∩(Ω \ A)) Pr(Ω) = Pr(A)+ Pr(Ω \ A)− Pr(φ) 1 = Pr(A)+ Pr(Ω \ A)− 0 Pr(Ω \ A) = 1− Pr(A)

slide-8
SLIDE 8

Discrete ¡Random ¡Variables ¡

n X ¡denotes ¡a ¡random ¡variable. ¡ n X ¡can ¡take ¡on ¡a ¡countable ¡number ¡of ¡values ¡in ¡{x1, ¡x2, ¡…, ¡xn}. ¡ n P(X=xi), ¡or ¡P(xi), ¡is ¡the ¡probability ¡that ¡the ¡random ¡variable ¡X ¡takes ¡

  • n ¡value ¡xi. ¡ ¡

n P( ¡) ¡is ¡called ¡probability ¡mass ¡funcAon. ¡

¡

n E.g., ¡X ¡models ¡the ¡outcome ¡of ¡a ¡coin ¡flip, ¡x1 ¡= ¡head, ¡x2 ¡= ¡tail, ¡P( ¡x1 ¡) ¡= ¡

0.5 ¡, ¡P( ¡x2 ¡) ¡= ¡0.5 ¡ ¡

. x1

Ω

x2 x4 x3

slide-9
SLIDE 9

ConAnuous ¡Random ¡Variables ¡

n X ¡takes ¡on ¡values ¡in ¡the ¡conAnuum. ¡ n p(X=x), ¡or ¡p(x), ¡is ¡a ¡probability ¡density ¡funcAon. ¡

¡

n E.g. ¡

= ∈

b a

dx x p b a x ) ( )) , ( Pr(

x p(x)

slide-10
SLIDE 10

Joint ¡and ¡CondiAonal ¡Probability ¡

n P(X=x ¡and ¡Y=y) ¡= ¡P(x,y) ¡ n If ¡X ¡and ¡Y ¡are ¡independent ¡then ¡ ¡

¡ ¡P(x,y) ¡= ¡P(x) ¡P(y) ¡

n P(x ¡| ¡y) ¡is ¡the ¡probability ¡of ¡x ¡given ¡y ¡

¡ ¡P(x ¡| ¡y) ¡= ¡P(x,y) ¡/ ¡P(y) ¡ ¡ ¡P(x,y) ¡ ¡ ¡= ¡P(x ¡| ¡y) ¡P(y) ¡

n If ¡X ¡and ¡Y ¡are ¡independent ¡then ¡

¡ ¡P(x ¡| ¡y) ¡= ¡P(x) ¡

n Same ¡for ¡probability ¡densiEes, ¡just ¡P ¡à ¡p ¡

slide-11
SLIDE 11

Law ¡of ¡Total ¡Probability, ¡Marginals ¡

=

y

y x P x P ) , ( ) (

=

y

y P y x P x P ) ( ) | ( ) (

=

x

x P 1 ) (

Discrete ¡case ¡

=1 ) ( dx x p

Con5nuous ¡case ¡

= dy y p y x p x p ) ( ) | ( ) (

= dy y x p x p ) , ( ) (

slide-12
SLIDE 12

Bayes ¡Formula ¡

evidence prior likelihood ) ( ) ( ) | ( ) ( ) ( ) | ( ) ( ) | ( ) , ( ⋅ = = ⇒ = = y P x P x y P y x P x P x y P y P y x P y x P

slide-13
SLIDE 13

NormalizaAon ¡

) ( ) | ( 1 ) ( ) ( ) | ( ) ( ) ( ) | ( ) (

1

x P x y P y P x P x y P y P x P x y P y x P

x

= = = =

η η

y x x y x y x

y x P x x P x y P x

| | |

aux ) | ( : aux 1 ) ( ) | ( aux : η η = ∀ = = ∀

Algorithm:

slide-14
SLIDE 14

CondiAoning ¡

n Law ¡of ¡total ¡probability: ¡

∫ ∫ ∫

= = = dz y z P z y x P y x P dz z P z x P x P dz z x P x P ) | ( ) , | ( ) ( ) ( ) | ( ) ( ) , ( ) (

slide-15
SLIDE 15

Bayes ¡Rule ¡with ¡Background ¡Knowledge ¡

) | ( ) | ( ) , | ( ) , | ( z y P z x P z x y P z y x P =

slide-16
SLIDE 16

¡ ¡equivalent ¡to ¡ ¡ ¡ ¡ ¡ ¡and ¡

CondiAonal ¡Independence ¡

) | ( ) | ( ) , ( z y P z x P z y x P = ) , | ( ) ( y z x P z x P = ) , | ( ) ( x z y P z y P =

slide-17
SLIDE 17

Simple ¡Example ¡of ¡State ¡EsAmaAon ¡

n Suppose ¡a ¡robot ¡obtains ¡measurement ¡z ¡ n What ¡is ¡P(open|z)? ¡

slide-18
SLIDE 18

Causal ¡vs. ¡DiagnosAc ¡Reasoning ¡

n P(open|z) ¡is ¡diagnosAc. ¡ n P(z|open) ¡is ¡causal. ¡ n OEen ¡causal ¡knowledge ¡is ¡easier ¡to ¡obtain. ¡ n Bayes ¡rule ¡allows ¡us ¡to ¡use ¡causal ¡knowledge: ¡

) ( ) ( ) | ( ) | ( z P

  • pen

P

  • pen

z P z

  • pen

P =

count frequencies!

slide-19
SLIDE 19

Example ¡

n P(z|open) = 0.6

P(z|¬open) = 0.3

n P(open) = P(¬open) = 0.5

67 . 3 2 5 . 3 . 5 . 6 . 5 . 6 . ) | ( ) ( ) | ( ) ( ) | ( ) ( ) | ( ) | ( = = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

p

  • pen

z P

  • pen

p

  • pen

z P

  • pen

P

  • pen

z P z

  • pen

P

  • z raises the probability that the door is open.

P(open | z) = P(z | open)P(open) P(z)

slide-20
SLIDE 20

Combining ¡Evidence ¡

n Suppose ¡our ¡robot ¡obtains ¡another ¡observaAon ¡z2. ¡ n How ¡can ¡we ¡integrate ¡this ¡new ¡informaAon? ¡ n More ¡generally, ¡how ¡can ¡we ¡esAmate ¡

¡ ¡ ¡ ¡P(x| z1...zn )? ¡

slide-21
SLIDE 21

Recursive ¡Bayesian ¡UpdaAng ¡

) , , | ( ) , , | ( ) , , , | ( ) , , | (

1 1 1 1 1 1 1 − − −

=

n n n n n n

z z z P z z x P z z x z P z z x P … … … …

Markov ¡assump5on: ¡zn ¡is ¡independent ¡of ¡z1,...,zn-­‑1 ¡if ¡we ¡know ¡x. ¡

P(x | z1,…, zn) = P(zn | x) P(x | z1,…, zn − 1) P(zn | z1,…, zn − 1) =η P(zn | x) P(x | z1,…, zn − 1) =η1...n P(zi | x)

i=1...n

# $ % & ' (P(x)

slide-22
SLIDE 22

Example: ¡Second ¡Measurement ¡ ¡

n P(z2|open) = 0.5

P(z2|¬open) = 0.6

n P(open|z1)=2/3

625 . 8 5 3 1 5 3 3 2 2 1 3 2 2 1 ) | ( ) | ( ) | ( ) | ( ) | ( ) | ( ) , | (

1 2 1 2 1 2 1 2

= = ⋅ + ⋅ ⋅ = ¬ ¬ + = z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z

  • pen

P

  • pen

z P z z

  • pen

P

  • z2 lowers the probability that the door is open.
slide-23
SLIDE 23

A ¡Typical ¡Pipall ¡

n Two ¡possible ¡locaAons ¡x1 ¡and ¡x2 ¡ n P(x1)=0.99 ¡ ¡ n P(z|x2)=0.09 ¡P(z|x1)=0.07 ¡ ¡

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 25 30 35 40 45 50 p( x | d) Number of integrations p(x2 | d) p(x1 | d)