This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/CLPBN/clpbn/bp/out.damping.txt
2011-02-23 15:31:56 +00:00

21188 lines
730 KiB
Plaintext

Variable: Burglar
Domain: b1, b2
Parents:
Childs: Alarm
cpt
----------------
b1 0.005
b2 0.995
Variable: FreightTruck
Domain: f1, f2
Parents:
Childs: Alarm
cpt
----------------
f1 0.03
f2 0.97
Variable: Alarm
Domain: a1, a2
Parents: Burglar, FreightTruck
Childs:
cpt b1,f1 b1,f2 b2,f1 b2,f2
----------------------------------------------------
a1 0.992 0.99 0.2 0.003
a2 0.008 0.01 0.8 0.997
Variable: Burglar
Domain: b1, b2
Parents:
Childs: Alarm
cpt
----------------
b1 0.005
b2 0.995
Variable: FreightTruck
Domain: f1, f2
Parents:
Childs: Alarm, _Jn
cpt
----------------
f1 0.03
f2 0.97
Variable: Alarm
Domain: a1, a2
Parents: Burglar, FreightTruck
Childs: _Jn
cpt b1,f1 b1,f2 b2,f1 b2,f2
----------------------------------------------------
a1 0.992 0.99 0.2 0.003
a2 0.008 0.01 0.8 0.997
Variable: _Jn
Domain: _jn0, _jn1, _jn2, _jn3
Parents: FreightTruck, Alarm
Childs:
cpt f1,a1 f1,a2 f2,a1 f2,a2
----------------------------------------------------
_jn0 1 0 0 0
_jn1 0 1 0 0
_jn2 0 0 1 0
_jn3 0 0 0 1
The graph is not single connected. Iterative belief propagation will be used.
Initializing solver
-> schedule = parallel
-> max iters = 150
-> stable threashold = 1e-20
-> query vars = FreightTruck Alarm
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 1 1 0.5
b2 1 1 0.5
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.5 0.5
b2 0.5 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 1 1 0.5
f2 1 1 0.5
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.5 0.5
f2 0.5 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.5 0.5
f2 0.5 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 1 1 0.5
a2 1 1 0.5
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.5 0.5
a2 0.5 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 1 1 0.25
_jn1 1 1 0.25
_jn2 1 1 0.25
_jn3 1 1 0.25
********************************************************************************
Iteration 1
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.5) + (0.99x0.5)]x1
+ [(0.008x0.5) + (0.01x0.5)]x1 = 1
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.5) + (0.003x0.5)]x1
+ [(0.8x0.5) + (0.997x0.5)]x1 = 1
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.5) + (0.2x0.5)]x1
+ [(0.008x0.5) + (0.8x0.5)]x1 = 1
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.5) + (0.003x0.5)]x1
+ [(0.01x0.5) + (0.997x0.5)]x1 = 1
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.5) + (0x0.5)]x1
+ [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 1 = 1
π_Jn(a2) = π(a2) = 1 = 1
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 1
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 1
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.2525x0.343333)
+ (0.99x0.2525x0.656667)
+ (0.2x0.7475x0.343333)
+ (0.003x0.7475x0.656667) = 0.3029492917
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.2525x0.343333)
+ (0.01x0.2525x0.656667)
+ (0.8x0.7475x0.343333)
+ (0.997x0.7475x0.656667) = 0.6970507083
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.343333x0.5)
+ (0x0.343333x0.5)
+ (0x0.656667x0.5)
+ (0x0.656667x0.5) = 0.1716666667
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.343333x0.5)
+ (1x0.343333x0.5)
+ (0x0.656667x0.5)
+ (0x0.656667x0.5) = 0.1716666667
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.343333x0.5)
+ (0x0.343333x0.5)
+ (1x0.656667x0.5)
+ (0x0.656667x0.5) = 0.3283333333
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.343333x0.5)
+ (0x0.343333x0.5)
+ (0x0.656667x0.5)
+ (1x0.656667x0.5) = 0.3283333333
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.2525 0.5
b2 0.7475 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.3433333333 0.5
f2 0.6566666667 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.3433333333 0.5
f2 0.6566666667 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.3029492917 0.5 0.3029492917
a2 0.6970507083 0.5 0.6970507083
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.5 0.5
a2 0.5 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.1716666667 1 0.1716666667
_jn1 0.1716666667 1 0.1716666667
_jn2 0.3283333333 1 0.3283333333
_jn3 0.3283333333 1 0.3283333333
********************************************************************************
Iteration 2
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.343333) + (0.99x0.656667)]x0.5
+ [(0.008x0.343333) + (0.01x0.656667)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.343333) + (0.003x0.656667)]x0.5
+ [(0.8x0.343333) + (0.997x0.656667)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.2525) + (0.2x0.7475)]x0.5
+ [(0.008x0.2525) + (0.8x0.7475)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.2525) + (0.003x0.7475)]x0.5
+ [(0.01x0.2525) + (0.997x0.7475)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.5) + (0x0.5)]x1
+ [(0x0.5) + (0x0.5)]x1
+ [(1x0.5) + (0x0.5)]x1
+ [(0x0.5) + (1x0.5)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.343333) + (0x0.656667)]x1
+ [(0x0.343333) + (0x0.656667)]x1
+ [(0x0.343333) + (1x0.656667)]x1
+ [(0x0.343333) + (0x0.656667)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.343333) + (0x0.656667)]x1
+ [(1x0.343333) + (0x0.656667)]x1
+ [(0x0.343333) + (0x0.656667)]x1
+ [(0x0.343333) + (1x0.656667)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.302949 = 0.3029492917
π_Jn(a2) = π(a2) = 0.697051 = 0.6970507083
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.12875x0.238889)
+ (0.99x0.12875x0.761111)
+ (0.2x0.87125x0.238889)
+ (0.003x0.87125x0.761111) = 0.1711397569
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.12875x0.238889)
+ (0.01x0.12875x0.761111)
+ (0.8x0.87125x0.238889)
+ (0.997x0.87125x0.761111) = 0.8288602431
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.2636190694
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.238889x0.401475)
+ (0x0.238889x0.598525)
+ (0x0.761111x0.401475)
+ (0x0.761111x0.598525) = 0.09590783206
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.238889x0.401475)
+ (1x0.238889x0.598525)
+ (0x0.761111x0.401475)
+ (0x0.761111x0.598525) = 0.1429810568
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.238889x0.401475)
+ (0x0.238889x0.598525)
+ (1x0.761111x0.401475)
+ (0x0.761111x0.598525) = 0.3055668138
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.238889x0.401475)
+ (0x0.238889x0.598525)
+ (0x0.761111x0.401475)
+ (1x0.761111x0.598525) = 0.4555442973
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.254421928
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.12875 0.5
b2 0.87125 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.2388888889 0.5
f2 0.7611111111 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.2388888889 0.5
f2 0.7611111111 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.1711397569 0.5 0.1711397569
a2 0.8288602431 0.5 0.8288602431
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.4014746458 0.5
a2 0.5985253542 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.09590783206 1 0.09590783206
_jn1 0.1429810568 1 0.1429810568
_jn2 0.3055668138 1 0.3055668138
_jn3 0.4555442973 1 0.4555442973
********************************************************************************
Iteration 3
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.238889) + (0.99x0.761111)]x0.5
+ [(0.008x0.238889) + (0.01x0.761111)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.238889) + (0.003x0.761111)]x0.5
+ [(0.8x0.238889) + (0.997x0.761111)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.12875) + (0.2x0.87125)]x0.5
+ [(0.008x0.12875) + (0.8x0.87125)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.12875) + (0.003x0.87125)]x0.5
+ [(0.01x0.12875) + (0.997x0.87125)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.401475) + (0x0.598525)]x1
+ [(0x0.401475) + (1x0.598525)]x1
+ [(0x0.401475) + (0x0.598525)]x1
+ [(0x0.401475) + (0x0.598525)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.401475) + (0x0.598525)]x1
+ [(0x0.401475) + (0x0.598525)]x1
+ [(1x0.401475) + (0x0.598525)]x1
+ [(0x0.401475) + (1x0.598525)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.238889) + (0x0.761111)]x1
+ [(0x0.238889) + (0x0.761111)]x1
+ [(0x0.238889) + (1x0.761111)]x1
+ [(0x0.238889) + (0x0.761111)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.238889) + (0x0.761111)]x1
+ [(1x0.238889) + (0x0.761111)]x1
+ [(0x0.238889) + (0x0.761111)]x1
+ [(0x0.238889) + (1x0.761111)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.17114 = 0.1711397569
π_Jn(a2) = π(a2) = 0.82886 = 0.8288602431
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.066875x0.169259)
+ (0.99x0.066875x0.830741)
+ (0.2x0.933125x0.169259)
+ (0.003x0.933125x0.830741) = 0.1001424525
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.066875x0.169259)
+ (0.01x0.066875x0.830741)
+ (0.8x0.933125x0.169259)
+ (0.997x0.933125x0.830741) = 0.8998575475
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.1419946088
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.169259x0.286307)
+ (0x0.169259x0.713693)
+ (0x0.830741x0.286307)
+ (0x0.830741x0.713693) = 0.04846014483
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.169259x0.286307)
+ (1x0.169259x0.713693)
+ (0x0.830741x0.286307)
+ (0x0.830741x0.713693) = 0.1207991144
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.169259x0.286307)
+ (0x0.169259x0.713693)
+ (1x0.830741x0.286307)
+ (0x0.830741x0.713693) = 0.2378470566
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.169259x0.286307)
+ (0x0.169259x0.713693)
+ (0x0.830741x0.286307)
+ (1x0.830741x0.713693) = 0.5928936842
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.2746987737
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.066875 0.5
b2 0.933125 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.1692592593 0.5
f2 0.8307407407 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.1692592593 0.5
f2 0.8307407407 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.1001424525 0.5 0.1001424525
a2 0.8998575475 0.5 0.8998575475
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.2863072014 0.5
a2 0.7136927986 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.04846014483 1 0.04846014483
_jn1 0.1207991144 1 0.1207991144
_jn2 0.2378470566 1 0.2378470566
_jn3 0.5928936842 1 0.5928936842
********************************************************************************
Iteration 4
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.169259) + (0.99x0.830741)]x0.5
+ [(0.008x0.169259) + (0.01x0.830741)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.169259) + (0.003x0.830741)]x0.5
+ [(0.8x0.169259) + (0.997x0.830741)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.066875) + (0.2x0.933125)]x0.5
+ [(0.008x0.066875) + (0.8x0.933125)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.066875) + (0.003x0.933125)]x0.5
+ [(0.01x0.066875) + (0.997x0.933125)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.286307) + (0x0.713693)]x1
+ [(0x0.286307) + (1x0.713693)]x1
+ [(0x0.286307) + (0x0.713693)]x1
+ [(0x0.286307) + (0x0.713693)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.286307) + (0x0.713693)]x1
+ [(0x0.286307) + (0x0.713693)]x1
+ [(1x0.286307) + (0x0.713693)]x1
+ [(0x0.286307) + (1x0.713693)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.169259) + (0x0.830741)]x1
+ [(0x0.169259) + (0x0.830741)]x1
+ [(0x0.169259) + (1x0.830741)]x1
+ [(0x0.169259) + (0x0.830741)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.169259) + (0x0.830741)]x1
+ [(1x0.169259) + (0x0.830741)]x1
+ [(0x0.169259) + (0x0.830741)]x1
+ [(0x0.169259) + (1x0.830741)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.100142 = 0.1001424525
π_Jn(a2) = π(a2) = 0.899858 = 0.8998575475
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0359375x0.12284)
+ (0.99x0.0359375x0.87716)
+ (0.2x0.964063x0.12284)
+ (0.003x0.964063x0.87716) = 0.06180885899
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0359375x0.12284)
+ (0.01x0.0359375x0.87716)
+ (0.8x0.964063x0.12284)
+ (0.997x0.964063x0.87716) = 0.938191141
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.07666718711
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.12284x0.193225)
+ (0x0.12284x0.806775)
+ (0x0.87716x0.193225)
+ (0x0.87716x0.806775) = 0.02373564233
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.12284x0.193225)
+ (1x0.12284x0.806775)
+ (0x0.87716x0.193225)
+ (0x0.87716x0.806775) = 0.09910386385
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.12284x0.193225)
+ (0x0.12284x0.806775)
+ (1x0.87716x0.193225)
+ (0x0.87716x0.806775) = 0.1694891846
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.12284x0.193225)
+ (0x0.12284x0.806775)
+ (0x0.87716x0.193225)
+ (1x0.87716x0.806775) = 0.7076713092
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.22955525
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.0359375 0.5
b2 0.9640625 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.1228395062 0.5
f2 0.8771604938 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.1228395062 0.5
f2 0.8771604938 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.06180885899 0.5 0.06180885899
a2 0.938191141 0.5 0.938191141
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.193224827 0.5
a2 0.806775173 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.02373564233 1 0.02373564233
_jn1 0.09910386385 1 0.09910386385
_jn2 0.1694891846 1 0.1694891846
_jn3 0.7076713092 1 0.7076713092
********************************************************************************
Iteration 5
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.12284) + (0.99x0.87716)]x0.5
+ [(0.008x0.12284) + (0.01x0.87716)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.12284) + (0.003x0.87716)]x0.5
+ [(0.8x0.12284) + (0.997x0.87716)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0359375) + (0.2x0.964063)]x0.5
+ [(0.008x0.0359375) + (0.8x0.964063)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0359375) + (0.003x0.964063)]x0.5
+ [(0.01x0.0359375) + (0.997x0.964063)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.193225) + (0x0.806775)]x1
+ [(0x0.193225) + (1x0.806775)]x1
+ [(0x0.193225) + (0x0.806775)]x1
+ [(0x0.193225) + (0x0.806775)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.193225) + (0x0.806775)]x1
+ [(0x0.193225) + (0x0.806775)]x1
+ [(1x0.193225) + (0x0.806775)]x1
+ [(0x0.193225) + (1x0.806775)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.12284) + (0x0.87716)]x1
+ [(0x0.12284) + (0x0.87716)]x1
+ [(0x0.12284) + (1x0.87716)]x1
+ [(0x0.12284) + (0x0.87716)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.12284) + (0x0.87716)]x1
+ [(1x0.12284) + (0x0.87716)]x1
+ [(0x0.12284) + (0x0.87716)]x1
+ [(0x0.12284) + (1x0.87716)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0618089 = 0.06180885899
π_Jn(a2) = π(a2) = 0.938191 = 0.938191141
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0204688x0.091893)
+ (0.99x0.0204688x0.908107)
+ (0.2x0.979531x0.091893)
+ (0.003x0.979531x0.908107) = 0.04093879575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0204688x0.091893)
+ (0.01x0.0204688x0.908107)
+ (0.8x0.979531x0.091893)
+ (0.997x0.979531x0.908107) = 0.9590612043
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.04174012648
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.091893x0.127517)
+ (0x0.091893x0.872483)
+ (0x0.908107x0.127517)
+ (0x0.908107x0.872483) = 0.01171790578
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.091893x0.127517)
+ (1x0.091893x0.872483)
+ (0x0.908107x0.127517)
+ (0x0.908107x0.872483) = 0.08017509834
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.091893x0.127517)
+ (0x0.091893x0.872483)
+ (1x0.908107x0.127517)
+ (0x0.908107x0.872483) = 0.1157989372
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.091893x0.127517)
+ (0x0.091893x0.872483)
+ (0x0.908107x0.127517)
+ (1x0.908107x0.872483) = 0.7923080587
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.169273499
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.02046875 0.5
b2 0.97953125 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.09189300412 0.5
f2 0.9081069959 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.09189300412 0.5
f2 0.9081069959 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.04093879575 0.5 0.04093879575
a2 0.9590612043 0.5 0.9590612043
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.127516843 0.5
a2 0.872483157 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.01171790578 1 0.01171790578
_jn1 0.08017509834 1 0.08017509834
_jn2 0.1157989372 1 0.1157989372
_jn3 0.7923080587 1 0.7923080587
********************************************************************************
Iteration 6
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.091893) + (0.99x0.908107)]x0.5
+ [(0.008x0.091893) + (0.01x0.908107)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.091893) + (0.003x0.908107)]x0.5
+ [(0.8x0.091893) + (0.997x0.908107)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0204688) + (0.2x0.979531)]x0.5
+ [(0.008x0.0204688) + (0.8x0.979531)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0204688) + (0.003x0.979531)]x0.5
+ [(0.01x0.0204688) + (0.997x0.979531)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.127517) + (0x0.872483)]x1
+ [(0x0.127517) + (1x0.872483)]x1
+ [(0x0.127517) + (0x0.872483)]x1
+ [(0x0.127517) + (0x0.872483)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.127517) + (0x0.872483)]x1
+ [(0x0.127517) + (0x0.872483)]x1
+ [(1x0.127517) + (0x0.872483)]x1
+ [(0x0.127517) + (1x0.872483)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.091893) + (0x0.908107)]x1
+ [(0x0.091893) + (0x0.908107)]x1
+ [(0x0.091893) + (1x0.908107)]x1
+ [(0x0.091893) + (0x0.908107)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.091893) + (0x0.908107)]x1
+ [(1x0.091893) + (0x0.908107)]x1
+ [(0x0.091893) + (0x0.908107)]x1
+ [(0x0.091893) + (1x0.908107)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0409388 = 0.04093879575
π_Jn(a2) = π(a2) = 0.959061 = 0.9590612043
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0127344x0.071262)
+ (0.99x0.0127344x0.928738)
+ (0.2x0.987266x0.071262)
+ (0.003x0.987266x0.928738) = 0.02943048464
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0127344x0.071262)
+ (0.01x0.0127344x0.928738)
+ (0.8x0.987266x0.071262)
+ (0.997x0.987266x0.928738) = 0.9705695154
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.02301662222
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.071262x0.0842278)
+ (0x0.071262x0.915772)
+ (0x0.928738x0.0842278)
+ (0x0.928738x0.915772) = 0.006002243095
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.071262x0.0842278)
+ (1x0.071262x0.915772)
+ (0x0.928738x0.0842278)
+ (0x0.928738x0.915772) = 0.06525975965
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.071262x0.0842278)
+ (0x0.071262x0.915772)
+ (1x0.928738x0.0842278)
+ (0x0.928738x0.915772) = 0.07822557627
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.071262x0.0842278)
+ (0x0.071262x0.915772)
+ (0x0.928738x0.0842278)
+ (1x0.928738x0.915772) = 0.850512421
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.1164087246
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.012734375 0.5
b2 0.987265625 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.07126200274 0.5
f2 0.9287379973 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.07126200274 0.5
f2 0.9287379973 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.02943048464 0.5 0.02943048464
a2 0.9705695154 0.5 0.9705695154
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.08422781936 0.5
a2 0.9157721806 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.006002243095 1 0.006002243095
_jn1 0.06525975965 1 0.06525975965
_jn2 0.07822557627 1 0.07822557627
_jn3 0.850512421 1 0.850512421
********************************************************************************
Iteration 7
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.071262) + (0.99x0.928738)]x0.5
+ [(0.008x0.071262) + (0.01x0.928738)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.071262) + (0.003x0.928738)]x0.5
+ [(0.8x0.071262) + (0.997x0.928738)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0127344) + (0.2x0.987266)]x0.5
+ [(0.008x0.0127344) + (0.8x0.987266)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0127344) + (0.003x0.987266)]x0.5
+ [(0.01x0.0127344) + (0.997x0.987266)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0842278) + (0x0.915772)]x1
+ [(0x0.0842278) + (1x0.915772)]x1
+ [(0x0.0842278) + (0x0.915772)]x1
+ [(0x0.0842278) + (0x0.915772)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0842278) + (0x0.915772)]x1
+ [(0x0.0842278) + (0x0.915772)]x1
+ [(1x0.0842278) + (0x0.915772)]x1
+ [(0x0.0842278) + (1x0.915772)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.071262) + (0x0.928738)]x1
+ [(0x0.071262) + (0x0.928738)]x1
+ [(0x0.071262) + (1x0.928738)]x1
+ [(0x0.071262) + (0x0.928738)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.071262) + (0x0.928738)]x1
+ [(1x0.071262) + (0x0.928738)]x1
+ [(0x0.071262) + (0x0.928738)]x1
+ [(0x0.071262) + (1x0.928738)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0294305 = 0.02943048464
π_Jn(a2) = π(a2) = 0.97057 = 0.9705695154
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00886719x0.057508)
+ (0.99x0.00886719x0.942492)
+ (0.2x0.991133x0.057508)
+ (0.003x0.991133x0.942492) = 0.02298155325
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00886719x0.057508)
+ (0.01x0.00886719x0.942492)
+ (0.8x0.991133x0.057508)
+ (0.997x0.991133x0.942492) = 0.9770184468
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.01289786278
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.057508x0.0568292)
+ (0x0.057508x0.943171)
+ (0x0.942492x0.0568292)
+ (0x0.942492x0.943171) = 0.003268130977
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.057508x0.0568292)
+ (1x0.057508x0.943171)
+ (0x0.942492x0.0568292)
+ (0x0.942492x0.943171) = 0.05423987085
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.057508x0.0568292)
+ (0x0.057508x0.943171)
+ (1x0.942492x0.0568292)
+ (0x0.942492x0.943171) = 0.05356102102
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.057508x0.0568292)
+ (0x0.057508x0.943171)
+ (0x0.942492x0.0568292)
+ (1x0.942492x0.943171) = 0.8889309771
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.07683711232
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.0088671875 0.5
b2 0.9911328125 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.05750800183 0.5
f2 0.9424919982 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.05750800183 0.5
f2 0.9424919982 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.02298155325 0.5 0.02298155325
a2 0.9770184468 0.5 0.9770184468
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.056829152 0.5
a2 0.943170848 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.003268130977 1 0.003268130977
_jn1 0.05423987085 1 0.05423987085
_jn2 0.05356102102 1 0.05356102102
_jn3 0.8889309771 1 0.8889309771
********************************************************************************
Iteration 8
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.057508) + (0.99x0.942492)]x0.5
+ [(0.008x0.057508) + (0.01x0.942492)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.057508) + (0.003x0.942492)]x0.5
+ [(0.8x0.057508) + (0.997x0.942492)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00886719) + (0.2x0.991133)]x0.5
+ [(0.008x0.00886719) + (0.8x0.991133)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00886719) + (0.003x0.991133)]x0.5
+ [(0.01x0.00886719) + (0.997x0.991133)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0568292) + (0x0.943171)]x1
+ [(0x0.0568292) + (1x0.943171)]x1
+ [(0x0.0568292) + (0x0.943171)]x1
+ [(0x0.0568292) + (0x0.943171)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0568292) + (0x0.943171)]x1
+ [(0x0.0568292) + (0x0.943171)]x1
+ [(1x0.0568292) + (0x0.943171)]x1
+ [(0x0.0568292) + (1x0.943171)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.057508) + (0x0.942492)]x1
+ [(0x0.057508) + (0x0.942492)]x1
+ [(0x0.057508) + (1x0.942492)]x1
+ [(0x0.057508) + (0x0.942492)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.057508) + (0x0.942492)]x1
+ [(1x0.057508) + (0x0.942492)]x1
+ [(0x0.057508) + (0x0.942492)]x1
+ [(0x0.057508) + (1x0.942492)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0229816 = 0.02298155325
π_Jn(a2) = π(a2) = 0.977018 = 0.9770184468
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00693359x0.0483387)
+ (0.99x0.00693359x0.951661)
+ (0.2x0.993066x0.0483387)
+ (0.003x0.993066x0.951661) = 0.01930081827
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00693359x0.0483387)
+ (0.01x0.00693359x0.951661)
+ (0.8x0.993066x0.0483387)
+ (0.997x0.993066x0.951661) = 0.9806991817
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.007361469952
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0483387x0.0399054)
+ (0x0.0483387x0.960095)
+ (0x0.951661x0.0399054)
+ (0x0.951661x0.960095) = 0.001928971587
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0483387x0.0399054)
+ (1x0.0483387x0.960095)
+ (0x0.951661x0.0399054)
+ (0x0.951661x0.960095) = 0.0464096963
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0483387x0.0399054)
+ (0x0.0483387x0.960095)
+ (1x0.951661x0.0399054)
+ (0x0.951661x0.960095) = 0.03797638104
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0483387x0.0399054)
+ (0x0.0483387x0.960095)
+ (0x0.951661x0.0399054)
+ (1x0.951661x0.960095) = 0.9136849511
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.04950794786
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.00693359375 0.5
b2 0.9930664063 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.04833866789 0.5
f2 0.9516613321 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.04833866789 0.5
f2 0.9516613321 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01930081827 0.5 0.01930081827
a2 0.9806991817 0.5 0.9806991817
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.03990535262 0.5
a2 0.9600946474 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.001928971587 1 0.001928971587
_jn1 0.0464096963 1 0.0464096963
_jn2 0.03797638104 1 0.03797638104
_jn3 0.9136849511 1 0.9136849511
********************************************************************************
Iteration 9
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0483387) + (0.99x0.951661)]x0.5
+ [(0.008x0.0483387) + (0.01x0.951661)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0483387) + (0.003x0.951661)]x0.5
+ [(0.8x0.0483387) + (0.997x0.951661)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00693359) + (0.2x0.993066)]x0.5
+ [(0.008x0.00693359) + (0.8x0.993066)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00693359) + (0.003x0.993066)]x0.5
+ [(0.01x0.00693359) + (0.997x0.993066)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0399054) + (0x0.960095)]x1
+ [(0x0.0399054) + (1x0.960095)]x1
+ [(0x0.0399054) + (0x0.960095)]x1
+ [(0x0.0399054) + (0x0.960095)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0399054) + (0x0.960095)]x1
+ [(0x0.0399054) + (0x0.960095)]x1
+ [(1x0.0399054) + (0x0.960095)]x1
+ [(0x0.0399054) + (1x0.960095)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0483387) + (0x0.951661)]x1
+ [(0x0.0483387) + (0x0.951661)]x1
+ [(0x0.0483387) + (1x0.951661)]x1
+ [(0x0.0483387) + (0x0.951661)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0483387) + (0x0.951661)]x1
+ [(1x0.0483387) + (0x0.951661)]x1
+ [(0x0.0483387) + (0x0.951661)]x1
+ [(0x0.0483387) + (1x0.951661)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0193008 = 0.01930081827
π_Jn(a2) = π(a2) = 0.980699 = 0.9806991817
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0059668x0.0422258)
+ (0.99x0.0059668x0.957774)
+ (0.2x0.994033x0.0422258)
+ (0.003x0.994033x0.957774) = 0.01715857613
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0059668x0.0422258)
+ (0.01x0.0059668x0.957774)
+ (0.8x0.994033x0.0422258)
+ (0.997x0.994033x0.957774) = 0.9828414239
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.004284484277
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0422258x0.0296031)
+ (0x0.0422258x0.970397)
+ (0x0.957774x0.0296031)
+ (0x0.957774x0.970397) = 0.001250013332
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0422258x0.0296031)
+ (1x0.0422258x0.970397)
+ (0x0.957774x0.0296031)
+ (0x0.957774x0.970397) = 0.04097576526
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0422258x0.0296031)
+ (0x0.0422258x0.970397)
+ (1x0.957774x0.0296031)
+ (0x0.957774x0.970397) = 0.02835307212
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0422258x0.0296031)
+ (0x0.0422258x0.970397)
+ (0x0.957774x0.0296031)
+ (1x0.957774x0.970397) = 0.9294211493
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.03147239643
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005966796875 0.5
b2 0.9940332031 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.04222577859 0.5
f2 0.9577742214 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.04222577859 0.5
f2 0.9577742214 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01715857613 0.5 0.01715857613
a2 0.9828414239 0.5 0.9828414239
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.02960308545 0.5
a2 0.9703969146 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.001250013332 1 0.001250013332
_jn1 0.04097576526 1 0.04097576526
_jn2 0.02835307212 1 0.02835307212
_jn3 0.9294211493 1 0.9294211493
********************************************************************************
Iteration 10
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0422258) + (0.99x0.957774)]x0.5
+ [(0.008x0.0422258) + (0.01x0.957774)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0422258) + (0.003x0.957774)]x0.5
+ [(0.8x0.0422258) + (0.997x0.957774)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0059668) + (0.2x0.994033)]x0.5
+ [(0.008x0.0059668) + (0.8x0.994033)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0059668) + (0.003x0.994033)]x0.5
+ [(0.01x0.0059668) + (0.997x0.994033)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0296031) + (0x0.970397)]x1
+ [(0x0.0296031) + (1x0.970397)]x1
+ [(0x0.0296031) + (0x0.970397)]x1
+ [(0x0.0296031) + (0x0.970397)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0296031) + (0x0.970397)]x1
+ [(0x0.0296031) + (0x0.970397)]x1
+ [(1x0.0296031) + (0x0.970397)]x1
+ [(0x0.0296031) + (1x0.970397)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0422258) + (0x0.957774)]x1
+ [(0x0.0422258) + (0x0.957774)]x1
+ [(0x0.0422258) + (1x0.957774)]x1
+ [(0x0.0422258) + (0x0.957774)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0422258) + (0x0.957774)]x1
+ [(1x0.0422258) + (0x0.957774)]x1
+ [(0x0.0422258) + (0x0.957774)]x1
+ [(0x0.0422258) + (1x0.957774)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0171586 = 0.01715857613
π_Jn(a2) = π(a2) = 0.982841 = 0.9828414239
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0054834x0.0381505)
+ (0.99x0.0054834x0.961849)
+ (0.2x0.994517x0.0381505)
+ (0.003x0.994517x0.961849) = 0.01588697359
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0054834x0.0381505)
+ (0.01x0.0054834x0.961849)
+ (0.8x0.994517x0.0381505)
+ (0.997x0.994517x0.961849) = 0.9841130264
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.002543205093
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0381505x0.0233808)
+ (0x0.0381505x0.976619)
+ (0x0.961849x0.0233808)
+ (0x0.961849x0.976619) = 0.0008919908307
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0381505x0.0233808)
+ (1x0.0381505x0.976619)
+ (0x0.961849x0.0233808)
+ (0x0.961849x0.976619) = 0.03725852823
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0381505x0.0233808)
+ (0x0.0381505x0.976619)
+ (1x0.961849x0.0233808)
+ (0x0.961849x0.976619) = 0.02248883996
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0381505x0.0233808)
+ (0x0.0381505x0.976619)
+ (0x0.961849x0.0233808)
+ (1x0.961849x0.976619) = 0.939360641
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.01987898337
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005483398438 0.5
b2 0.9945166016 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03815051906 0.5
f2 0.9618494809 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03815051906 0.5
f2 0.9618494809 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01588697359 0.5 0.01588697359
a2 0.9841130264 0.5 0.9841130264
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.02338083079 0.5
a2 0.9766191692 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0008919908307 1 0.0008919908307
_jn1 0.03725852823 1 0.03725852823
_jn2 0.02248883996 1 0.02248883996
_jn3 0.939360641 1 0.939360641
********************************************************************************
Iteration 11
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0381505) + (0.99x0.961849)]x0.5
+ [(0.008x0.0381505) + (0.01x0.961849)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0381505) + (0.003x0.961849)]x0.5
+ [(0.8x0.0381505) + (0.997x0.961849)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0054834) + (0.2x0.994517)]x0.5
+ [(0.008x0.0054834) + (0.8x0.994517)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0054834) + (0.003x0.994517)]x0.5
+ [(0.01x0.0054834) + (0.997x0.994517)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0233808) + (0x0.976619)]x1
+ [(0x0.0233808) + (1x0.976619)]x1
+ [(0x0.0233808) + (0x0.976619)]x1
+ [(0x0.0233808) + (0x0.976619)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0233808) + (0x0.976619)]x1
+ [(0x0.0233808) + (0x0.976619)]x1
+ [(1x0.0233808) + (0x0.976619)]x1
+ [(0x0.0233808) + (1x0.976619)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0381505) + (0x0.961849)]x1
+ [(0x0.0381505) + (0x0.961849)]x1
+ [(0x0.0381505) + (1x0.961849)]x1
+ [(0x0.0381505) + (0x0.961849)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0381505) + (0x0.961849)]x1
+ [(1x0.0381505) + (0x0.961849)]x1
+ [(0x0.0381505) + (0x0.961849)]x1
+ [(0x0.0381505) + (1x0.961849)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.015887 = 0.01588697359
π_Jn(a2) = π(a2) = 0.984113 = 0.9841130264
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.0052417x0.0354337)
+ (0.99x0.0052417x0.964566)
+ (0.2x0.994758x0.0354337)
+ (0.003x0.994758x0.964566) = 0.01511777409
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.0052417x0.0354337)
+ (0.01x0.0052417x0.964566)
+ (0.8x0.994758x0.0354337)
+ (0.997x0.994758x0.964566) = 0.9848822259
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.00153839899
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0354337x0.0196339)
+ (0x0.0354337x0.980366)
+ (0x0.964566x0.0196339)
+ (0x0.964566x0.980366) = 0.000695701395
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0354337x0.0196339)
+ (1x0.0354337x0.980366)
+ (0x0.964566x0.0196339)
+ (0x0.964566x0.980366) = 0.03473797798
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0354337x0.0196339)
+ (0x0.0354337x0.980366)
+ (1x0.964566x0.0196339)
+ (0x0.964566x0.980366) = 0.01893820079
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0354337x0.0196339)
+ (0x0.0354337x0.980366)
+ (0x0.964566x0.0196339)
+ (1x0.964566x0.980366) = 0.9456281198
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.01253495771
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005241699219 0.5
b2 0.9947583008 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03543367937 0.5
f2 0.9645663206 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03543367937 0.5
f2 0.9645663206 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01511777409 0.5 0.01511777409
a2 0.9848822259 0.5 0.9848822259
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01963390219 0.5
a2 0.9803660978 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.000695701395 1 0.000695701395
_jn1 0.03473797798 1 0.03473797798
_jn2 0.01893820079 1 0.01893820079
_jn3 0.9456281198 1 0.9456281198
********************************************************************************
Iteration 12
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0354337) + (0.99x0.964566)]x0.5
+ [(0.008x0.0354337) + (0.01x0.964566)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0354337) + (0.003x0.964566)]x0.5
+ [(0.8x0.0354337) + (0.997x0.964566)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.0052417) + (0.2x0.994758)]x0.5
+ [(0.008x0.0052417) + (0.8x0.994758)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.0052417) + (0.003x0.994758)]x0.5
+ [(0.01x0.0052417) + (0.997x0.994758)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0196339) + (0x0.980366)]x1
+ [(0x0.0196339) + (1x0.980366)]x1
+ [(0x0.0196339) + (0x0.980366)]x1
+ [(0x0.0196339) + (0x0.980366)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0196339) + (0x0.980366)]x1
+ [(0x0.0196339) + (0x0.980366)]x1
+ [(1x0.0196339) + (0x0.980366)]x1
+ [(0x0.0196339) + (1x0.980366)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0354337) + (0x0.964566)]x1
+ [(0x0.0354337) + (0x0.964566)]x1
+ [(0x0.0354337) + (1x0.964566)]x1
+ [(0x0.0354337) + (0x0.964566)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0354337) + (0x0.964566)]x1
+ [(1x0.0354337) + (0x0.964566)]x1
+ [(0x0.0354337) + (0x0.964566)]x1
+ [(0x0.0354337) + (1x0.964566)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0151178 = 0.01511777409
π_Jn(a2) = π(a2) = 0.984882 = 0.9848822259
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00512085x0.0336225)
+ (0.99x0.00512085x0.966378)
+ (0.2x0.994879x0.0336225)
+ (0.003x0.994879x0.966378) = 0.01464432756
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00512085x0.0336225)
+ (0.01x0.00512085x0.966378)
+ (0.8x0.994879x0.0336225)
+ (0.997x0.994879x0.966378) = 0.9853556724
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0009468930591
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0336225x0.0173758)
+ (0x0.0336225x0.982624)
+ (0x0.966378x0.0173758)
+ (0x0.966378x0.982624) = 0.0005842182997
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0336225x0.0173758)
+ (1x0.0336225x0.982624)
+ (0x0.966378x0.0173758)
+ (0x0.966378x0.982624) = 0.03303823462
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0336225x0.0173758)
+ (0x0.0336225x0.982624)
+ (1x0.966378x0.0173758)
+ (0x0.966378x0.982624) = 0.01679161984
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0336225x0.0173758)
+ (0x0.0336225x0.982624)
+ (0x0.966378x0.0173758)
+ (1x0.966378x0.982624) = 0.9495859272
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.007915614822
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005120849609 0.5
b2 0.9948791504 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03362245292 0.5
f2 0.9663775471 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03362245292 0.5
f2 0.9663775471 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01464432756 0.5 0.01464432756
a2 0.9853556724 0.5 0.9853556724
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01737583814 0.5
a2 0.9826241619 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0005842182997 1 0.0005842182997
_jn1 0.03303823462 1 0.03303823462
_jn2 0.01679161984 1 0.01679161984
_jn3 0.9495859272 1 0.9495859272
********************************************************************************
Iteration 13
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0336225) + (0.99x0.966378)]x0.5
+ [(0.008x0.0336225) + (0.01x0.966378)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0336225) + (0.003x0.966378)]x0.5
+ [(0.8x0.0336225) + (0.997x0.966378)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00512085) + (0.2x0.994879)]x0.5
+ [(0.008x0.00512085) + (0.8x0.994879)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00512085) + (0.003x0.994879)]x0.5
+ [(0.01x0.00512085) + (0.997x0.994879)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0173758) + (0x0.982624)]x1
+ [(0x0.0173758) + (1x0.982624)]x1
+ [(0x0.0173758) + (0x0.982624)]x1
+ [(0x0.0173758) + (0x0.982624)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0173758) + (0x0.982624)]x1
+ [(0x0.0173758) + (0x0.982624)]x1
+ [(1x0.0173758) + (0x0.982624)]x1
+ [(0x0.0173758) + (1x0.982624)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0336225) + (0x0.966378)]x1
+ [(0x0.0336225) + (0x0.966378)]x1
+ [(0x0.0336225) + (1x0.966378)]x1
+ [(0x0.0336225) + (0x0.966378)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0336225) + (0x0.966378)]x1
+ [(1x0.0336225) + (0x0.966378)]x1
+ [(0x0.0336225) + (0x0.966378)]x1
+ [(0x0.0336225) + (1x0.966378)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0146443 = 0.01464432756
π_Jn(a2) = π(a2) = 0.985356 = 0.9853556724
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00506042x0.032415)
+ (0.99x0.00506042x0.967585)
+ (0.2x0.99494x0.032415)
+ (0.003x0.99494x0.967585) = 0.01434840156
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00506042x0.032415)
+ (0.01x0.00506042x0.967585)
+ (0.8x0.99494x0.032415)
+ (0.997x0.99494x0.967585) = 0.9856515984
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0005918519954
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.032415x0.0160101)
+ (0x0.032415x0.98399)
+ (0x0.967585x0.0160101)
+ (0x0.967585x0.98399) = 0.0005189663331
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.032415x0.0160101)
+ (1x0.032415x0.98399)
+ (0x0.967585x0.0160101)
+ (0x0.967585x0.98399) = 0.03189600228
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.032415x0.0160101)
+ (0x0.032415x0.98399)
+ (1x0.967585x0.0160101)
+ (0x0.967585x0.98399) = 0.01549111652
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.032415x0.0160101)
+ (0x0.032415x0.98399)
+ (0x0.967585x0.0160101)
+ (1x0.967585x0.98399) = 0.9520939149
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.005015975255
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005060424805 0.5
b2 0.9949395752 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03241496861 0.5
f2 0.9675850314 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03241496861 0.5
f2 0.9675850314 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01434840156 0.5 0.01434840156
a2 0.9856515984 0.5 0.9856515984
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01601008285 0.5
a2 0.9839899171 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0005189663331 1 0.0005189663331
_jn1 0.03189600228 1 0.03189600228
_jn2 0.01549111652 1 0.01549111652
_jn3 0.9520939149 1 0.9520939149
********************************************************************************
Iteration 14
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.032415) + (0.99x0.967585)]x0.5
+ [(0.008x0.032415) + (0.01x0.967585)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.032415) + (0.003x0.967585)]x0.5
+ [(0.8x0.032415) + (0.997x0.967585)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00506042) + (0.2x0.99494)]x0.5
+ [(0.008x0.00506042) + (0.8x0.99494)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00506042) + (0.003x0.99494)]x0.5
+ [(0.01x0.00506042) + (0.997x0.99494)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0160101) + (0x0.98399)]x1
+ [(0x0.0160101) + (1x0.98399)]x1
+ [(0x0.0160101) + (0x0.98399)]x1
+ [(0x0.0160101) + (0x0.98399)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0160101) + (0x0.98399)]x1
+ [(0x0.0160101) + (0x0.98399)]x1
+ [(1x0.0160101) + (0x0.98399)]x1
+ [(0x0.0160101) + (1x0.98399)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.032415) + (0x0.967585)]x1
+ [(0x0.032415) + (0x0.967585)]x1
+ [(0x0.032415) + (1x0.967585)]x1
+ [(0x0.032415) + (0x0.967585)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.032415) + (0x0.967585)]x1
+ [(1x0.032415) + (0x0.967585)]x1
+ [(0x0.032415) + (0x0.967585)]x1
+ [(0x0.032415) + (1x0.967585)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0143484 = 0.01434840156
π_Jn(a2) = π(a2) = 0.985652 = 0.9856515984
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00503021x0.03161)
+ (0.99x0.00503021x0.96839)
+ (0.2x0.99497x0.03161)
+ (0.003x0.99497x0.96839) = 0.01416097956
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00503021x0.03161)
+ (0.01x0.00503021x0.96839)
+ (0.8x0.99497x0.03161)
+ (0.997x0.99497x0.96839) = 0.9858390204
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0003748440048
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03161x0.0151792)
+ (0x0.03161x0.984821)
+ (0x0.96839x0.0151792)
+ (0x0.96839x0.984821) = 0.0004798155285
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03161x0.0151792)
+ (1x0.03161x0.984821)
+ (0x0.96839x0.0151792)
+ (0x0.96839x0.984821) = 0.03113016355
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03161x0.0151792)
+ (0x0.03161x0.984821)
+ (1x0.96839x0.0151792)
+ (0x0.96839x0.984821) = 0.01469942668
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03161x0.0151792)
+ (0x0.03161x0.984821)
+ (0x0.96839x0.0151792)
+ (1x0.96839x0.984821) = 0.9536905942
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.003193358751
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005030212402 0.5
b2 0.9949697876 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03160997907 0.5
f2 0.9683900209 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03160997907 0.5
f2 0.9683900209 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01416097956 0.5 0.01416097956
a2 0.9858390204 0.5 0.9858390204
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01517924221 0.5
a2 0.9848207578 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004798155285 1 0.0004798155285
_jn1 0.03113016355 1 0.03113016355
_jn2 0.01469942668 1 0.01469942668
_jn3 0.9536905942 1 0.9536905942
********************************************************************************
Iteration 15
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03161) + (0.99x0.96839)]x0.5
+ [(0.008x0.03161) + (0.01x0.96839)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03161) + (0.003x0.96839)]x0.5
+ [(0.8x0.03161) + (0.997x0.96839)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00503021) + (0.2x0.99497)]x0.5
+ [(0.008x0.00503021) + (0.8x0.99497)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00503021) + (0.003x0.99497)]x0.5
+ [(0.01x0.00503021) + (0.997x0.99497)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0151792) + (0x0.984821)]x1
+ [(0x0.0151792) + (1x0.984821)]x1
+ [(0x0.0151792) + (0x0.984821)]x1
+ [(0x0.0151792) + (0x0.984821)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0151792) + (0x0.984821)]x1
+ [(0x0.0151792) + (0x0.984821)]x1
+ [(1x0.0151792) + (0x0.984821)]x1
+ [(0x0.0151792) + (1x0.984821)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03161) + (0x0.96839)]x1
+ [(0x0.03161) + (0x0.96839)]x1
+ [(0x0.03161) + (1x0.96839)]x1
+ [(0x0.03161) + (0x0.96839)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03161) + (0x0.96839)]x1
+ [(1x0.03161) + (0x0.96839)]x1
+ [(0x0.03161) + (0x0.96839)]x1
+ [(0x0.03161) + (1x0.96839)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.014161 = 0.01416097956
π_Jn(a2) = π(a2) = 0.985839 = 0.9858390204
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00501511x0.0310733)
+ (0.99x0.00501511x0.968927)
+ (0.2x0.994985x0.0310733)
+ (0.003x0.994985x0.968927) = 0.01404096572
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00501511x0.0310733)
+ (0.01x0.00501511x0.968927)
+ (0.8x0.994985x0.0310733)
+ (0.997x0.994985x0.968927) = 0.9859590343
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0002400276838
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0310733x0.0146701)
+ (0x0.0310733x0.98533)
+ (0x0.968927x0.0146701)
+ (0x0.968927x0.98533) = 0.0004558490409
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0310733x0.0146701)
+ (1x0.0310733x0.98533)
+ (0x0.968927x0.0146701)
+ (0x0.968927x0.98533) = 0.03061747034
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0310733x0.0146701)
+ (0x0.0310733x0.98533)
+ (1x0.968927x0.0146701)
+ (0x0.968927x0.98533) = 0.01421426184
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0310733x0.0146701)
+ (0x0.0310733x0.98533)
+ (0x0.968927x0.0146701)
+ (1x0.968927x0.98533) = 0.9547124188
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.002043649053
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005015106201 0.5
b2 0.9949848938 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03107331938 0.5
f2 0.9689266806 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03107331938 0.5
f2 0.9689266806 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01404096572 0.5 0.01404096572
a2 0.9859590343 0.5 0.9859590343
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01467011088 0.5
a2 0.9853298891 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004558490409 1 0.0004558490409
_jn1 0.03061747034 1 0.03061747034
_jn2 0.01421426184 1 0.01421426184
_jn3 0.9547124188 1 0.9547124188
********************************************************************************
Iteration 16
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0310733) + (0.99x0.968927)]x0.5
+ [(0.008x0.0310733) + (0.01x0.968927)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0310733) + (0.003x0.968927)]x0.5
+ [(0.8x0.0310733) + (0.997x0.968927)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00501511) + (0.2x0.994985)]x0.5
+ [(0.008x0.00501511) + (0.8x0.994985)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00501511) + (0.003x0.994985)]x0.5
+ [(0.01x0.00501511) + (0.997x0.994985)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0146701) + (0x0.98533)]x1
+ [(0x0.0146701) + (1x0.98533)]x1
+ [(0x0.0146701) + (0x0.98533)]x1
+ [(0x0.0146701) + (0x0.98533)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0146701) + (0x0.98533)]x1
+ [(0x0.0146701) + (0x0.98533)]x1
+ [(1x0.0146701) + (0x0.98533)]x1
+ [(0x0.0146701) + (1x0.98533)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0310733) + (0x0.968927)]x1
+ [(0x0.0310733) + (0x0.968927)]x1
+ [(0x0.0310733) + (1x0.968927)]x1
+ [(0x0.0310733) + (0x0.968927)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0310733) + (0x0.968927)]x1
+ [(1x0.0310733) + (0x0.968927)]x1
+ [(0x0.0310733) + (0x0.968927)]x1
+ [(0x0.0310733) + (1x0.968927)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.014041 = 0.01404096572
π_Jn(a2) = π(a2) = 0.985959 = 0.9859590343
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500755x0.0307155)
+ (0.99x0.00500755x0.969284)
+ (0.2x0.994992x0.0307155)
+ (0.003x0.994992x0.969284) = 0.01396342463
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500755x0.0307155)
+ (0.01x0.00500755x0.969284)
+ (0.8x0.994992x0.0307155)
+ (0.997x0.994992x0.969284) = 0.9860365754
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0001550821883
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0307155x0.0143555)
+ (0x0.0307155x0.985644)
+ (0x0.969284x0.0143555)
+ (0x0.969284x0.985644) = 0.0004409382007
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0307155x0.0143555)
+ (1x0.0307155x0.985644)
+ (0x0.969284x0.0143555)
+ (0x0.969284x0.985644) = 0.03027460805
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0307155x0.0143555)
+ (0x0.0307155x0.985644)
+ (1x0.969284x0.0143555)
+ (0x0.969284x0.985644) = 0.0139146001
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0307155x0.0143555)
+ (0x0.0307155x0.985644)
+ (0x0.969284x0.0143555)
+ (1x0.969284x0.985644) = 0.9553698536
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.001314869739
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005007553101 0.5
b2 0.9949924469 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03071554625 0.5
f2 0.9692844537 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03071554625 0.5
f2 0.9692844537 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01396342463 0.5 0.01396342463
a2 0.9860365754 0.5 0.9860365754
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.0143555383 0.5
a2 0.9856444617 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004409382007 1 0.0004409382007
_jn1 0.03027460805 1 0.03027460805
_jn2 0.0139146001 1 0.0139146001
_jn3 0.9553698536 1 0.9553698536
********************************************************************************
Iteration 17
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0307155) + (0.99x0.969284)]x0.5
+ [(0.008x0.0307155) + (0.01x0.969284)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0307155) + (0.003x0.969284)]x0.5
+ [(0.8x0.0307155) + (0.997x0.969284)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500755) + (0.2x0.994992)]x0.5
+ [(0.008x0.00500755) + (0.8x0.994992)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500755) + (0.003x0.994992)]x0.5
+ [(0.01x0.00500755) + (0.997x0.994992)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0143555) + (0x0.985644)]x1
+ [(0x0.0143555) + (1x0.985644)]x1
+ [(0x0.0143555) + (0x0.985644)]x1
+ [(0x0.0143555) + (0x0.985644)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0143555) + (0x0.985644)]x1
+ [(0x0.0143555) + (0x0.985644)]x1
+ [(1x0.0143555) + (0x0.985644)]x1
+ [(0x0.0143555) + (1x0.985644)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0307155) + (0x0.969284)]x1
+ [(0x0.0307155) + (0x0.969284)]x1
+ [(0x0.0307155) + (1x0.969284)]x1
+ [(0x0.0307155) + (0x0.969284)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0307155) + (0x0.969284)]x1
+ [(1x0.0307155) + (0x0.969284)]x1
+ [(0x0.0307155) + (0x0.969284)]x1
+ [(0x0.0307155) + (1x0.969284)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0139634 = 0.01396342463
π_Jn(a2) = π(a2) = 0.986037 = 0.9860365754
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500378x0.030477)
+ (0.99x0.00500378x0.969523)
+ (0.2x0.994996x0.030477)
+ (0.003x0.994996x0.969523) = 0.01391296498
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500378x0.030477)
+ (0.01x0.00500378x0.969523)
+ (0.8x0.994996x0.030477)
+ (0.997x0.994996x0.969523) = 0.986087035
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0.0001009192892
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.030477x0.0141595)
+ (0x0.030477x0.985841)
+ (0x0.969523x0.0141595)
+ (0x0.969523x0.985841) = 0.0004315389532
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030477x0.0141595)
+ (1x0.030477x0.985841)
+ (0x0.969523x0.0141595)
+ (0x0.969523x0.985841) = 0.03004549188
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030477x0.0141595)
+ (0x0.030477x0.985841)
+ (1x0.969523x0.0141595)
+ (0x0.969523x0.985841) = 0.01372794251
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030477x0.0141595)
+ (0x0.030477x0.985841)
+ (0x0.969523x0.0141595)
+ (1x0.969523x0.985841) = 0.9557950267
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0008503460181
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.00500377655 0.5
b2 0.9949962234 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03047703084 0.5
f2 0.9695229692 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03047703084 0.5
f2 0.9695229692 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01391296498 0.5 0.01391296498
a2 0.986087035 0.5 0.986087035
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01415948146 0.5
a2 0.9858405185 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004315389532 1 0.0004315389532
_jn1 0.03004549188 1 0.03004549188
_jn2 0.01372794251 1 0.01372794251
_jn3 0.9557950267 1 0.9557950267
********************************************************************************
Iteration 18
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.030477) + (0.99x0.969523)]x0.5
+ [(0.008x0.030477) + (0.01x0.969523)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.030477) + (0.003x0.969523)]x0.5
+ [(0.8x0.030477) + (0.997x0.969523)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500378) + (0.2x0.994996)]x0.5
+ [(0.008x0.00500378) + (0.8x0.994996)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500378) + (0.003x0.994996)]x0.5
+ [(0.01x0.00500378) + (0.997x0.994996)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0141595) + (0x0.985841)]x1
+ [(0x0.0141595) + (1x0.985841)]x1
+ [(0x0.0141595) + (0x0.985841)]x1
+ [(0x0.0141595) + (0x0.985841)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0141595) + (0x0.985841)]x1
+ [(0x0.0141595) + (0x0.985841)]x1
+ [(1x0.0141595) + (0x0.985841)]x1
+ [(0x0.0141595) + (1x0.985841)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.030477) + (0x0.969523)]x1
+ [(0x0.030477) + (0x0.969523)]x1
+ [(0x0.030477) + (1x0.969523)]x1
+ [(0x0.030477) + (0x0.969523)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.030477) + (0x0.969523)]x1
+ [(1x0.030477) + (0x0.969523)]x1
+ [(0x0.030477) + (0x0.969523)]x1
+ [(0x0.030477) + (1x0.969523)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.013913 = 0.01391296498
π_Jn(a2) = π(a2) = 0.986087 = 0.986087035
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500189x0.030318)
+ (0.99x0.00500189x0.969682)
+ (0.2x0.994998x0.030318)
+ (0.003x0.994998x0.969682) = 0.01387994254
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500189x0.030318)
+ (0.01x0.00500189x0.969682)
+ (0.8x0.994998x0.030318)
+ (0.997x0.994998x0.969682) = 0.9861200575
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.604487376e-05
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.030318x0.0140362)
+ (0x0.030318x0.985964)
+ (0x0.969682x0.0140362)
+ (0x0.969682x0.985964) = 0.0004255505042
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030318x0.0140362)
+ (1x0.030318x0.985964)
+ (0x0.969682x0.0140362)
+ (0x0.969682x0.985964) = 0.02989247005
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030318x0.0140362)
+ (0x0.030318x0.985964)
+ (1x0.969682x0.0140362)
+ (0x0.969682x0.985964) = 0.01361067272
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030318x0.0140362)
+ (0x0.030318x0.985964)
+ (0x0.969682x0.0140362)
+ (1x0.969682x0.985964) = 0.9560713067
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0005525601426
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005001888275 0.5
b2 0.9949981117 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03031802056 0.5
f2 0.9696819794 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03031802056 0.5
f2 0.9696819794 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01387994254 0.5 0.01387994254
a2 0.9861200575 0.5 0.9861200575
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01403622322 0.5
a2 0.9859637768 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004255505042 1 0.0004255505042
_jn1 0.02989247005 1 0.02989247005
_jn2 0.01361067272 1 0.01361067272
_jn3 0.9560713067 1 0.9560713067
********************************************************************************
Iteration 19
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.030318) + (0.99x0.969682)]x0.5
+ [(0.008x0.030318) + (0.01x0.969682)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.030318) + (0.003x0.969682)]x0.5
+ [(0.8x0.030318) + (0.997x0.969682)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500189) + (0.2x0.994998)]x0.5
+ [(0.008x0.00500189) + (0.8x0.994998)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500189) + (0.003x0.994998)]x0.5
+ [(0.01x0.00500189) + (0.997x0.994998)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0140362) + (0x0.985964)]x1
+ [(0x0.0140362) + (1x0.985964)]x1
+ [(0x0.0140362) + (0x0.985964)]x1
+ [(0x0.0140362) + (0x0.985964)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0140362) + (0x0.985964)]x1
+ [(0x0.0140362) + (0x0.985964)]x1
+ [(1x0.0140362) + (0x0.985964)]x1
+ [(0x0.0140362) + (1x0.985964)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.030318) + (0x0.969682)]x1
+ [(0x0.030318) + (0x0.969682)]x1
+ [(0x0.030318) + (1x0.969682)]x1
+ [(0x0.030318) + (0x0.969682)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.030318) + (0x0.969682)]x1
+ [(1x0.030318) + (0x0.969682)]x1
+ [(0x0.030318) + (0x0.969682)]x1
+ [(0x0.030318) + (1x0.969682)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138799 = 0.01387994254
π_Jn(a2) = π(a2) = 0.98612 = 0.9861200575
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500094x0.030212)
+ (0.99x0.00500094x0.969788)
+ (0.2x0.994999x0.030212)
+ (0.003x0.994999x0.969788) = 0.01385823629
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500094x0.030212)
+ (0.01x0.00500094x0.969788)
+ (0.8x0.994999x0.030212)
+ (0.997x0.994999x0.969788) = 0.9861417637
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.341251158e-05
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.030212x0.0139581)
+ (0x0.030212x0.986042)
+ (0x0.969788x0.0139581)
+ (0x0.969788x0.986042) = 0.0004217017914
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030212x0.0139581)
+ (1x0.030212x0.986042)
+ (0x0.969788x0.0139581)
+ (0x0.969788x0.986042) = 0.02979031191
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030212x0.0139581)
+ (0x0.030212x0.986042)
+ (1x0.969788x0.0139581)
+ (0x0.969788x0.986042) = 0.01353638109
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.030212x0.0139581)
+ (0x0.030212x0.986042)
+ (0x0.969788x0.0139581)
+ (1x0.969788x0.986042) = 0.9562516052
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0003605969578
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000944138 0.5
b2 0.9949990559 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03021201371 0.5
f2 0.9697879863 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03021201371 0.5
f2 0.9697879863 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01385823629 0.5 0.01385823629
a2 0.9861417637 0.5 0.9861417637
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01395808288 0.5
a2 0.9860419171 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004217017914 1 0.0004217017914
_jn1 0.02979031191 1 0.02979031191
_jn2 0.01353638109 1 0.01353638109
_jn3 0.9562516052 1 0.9562516052
********************************************************************************
Iteration 20
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.030212) + (0.99x0.969788)]x0.5
+ [(0.008x0.030212) + (0.01x0.969788)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.030212) + (0.003x0.969788)]x0.5
+ [(0.8x0.030212) + (0.997x0.969788)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500094) + (0.2x0.994999)]x0.5
+ [(0.008x0.00500094) + (0.8x0.994999)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500094) + (0.003x0.994999)]x0.5
+ [(0.01x0.00500094) + (0.997x0.994999)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0139581) + (0x0.986042)]x1
+ [(0x0.0139581) + (1x0.986042)]x1
+ [(0x0.0139581) + (0x0.986042)]x1
+ [(0x0.0139581) + (0x0.986042)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0139581) + (0x0.986042)]x1
+ [(0x0.0139581) + (0x0.986042)]x1
+ [(1x0.0139581) + (0x0.986042)]x1
+ [(0x0.0139581) + (1x0.986042)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.030212) + (0x0.969788)]x1
+ [(0x0.030212) + (0x0.969788)]x1
+ [(0x0.030212) + (1x0.969788)]x1
+ [(0x0.030212) + (0x0.969788)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.030212) + (0x0.969788)]x1
+ [(1x0.030212) + (0x0.969788)]x1
+ [(0x0.030212) + (0x0.969788)]x1
+ [(0x0.030212) + (1x0.969788)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138582 = 0.01385823629
π_Jn(a2) = π(a2) = 0.986142 = 0.9861417637
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500047x0.0301413)
+ (0.99x0.00500047x0.969859)
+ (0.2x0.995x0.0301413)
+ (0.003x0.995x0.969859) = 0.01384391981
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500047x0.0301413)
+ (0.01x0.00500047x0.969859)
+ (0.8x0.995x0.0301413)
+ (0.997x0.995x0.969859) = 0.9861560802
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.863294624e-05
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0301413x0.0139082)
+ (0x0.0301413x0.986092)
+ (0x0.969859x0.0139082)
+ (0x0.969859x0.986092) = 0.0004192106012
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0301413x0.0139082)
+ (1x0.0301413x0.986092)
+ (0x0.969859x0.0139082)
+ (0x0.969859x0.986092) = 0.02972213187
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0301413x0.0139082)
+ (0x0.0301413x0.986092)
+ (1x0.969859x0.0139082)
+ (0x0.969859x0.986092) = 0.01348894898
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0301413x0.0139082)
+ (0x0.0301413x0.986092)
+ (0x0.969859x0.0139082)
+ (1x0.969859x0.986092) = 0.9563697085
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0002362066847
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000472069 0.5
b2 0.9949995279 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03014134247 0.5
f2 0.9698586575 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03014134247 0.5
f2 0.9698586575 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01384391981 0.5 0.01384391981
a2 0.9861560802 0.5 0.9861560802
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01390815959 0.5
a2 0.9860918404 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004192106012 1 0.0004192106012
_jn1 0.02972213187 1 0.02972213187
_jn2 0.01348894898 1 0.01348894898
_jn3 0.9563697085 1 0.9563697085
********************************************************************************
Iteration 21
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0301413) + (0.99x0.969859)]x0.5
+ [(0.008x0.0301413) + (0.01x0.969859)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0301413) + (0.003x0.969859)]x0.5
+ [(0.8x0.0301413) + (0.997x0.969859)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500047) + (0.2x0.995)]x0.5
+ [(0.008x0.00500047) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500047) + (0.003x0.995)]x0.5
+ [(0.01x0.00500047) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0139082) + (0x0.986092)]x1
+ [(0x0.0139082) + (1x0.986092)]x1
+ [(0x0.0139082) + (0x0.986092)]x1
+ [(0x0.0139082) + (0x0.986092)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0139082) + (0x0.986092)]x1
+ [(0x0.0139082) + (0x0.986092)]x1
+ [(1x0.0139082) + (0x0.986092)]x1
+ [(0x0.0139082) + (1x0.986092)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0301413) + (0x0.969859)]x1
+ [(0x0.0301413) + (0x0.969859)]x1
+ [(0x0.0301413) + (1x0.969859)]x1
+ [(0x0.0301413) + (0x0.969859)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0301413) + (0x0.969859)]x1
+ [(1x0.0301413) + (0x0.969859)]x1
+ [(0x0.0301413) + (0x0.969859)]x1
+ [(0x0.0301413) + (1x0.969859)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138439 = 0.01384391981
π_Jn(a2) = π(a2) = 0.986156 = 0.9861560802
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500024x0.0300942)
+ (0.99x0.00500024x0.969906)
+ (0.2x0.995x0.0300942)
+ (0.003x0.995x0.969906) = 0.01383445269
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500024x0.0300942)
+ (0.01x0.00500024x0.969906)
+ (0.8x0.995x0.0300942)
+ (0.997x0.995x0.969906) = 0.9861655473
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.893425808e-05
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300942x0.013876)
+ (0x0.0300942x0.986124)
+ (0x0.969906x0.013876)
+ (0x0.969906x0.986124) = 0.0004175887068
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300942x0.013876)
+ (1x0.0300942x0.986124)
+ (0x0.969906x0.013876)
+ (0x0.969906x0.986124) = 0.02967663961
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300942x0.013876)
+ (0x0.0300942x0.986124)
+ (1x0.969906x0.013876)
+ (0x0.969906x0.986124) = 0.01345845099
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300942x0.013876)
+ (0x0.0300942x0.986124)
+ (0x0.969906x0.013876)
+ (1x0.969906x0.986124) = 0.9564473207
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0001552242953
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000236034 0.5
b2 0.994999764 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03009422831 0.5
f2 0.9699057717 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03009422831 0.5
f2 0.9699057717 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01383445269 0.5 0.01383445269
a2 0.9861655473 0.5 0.9861655473
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.0138760397 0.5
a2 0.9861239603 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004175887068 1 0.0004175887068
_jn1 0.02967663961 1 0.02967663961
_jn2 0.01345845099 1 0.01345845099
_jn3 0.9564473207 1 0.9564473207
********************************************************************************
Iteration 22
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300942) + (0.99x0.969906)]x0.5
+ [(0.008x0.0300942) + (0.01x0.969906)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300942) + (0.003x0.969906)]x0.5
+ [(0.8x0.0300942) + (0.997x0.969906)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500024) + (0.2x0.995)]x0.5
+ [(0.008x0.00500024) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500024) + (0.003x0.995)]x0.5
+ [(0.01x0.00500024) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.013876) + (0x0.986124)]x1
+ [(0x0.013876) + (1x0.986124)]x1
+ [(0x0.013876) + (0x0.986124)]x1
+ [(0x0.013876) + (0x0.986124)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.013876) + (0x0.986124)]x1
+ [(0x0.013876) + (0x0.986124)]x1
+ [(1x0.013876) + (0x0.986124)]x1
+ [(0x0.013876) + (1x0.986124)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300942) + (0x0.969906)]x1
+ [(0x0.0300942) + (0x0.969906)]x1
+ [(0x0.0300942) + (1x0.969906)]x1
+ [(0x0.0300942) + (0x0.969906)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300942) + (0x0.969906)]x1
+ [(1x0.0300942) + (0x0.969906)]x1
+ [(0x0.0300942) + (0x0.969906)]x1
+ [(0x0.0300942) + (1x0.969906)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138345 = 0.01383445269
π_Jn(a2) = π(a2) = 0.986166 = 0.9861655473
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500012x0.0300628)
+ (0.99x0.00500012x0.969937)
+ (0.2x0.995x0.0300628)
+ (0.003x0.995x0.969937) = 0.01382817986
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500012x0.0300628)
+ (0.01x0.00500012x0.969937)
+ (0.8x0.995x0.0300628)
+ (0.997x0.995x0.969937) = 0.9861718201
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.254564945e-05
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300628x0.0138552)
+ (0x0.0300628x0.986145)
+ (0x0.969937x0.0138552)
+ (0x0.969937x0.986145) = 0.0004165277568
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300628x0.0138552)
+ (1x0.0300628x0.986145)
+ (0x0.969937x0.0138552)
+ (0x0.969937x0.986145) = 0.02964629112
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300628x0.0138552)
+ (0x0.0300628x0.986145)
+ (1x0.969937x0.0138552)
+ (0x0.969937x0.986145) = 0.01343871844
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300628x0.0138552)
+ (0x0.0300628x0.986145)
+ (0x0.969937x0.0138552)
+ (1x0.969937x0.986145) = 0.9564984627
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0.0001022839899
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000118017 0.5
b2 0.994999882 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03006281888 0.5
f2 0.9699371811 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03006281888 0.5
f2 0.9699371811 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01382817986 0.5 0.01382817986
a2 0.9861718201 0.5 0.9861718201
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01385524619 0.5
a2 0.9861447538 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004165277568 1 0.0004165277568
_jn1 0.02964629112 1 0.02964629112
_jn2 0.01343871844 1 0.01343871844
_jn3 0.9564984627 1 0.9564984627
********************************************************************************
Iteration 23
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300628) + (0.99x0.969937)]x0.5
+ [(0.008x0.0300628) + (0.01x0.969937)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300628) + (0.003x0.969937)]x0.5
+ [(0.8x0.0300628) + (0.997x0.969937)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500012) + (0.2x0.995)]x0.5
+ [(0.008x0.00500012) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500012) + (0.003x0.995)]x0.5
+ [(0.01x0.00500012) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138552) + (0x0.986145)]x1
+ [(0x0.0138552) + (1x0.986145)]x1
+ [(0x0.0138552) + (0x0.986145)]x1
+ [(0x0.0138552) + (0x0.986145)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138552) + (0x0.986145)]x1
+ [(0x0.0138552) + (0x0.986145)]x1
+ [(1x0.0138552) + (0x0.986145)]x1
+ [(0x0.0138552) + (1x0.986145)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300628) + (0x0.969937)]x1
+ [(0x0.0300628) + (0x0.969937)]x1
+ [(0x0.0300628) + (1x0.969937)]x1
+ [(0x0.0300628) + (0x0.969937)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300628) + (0x0.969937)]x1
+ [(1x0.0300628) + (0x0.969937)]x1
+ [(0x0.0300628) + (0x0.969937)]x1
+ [(0x0.0300628) + (1x0.969937)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138282 = 0.01382817986
π_Jn(a2) = π(a2) = 0.986172 = 0.9861718201
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500006x0.0300419)
+ (0.99x0.00500006x0.969958)
+ (0.2x0.995x0.0300419)
+ (0.003x0.995x0.969958) = 0.01382401728
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500006x0.0300419)
+ (0.01x0.00500006x0.969958)
+ (0.8x0.995x0.0300419)
+ (0.997x0.995x0.969958) = 0.9861759827
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.325170706e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300419x0.0138417)
+ (0x0.0300419x0.986158)
+ (0x0.969958x0.0138417)
+ (0x0.969958x0.986158) = 0.0004158310714
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300419x0.0138417)
+ (1x0.0300419x0.986158)
+ (0x0.969958x0.0138417)
+ (0x0.969958x0.986158) = 0.02962604818
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300419x0.0138417)
+ (0x0.0300419x0.986158)
+ (1x0.969958x0.0138417)
+ (0x0.969958x0.986158) = 0.01342588196
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300419x0.0138417)
+ (0x0.0300419x0.986158)
+ (0x0.969958x0.0138417)
+ (1x0.969958x0.986158) = 0.9565322388
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 6.75522115e-05
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000059009 0.5
b2 0.994999941 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03004187925 0.5
f2 0.9699581207 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03004187925 0.5
f2 0.9699581207 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01382401728 0.5 0.01382401728
a2 0.9861759827 0.5 0.9861759827
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01384171303 0.5
a2 0.986158287 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004158310714 1 0.0004158310714
_jn1 0.02962604818 1 0.02962604818
_jn2 0.01342588196 1 0.01342588196
_jn3 0.9565322388 1 0.9565322388
********************************************************************************
Iteration 24
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300419) + (0.99x0.969958)]x0.5
+ [(0.008x0.0300419) + (0.01x0.969958)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300419) + (0.003x0.969958)]x0.5
+ [(0.8x0.0300419) + (0.997x0.969958)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500006) + (0.2x0.995)]x0.5
+ [(0.008x0.00500006) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500006) + (0.003x0.995)]x0.5
+ [(0.01x0.00500006) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138417) + (0x0.986158)]x1
+ [(0x0.0138417) + (1x0.986158)]x1
+ [(0x0.0138417) + (0x0.986158)]x1
+ [(0x0.0138417) + (0x0.986158)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138417) + (0x0.986158)]x1
+ [(0x0.0138417) + (0x0.986158)]x1
+ [(1x0.0138417) + (0x0.986158)]x1
+ [(0x0.0138417) + (1x0.986158)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300419) + (0x0.969958)]x1
+ [(0x0.0300419) + (0x0.969958)]x1
+ [(0x0.0300419) + (1x0.969958)]x1
+ [(0x0.0300419) + (0x0.969958)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300419) + (0x0.969958)]x1
+ [(1x0.0300419) + (0x0.969958)]x1
+ [(0x0.0300419) + (0x0.969958)]x1
+ [(0x0.0300419) + (1x0.969958)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.013824 = 0.01382401728
π_Jn(a2) = π(a2) = 0.986176 = 0.9861759827
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500003x0.0300279)
+ (0.99x0.00500003x0.969972)
+ (0.2x0.995x0.0300279)
+ (0.003x0.995x0.969972) = 0.01382125187
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500003x0.0300279)
+ (0.01x0.00500003x0.969972)
+ (0.8x0.995x0.0300279)
+ (0.997x0.995x0.969972) = 0.9861787481
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 5.530815684e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300279x0.0138329)
+ (0x0.0300279x0.986167)
+ (0x0.969972x0.0138329)
+ (0x0.969972x0.986167) = 0.0004153721612
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300279x0.0138329)
+ (1x0.0300279x0.986167)
+ (0x0.969972x0.0138329)
+ (0x0.969972x0.986167) = 0.02961254734
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300279x0.0138329)
+ (0x0.0300279x0.986167)
+ (1x0.969972x0.0138329)
+ (0x0.969972x0.986167) = 0.01341749299
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300279x0.0138329)
+ (0x0.0300279x0.986167)
+ (0x0.969972x0.0138329)
+ (1x0.969972x0.986167) = 0.9565545875
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.469743126e-05
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000029504 0.5
b2 0.9949999705 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.0300279195 0.5
f2 0.9699720805 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.0300279195 0.5
f2 0.9699720805 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01382125187 0.5 0.01382125187
a2 0.9861787481 0.5 0.9861787481
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01383286515 0.5
a2 0.9861671348 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004153721612 1 0.0004153721612
_jn1 0.02961254734 1 0.02961254734
_jn2 0.01341749299 1 0.01341749299
_jn3 0.9565545875 1 0.9565545875
********************************************************************************
Iteration 25
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300279) + (0.99x0.969972)]x0.5
+ [(0.008x0.0300279) + (0.01x0.969972)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300279) + (0.003x0.969972)]x0.5
+ [(0.8x0.0300279) + (0.997x0.969972)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500003) + (0.2x0.995)]x0.5
+ [(0.008x0.00500003) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500003) + (0.003x0.995)]x0.5
+ [(0.01x0.00500003) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138329) + (0x0.986167)]x1
+ [(0x0.0138329) + (1x0.986167)]x1
+ [(0x0.0138329) + (0x0.986167)]x1
+ [(0x0.0138329) + (0x0.986167)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138329) + (0x0.986167)]x1
+ [(0x0.0138329) + (0x0.986167)]x1
+ [(1x0.0138329) + (0x0.986167)]x1
+ [(0x0.0138329) + (1x0.986167)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300279) + (0x0.969972)]x1
+ [(0x0.0300279) + (0x0.969972)]x1
+ [(0x0.0300279) + (1x0.969972)]x1
+ [(0x0.0300279) + (0x0.969972)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300279) + (0x0.969972)]x1
+ [(1x0.0300279) + (0x0.969972)]x1
+ [(0x0.0300279) + (0x0.969972)]x1
+ [(0x0.0300279) + (1x0.969972)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138213 = 0.01382125187
π_Jn(a2) = π(a2) = 0.986179 = 0.9861787481
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500001x0.0300186)
+ (0.99x0.00500001x0.969981)
+ (0.2x0.995x0.0300186)
+ (0.003x0.995x0.969981) = 0.01381941309
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500001x0.0300186)
+ (0.01x0.00500001x0.969981)
+ (0.8x0.995x0.0300186)
+ (0.997x0.995x0.969981) = 0.9861805869
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.677561289e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300186x0.0138271)
+ (0x0.0300186x0.986173)
+ (0x0.969981x0.0138271)
+ (0x0.969981x0.986173) = 0.0004150691183
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300186x0.0138271)
+ (1x0.0300186x0.986173)
+ (0x0.969981x0.0138271)
+ (0x0.969981x0.986173) = 0.02960354388
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300186x0.0138271)
+ (0x0.0300186x0.986173)
+ (1x0.969981x0.0138271)
+ (0x0.969981x0.986173) = 0.01341198939
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300186x0.0138271)
+ (0x0.0300186x0.986173)
+ (0x0.969981x0.0138271)
+ (1x0.969981x0.986173) = 0.9565693976
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.962019789e-05
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000014752 0.5
b2 0.9949999852 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.030018613 0.5
f2 0.969981387 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.030018613 0.5
f2 0.969981387 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381941309 0.5 0.01381941309
a2 0.9861805869 0.5 0.9861805869
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01382705851 0.5
a2 0.9861729415 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004150691183 1 0.0004150691183
_jn1 0.02960354388 1 0.02960354388
_jn2 0.01341198939 1 0.01341198939
_jn3 0.9565693976 1 0.9565693976
********************************************************************************
Iteration 26
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300186) + (0.99x0.969981)]x0.5
+ [(0.008x0.0300186) + (0.01x0.969981)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300186) + (0.003x0.969981)]x0.5
+ [(0.8x0.0300186) + (0.997x0.969981)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500001) + (0.2x0.995)]x0.5
+ [(0.008x0.00500001) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500001) + (0.003x0.995)]x0.5
+ [(0.01x0.00500001) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138271) + (0x0.986173)]x1
+ [(0x0.0138271) + (1x0.986173)]x1
+ [(0x0.0138271) + (0x0.986173)]x1
+ [(0x0.0138271) + (0x0.986173)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138271) + (0x0.986173)]x1
+ [(0x0.0138271) + (0x0.986173)]x1
+ [(1x0.0138271) + (0x0.986173)]x1
+ [(0x0.0138271) + (1x0.986173)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300186) + (0x0.969981)]x1
+ [(0x0.0300186) + (0x0.969981)]x1
+ [(0x0.0300186) + (1x0.969981)]x1
+ [(0x0.0300186) + (0x0.969981)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300186) + (0x0.969981)]x1
+ [(1x0.0300186) + (0x0.969981)]x1
+ [(0x0.0300186) + (0x0.969981)]x1
+ [(0x0.0300186) + (1x0.969981)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138194 = 0.01381941309
π_Jn(a2) = π(a2) = 0.986181 = 0.9861805869
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.00500001x0.0300124)
+ (0.99x0.00500001x0.969988)
+ (0.2x0.995x0.0300124)
+ (0.003x0.995x0.969988) = 0.01381818965
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.00500001x0.0300124)
+ (0.01x0.00500001x0.969988)
+ (0.8x0.995x0.0300124)
+ (0.997x0.995x0.969988) = 0.9861818104
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.446882907e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300124x0.0138232)
+ (0x0.0300124x0.986177)
+ (0x0.969988x0.0138232)
+ (0x0.969988x0.986177) = 0.0004148686019
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300124x0.0138232)
+ (1x0.0300124x0.986177)
+ (0x0.969988x0.0138232)
+ (0x0.969988x0.986177) = 0.02959754006
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300124x0.0138232)
+ (0x0.0300124x0.986177)
+ (1x0.969988x0.0138232)
+ (0x0.969988x0.986177) = 0.0134083672
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300124x0.0138232)
+ (0x0.0300124x0.986177)
+ (0x0.969988x0.0138232)
+ (1x0.969988x0.986177) = 0.9565792241
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.965305627e-05
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000007376 0.5
b2 0.9949999926 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03001240867 0.5
f2 0.9699875913 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03001240867 0.5
f2 0.9699875913 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381818965 0.5 0.01381818965
a2 0.9861818104 0.5 0.9861818104
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.0138232358 0.5
a2 0.9861767642 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004148686019 1 0.0004148686019
_jn1 0.02959754006 1 0.02959754006
_jn2 0.0134083672 1 0.0134083672
_jn3 0.9565792241 1 0.9565792241
********************************************************************************
Iteration 27
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300124) + (0.99x0.969988)]x0.5
+ [(0.008x0.0300124) + (0.01x0.969988)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300124) + (0.003x0.969988)]x0.5
+ [(0.8x0.0300124) + (0.997x0.969988)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.00500001) + (0.2x0.995)]x0.5
+ [(0.008x0.00500001) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.00500001) + (0.003x0.995)]x0.5
+ [(0.01x0.00500001) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138232) + (0x0.986177)]x1
+ [(0x0.0138232) + (1x0.986177)]x1
+ [(0x0.0138232) + (0x0.986177)]x1
+ [(0x0.0138232) + (0x0.986177)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138232) + (0x0.986177)]x1
+ [(0x0.0138232) + (0x0.986177)]x1
+ [(1x0.0138232) + (0x0.986177)]x1
+ [(0x0.0138232) + (1x0.986177)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300124) + (0x0.969988)]x1
+ [(0x0.0300124) + (0x0.969988)]x1
+ [(0x0.0300124) + (1x0.969988)]x1
+ [(0x0.0300124) + (0x0.969988)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300124) + (0x0.969988)]x1
+ [(1x0.0300124) + (0x0.969988)]x1
+ [(0x0.0300124) + (0x0.969988)]x1
+ [(0x0.0300124) + (1x0.969988)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138182 = 0.01381818965
π_Jn(a2) = π(a2) = 0.986182 = 0.9861818104
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300083)
+ (0.99x0.005x0.969992)
+ (0.2x0.995x0.0300083)
+ (0.003x0.995x0.969992) = 0.01381737522
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300083)
+ (0.01x0.005x0.969992)
+ (0.8x0.995x0.0300083)
+ (0.997x0.995x0.969992) = 0.9861826248
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.62884295e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300083x0.0138207)
+ (0x0.0300083x0.986179)
+ (0x0.969992x0.0138207)
+ (0x0.969992x0.986179) = 0.0004147357127
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300083x0.0138207)
+ (1x0.0300083x0.986179)
+ (0x0.969992x0.0138207)
+ (0x0.969992x0.986179) = 0.02959353673
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300083x0.0138207)
+ (0x0.0300083x0.986179)
+ (1x0.969992x0.0138207)
+ (0x0.969992x0.986179) = 0.01340597701
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300083x0.0138207)
+ (0x0.0300083x0.986179)
+ (0x0.969992x0.0138207)
+ (1x0.969992x0.986179) = 0.9565857505
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.30528189e-05
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000003688 0.5
b2 0.9949999963 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000827244 0.5
f2 0.9699917276 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000827244 0.5
f2 0.9699917276 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381737522 0.5 0.01381737522
a2 0.9861826248 0.5 0.9861826248
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01382071272 0.5
a2 0.9861792873 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004147357127 1 0.0004147357127
_jn1 0.02959353673 1 0.02959353673
_jn2 0.01340597701 1 0.01340597701
_jn3 0.9565857505 1 0.9565857505
********************************************************************************
Iteration 28
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300083) + (0.99x0.969992)]x0.5
+ [(0.008x0.0300083) + (0.01x0.969992)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300083) + (0.003x0.969992)]x0.5
+ [(0.8x0.0300083) + (0.997x0.969992)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138207) + (0x0.986179)]x1
+ [(0x0.0138207) + (1x0.986179)]x1
+ [(0x0.0138207) + (0x0.986179)]x1
+ [(0x0.0138207) + (0x0.986179)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138207) + (0x0.986179)]x1
+ [(0x0.0138207) + (0x0.986179)]x1
+ [(1x0.0138207) + (0x0.986179)]x1
+ [(0x0.0138207) + (1x0.986179)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300083) + (0x0.969992)]x1
+ [(0x0.0300083) + (0x0.969992)]x1
+ [(0x0.0300083) + (1x0.969992)]x1
+ [(0x0.0300083) + (0x0.969992)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300083) + (0x0.969992)]x1
+ [(1x0.0300083) + (0x0.969992)]x1
+ [(0x0.0300083) + (0x0.969992)]x1
+ [(0x0.0300083) + (1x0.969992)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138174 = 0.01381737522
π_Jn(a2) = π(a2) = 0.986183 = 0.9861826248
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300055)
+ (0.99x0.005x0.969994)
+ (0.2x0.995x0.0300055)
+ (0.003x0.995x0.969994) = 0.01381683288
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300055)
+ (0.01x0.005x0.969994)
+ (0.8x0.995x0.0300055)
+ (0.997x0.995x0.969994) = 0.9861831671
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.084689135e-06
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300055x0.013819)
+ (0x0.0300055x0.986181)
+ (0x0.969994x0.013819)
+ (0x0.969994x0.986181) = 0.0004146475307
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300055x0.013819)
+ (1x0.0300055x0.986181)
+ (0x0.969994x0.013819)
+ (0x0.969994x0.986181) = 0.02959086743
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300055x0.013819)
+ (0x0.0300055x0.986181)
+ (1x0.969994x0.013819)
+ (0x0.969994x0.986181) = 0.01340439644
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300055x0.013819)
+ (0x0.0300055x0.986181)
+ (0x0.969994x0.013819)
+ (1x0.969994x0.986181) = 0.9565900886
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 8.676096756e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000001844 0.5
b2 0.9949999982 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000551496 0.5
f2 0.969994485 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000551496 0.5
f2 0.969994485 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381683288 0.5 0.01381683288
a2 0.9861831671 0.5 0.9861831671
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381904397 0.5
a2 0.986180956 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004146475307 1 0.0004146475307
_jn1 0.02959086743 1 0.02959086743
_jn2 0.01340439644 1 0.01340439644
_jn3 0.9565900886 1 0.9565900886
********************************************************************************
Iteration 29
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300055) + (0.99x0.969994)]x0.5
+ [(0.008x0.0300055) + (0.01x0.969994)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300055) + (0.003x0.969994)]x0.5
+ [(0.8x0.0300055) + (0.997x0.969994)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.013819) + (0x0.986181)]x1
+ [(0x0.013819) + (1x0.986181)]x1
+ [(0x0.013819) + (0x0.986181)]x1
+ [(0x0.013819) + (0x0.986181)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.013819) + (0x0.986181)]x1
+ [(0x0.013819) + (0x0.986181)]x1
+ [(1x0.013819) + (0x0.986181)]x1
+ [(0x0.013819) + (1x0.986181)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300055) + (0x0.969994)]x1
+ [(0x0.0300055) + (0x0.969994)]x1
+ [(0x0.0300055) + (1x0.969994)]x1
+ [(0x0.0300055) + (0x0.969994)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300055) + (0x0.969994)]x1
+ [(1x0.0300055) + (0x0.969994)]x1
+ [(0x0.0300055) + (0x0.969994)]x1
+ [(0x0.0300055) + (1x0.969994)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138168 = 0.01381683288
π_Jn(a2) = π(a2) = 0.986183 = 0.9861831671
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300037)
+ (0.99x0.005x0.969996)
+ (0.2x0.995x0.0300037)
+ (0.003x0.995x0.969996) = 0.01381647162
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300037)
+ (0.01x0.005x0.969996)
+ (0.8x0.995x0.0300037)
+ (0.997x0.995x0.969996) = 0.9861835284
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 7.225230066e-07
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300037x0.0138179)
+ (0x0.0300037x0.986182)
+ (0x0.969996x0.0138179)
+ (0x0.969996x0.986182) = 0.0004145889564
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300037x0.0138179)
+ (1x0.0300037x0.986182)
+ (0x0.969996x0.0138179)
+ (0x0.969996x0.986182) = 0.02958908769
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300037x0.0138179)
+ (0x0.0300037x0.986182)
+ (1x0.969996x0.0138179)
+ (0x0.969996x0.986182) = 0.01340334947
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300037x0.0138179)
+ (0x0.0300037x0.986182)
+ (0x0.969996x0.0138179)
+ (1x0.969996x0.986182) = 0.9565929739
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.770586867e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000922 0.5
b2 0.9949999991 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000367664 0.5
f2 0.9699963234 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000367664 0.5
f2 0.9699963234 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381647162 0.5 0.01381647162
a2 0.9861835284 0.5 0.9861835284
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381793843 0.5
a2 0.9861820616 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004145889564 1 0.0004145889564
_jn1 0.02958908769 1 0.02958908769
_jn2 0.01340334947 1 0.01340334947
_jn3 0.9565929739 1 0.9565929739
********************************************************************************
Iteration 30
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300037) + (0.99x0.969996)]x0.5
+ [(0.008x0.0300037) + (0.01x0.969996)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300037) + (0.003x0.969996)]x0.5
+ [(0.8x0.0300037) + (0.997x0.969996)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138179) + (0x0.986182)]x1
+ [(0x0.0138179) + (1x0.986182)]x1
+ [(0x0.0138179) + (0x0.986182)]x1
+ [(0x0.0138179) + (0x0.986182)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138179) + (0x0.986182)]x1
+ [(0x0.0138179) + (0x0.986182)]x1
+ [(1x0.0138179) + (0x0.986182)]x1
+ [(0x0.0138179) + (1x0.986182)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300037) + (0x0.969996)]x1
+ [(0x0.0300037) + (0x0.969996)]x1
+ [(0x0.0300037) + (1x0.969996)]x1
+ [(0x0.0300037) + (0x0.969996)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300037) + (0x0.969996)]x1
+ [(1x0.0300037) + (0x0.969996)]x1
+ [(0x0.0300037) + (0x0.969996)]x1
+ [(0x0.0300037) + (1x0.969996)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138165 = 0.01381647162
π_Jn(a2) = π(a2) = 0.986184 = 0.9861835284
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300025)
+ (0.99x0.005x0.969998)
+ (0.2x0.995x0.0300025)
+ (0.003x0.995x0.969998) = 0.01381623093
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300025)
+ (0.01x0.005x0.969998)
+ (0.8x0.995x0.0300025)
+ (0.997x0.995x0.969998) = 0.9861837691
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.813804621e-07
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300025x0.0138172)
+ (0x0.0300025x0.986183)
+ (0x0.969998x0.0138172)
+ (0x0.969998x0.986183) = 0.000414550018
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300025x0.0138172)
+ (1x0.0300025x0.986183)
+ (0x0.969998x0.0138172)
+ (0x0.969998x0.986183) = 0.02958790108
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300025x0.0138172)
+ (0x0.0300025x0.986183)
+ (1x0.969998x0.0138172)
+ (0x0.969998x0.986183) = 0.013402655
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300025x0.0138172)
+ (0x0.0300025x0.986183)
+ (0x0.969998x0.0138172)
+ (1x0.969998x0.986183) = 0.9565948939
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.840025993e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000461 0.5
b2 0.9949999995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000245109 0.5
f2 0.9699975489 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000245109 0.5
f2 0.9699975489 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381623093 0.5 0.01381623093
a2 0.9861837691 0.5 0.9861837691
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381720502 0.5
a2 0.986182795 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.000414550018 1 0.000414550018
_jn1 0.02958790108 1 0.02958790108
_jn2 0.013402655 1 0.013402655
_jn3 0.9565948939 1 0.9565948939
********************************************************************************
Iteration 31
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300025) + (0.99x0.969998)]x0.5
+ [(0.008x0.0300025) + (0.01x0.969998)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300025) + (0.003x0.969998)]x0.5
+ [(0.8x0.0300025) + (0.997x0.969998)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138172) + (0x0.986183)]x1
+ [(0x0.0138172) + (1x0.986183)]x1
+ [(0x0.0138172) + (0x0.986183)]x1
+ [(0x0.0138172) + (0x0.986183)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138172) + (0x0.986183)]x1
+ [(0x0.0138172) + (0x0.986183)]x1
+ [(1x0.0138172) + (0x0.986183)]x1
+ [(0x0.0138172) + (1x0.986183)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300025) + (0x0.969998)]x1
+ [(0x0.0300025) + (0x0.969998)]x1
+ [(0x0.0300025) + (1x0.969998)]x1
+ [(0x0.0300025) + (0x0.969998)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300025) + (0x0.969998)]x1
+ [(1x0.0300025) + (0x0.969998)]x1
+ [(0x0.0300025) + (0x0.969998)]x1
+ [(0x0.0300025) + (1x0.969998)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138162 = 0.01381623093
π_Jn(a2) = π(a2) = 0.986184 = 0.9861837691
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300016)
+ (0.99x0.005x0.969998)
+ (0.2x0.995x0.0300016)
+ (0.003x0.995x0.969998) = 0.01381607054
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300016)
+ (0.01x0.005x0.969998)
+ (0.8x0.995x0.0300016)
+ (0.997x0.995x0.969998) = 0.9861839295
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.207695366e-07
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300016x0.0138167)
+ (0x0.0300016x0.986183)
+ (0x0.969998x0.0138167)
+ (0x0.969998x0.986183) = 0.0004145241166
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300016x0.0138167)
+ (1x0.0300016x0.986183)
+ (0x0.969998x0.0138167)
+ (0x0.969998x0.986183) = 0.02958710995
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300016x0.0138167)
+ (0x0.0300016x0.986183)
+ (1x0.969998x0.0138167)
+ (0x0.969998x0.986183) = 0.01340219386
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300016x0.0138167)
+ (0x0.0300016x0.986183)
+ (0x0.969998x0.0138167)
+ (1x0.969998x0.986183) = 0.9565961721
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.556354858e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000231 0.5
b2 0.9949999998 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000163406 0.5
f2 0.9699983659 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000163406 0.5
f2 0.9699983659 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381607054 0.5 0.01381607054
a2 0.9861839295 0.5 0.9861839295
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381671798 0.5
a2 0.986183282 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004145241166 1 0.0004145241166
_jn1 0.02958710995 1 0.02958710995
_jn2 0.01340219386 1 0.01340219386
_jn3 0.9565961721 1 0.9565961721
********************************************************************************
Iteration 32
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300016) + (0.99x0.969998)]x0.5
+ [(0.008x0.0300016) + (0.01x0.969998)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300016) + (0.003x0.969998)]x0.5
+ [(0.8x0.0300016) + (0.997x0.969998)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138167) + (0x0.986183)]x1
+ [(0x0.0138167) + (1x0.986183)]x1
+ [(0x0.0138167) + (0x0.986183)]x1
+ [(0x0.0138167) + (0x0.986183)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138167) + (0x0.986183)]x1
+ [(0x0.0138167) + (0x0.986183)]x1
+ [(1x0.0138167) + (0x0.986183)]x1
+ [(0x0.0138167) + (1x0.986183)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300016) + (0x0.969998)]x1
+ [(0x0.0300016) + (0x0.969998)]x1
+ [(0x0.0300016) + (1x0.969998)]x1
+ [(0x0.0300016) + (0x0.969998)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300016) + (0x0.969998)]x1
+ [(1x0.0300016) + (0x0.969998)]x1
+ [(0x0.0300016) + (0x0.969998)]x1
+ [(0x0.0300016) + (1x0.969998)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138161 = 0.01381607054
π_Jn(a2) = π(a2) = 0.986184 = 0.9861839295
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300011)
+ (0.99x0.005x0.969999)
+ (0.2x0.995x0.0300011)
+ (0.003x0.995x0.969999) = 0.01381596366
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300011)
+ (0.01x0.005x0.969999)
+ (0.8x0.995x0.0300011)
+ (0.997x0.995x0.969999) = 0.9861840363
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.137709722e-07
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300011x0.0138164)
+ (0x0.0300011x0.986184)
+ (0x0.969999x0.0138164)
+ (0x0.969999x0.986184) = 0.000414506879
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300011x0.0138164)
+ (1x0.0300011x0.986184)
+ (0x0.969999x0.0138164)
+ (0x0.969999x0.986184) = 0.0295865825
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300011x0.0138164)
+ (0x0.0300011x0.986184)
+ (1x0.969999x0.0138164)
+ (0x0.969999x0.986184) = 0.01340188738
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300011x0.0138164)
+ (0x0.0300011x0.986184)
+ (0x0.969999x0.0138164)
+ (1x0.969999x0.986184) = 0.9565970232
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.702332097e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000115 0.5
b2 0.9949999999 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000108938 0.5
f2 0.9699989106 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000108938 0.5
f2 0.9699989106 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381596366 0.5 0.01381596366
a2 0.9861840363 0.5 0.9861840363
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381639426 0.5
a2 0.9861836057 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.000414506879 1 0.000414506879
_jn1 0.0295865825 1 0.0295865825
_jn2 0.01340188738 1 0.01340188738
_jn3 0.9565970232 1 0.9565970232
********************************************************************************
Iteration 33
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300011) + (0.99x0.969999)]x0.5
+ [(0.008x0.0300011) + (0.01x0.969999)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300011) + (0.003x0.969999)]x0.5
+ [(0.8x0.0300011) + (0.997x0.969999)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138164) + (0x0.986184)]x1
+ [(0x0.0138164) + (1x0.986184)]x1
+ [(0x0.0138164) + (0x0.986184)]x1
+ [(0x0.0138164) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138164) + (0x0.986184)]x1
+ [(0x0.0138164) + (0x0.986184)]x1
+ [(1x0.0138164) + (0x0.986184)]x1
+ [(0x0.0138164) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300011) + (0x0.969999)]x1
+ [(0x0.0300011) + (0x0.969999)]x1
+ [(0x0.0300011) + (1x0.969999)]x1
+ [(0x0.0300011) + (0x0.969999)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300011) + (0x0.969999)]x1
+ [(1x0.0300011) + (0x0.969999)]x1
+ [(0x0.0300011) + (0x0.969999)]x1
+ [(0x0.0300011) + (1x0.969999)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.013816 = 0.01381596366
π_Jn(a2) = π(a2) = 0.986184 = 0.9861840363
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300007)
+ (0.99x0.005x0.969999)
+ (0.2x0.995x0.0300007)
+ (0.003x0.995x0.969999) = 0.01381589242
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300007)
+ (0.01x0.005x0.969999)
+ (0.8x0.995x0.0300007)
+ (0.997x0.995x0.969999) = 0.9861841076
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.424762886e-07
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300007x0.0138162)
+ (0x0.0300007x0.986184)
+ (0x0.969999x0.0138162)
+ (0x0.969999x0.986184) = 0.0004144954028
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300007x0.0138162)
+ (1x0.0300007x0.986184)
+ (0x0.969999x0.0138162)
+ (0x0.969999x0.986184) = 0.02958623085
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300007x0.0138162)
+ (0x0.0300007x0.986184)
+ (1x0.969999x0.0138162)
+ (0x0.969999x0.986184) = 0.01340168356
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300007x0.0138162)
+ (0x0.0300007x0.986184)
+ (0x0.969999x0.0138162)
+ (1x0.969999x0.986184) = 0.9565975902
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.133899215e-06
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000058 0.5
b2 0.9949999999 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000072625 0.5
f2 0.9699992737 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000072625 0.5
f2 0.9699992737 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381589242 0.5 0.01381589242
a2 0.9861841076 0.5 0.9861841076
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381617896 0.5
a2 0.986183821 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144954028 1 0.0004144954028
_jn1 0.02958623085 1 0.02958623085
_jn2 0.01340168356 1 0.01340168356
_jn3 0.9565975902 1 0.9565975902
********************************************************************************
Iteration 34
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300007) + (0.99x0.969999)]x0.5
+ [(0.008x0.0300007) + (0.01x0.969999)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300007) + (0.003x0.969999)]x0.5
+ [(0.8x0.0300007) + (0.997x0.969999)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138162) + (0x0.986184)]x1
+ [(0x0.0138162) + (1x0.986184)]x1
+ [(0x0.0138162) + (0x0.986184)]x1
+ [(0x0.0138162) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138162) + (0x0.986184)]x1
+ [(0x0.0138162) + (0x0.986184)]x1
+ [(1x0.0138162) + (0x0.986184)]x1
+ [(0x0.0138162) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300007) + (0x0.969999)]x1
+ [(0x0.0300007) + (0x0.969999)]x1
+ [(0x0.0300007) + (1x0.969999)]x1
+ [(0x0.0300007) + (0x0.969999)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300007) + (0x0.969999)]x1
+ [(1x0.0300007) + (0x0.969999)]x1
+ [(0x0.0300007) + (0x0.969999)]x1
+ [(0x0.0300007) + (1x0.969999)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138159 = 0.01381589242
π_Jn(a2) = π(a2) = 0.986184 = 0.9861841076
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300005)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300005)
+ (0.003x0.995x0.97) = 0.01381584494
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300005)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300005)
+ (0.997x0.995x0.97) = 0.9861841551
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 9.496534587e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300005x0.013816)
+ (0x0.0300005x0.986184)
+ (0x0.97x0.013816)
+ (0x0.97x0.986184) = 0.0004144877599
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300005x0.013816)
+ (1x0.0300005x0.986184)
+ (0x0.97x0.013816)
+ (0x0.97x0.986184) = 0.02958599641
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300005x0.013816)
+ (0x0.0300005x0.986184)
+ (1x0.97x0.013816)
+ (0x0.97x0.986184) = 0.01340154793
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300005x0.013816)
+ (0x0.0300005x0.986184)
+ (0x0.97x0.013816)
+ (1x0.97x0.986184) = 0.9565979679
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 7.554200814e-07
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000029 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000048417 0.5
f2 0.9699995158 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000048417 0.5
f2 0.9699995158 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381584494 0.5 0.01381584494
a2 0.9861841551 0.5 0.9861841551
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381603569 0.5
a2 0.9861839643 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144877599 1 0.0004144877599
_jn1 0.02958599641 1 0.02958599641
_jn2 0.01340154793 1 0.01340154793
_jn3 0.9565979679 1 0.9565979679
********************************************************************************
Iteration 35
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300005) + (0.99x0.97)]x0.5
+ [(0.008x0.0300005) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300005) + (0.003x0.97)]x0.5
+ [(0.8x0.0300005) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.013816) + (0x0.986184)]x1
+ [(0x0.013816) + (1x0.986184)]x1
+ [(0x0.013816) + (0x0.986184)]x1
+ [(0x0.013816) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.013816) + (0x0.986184)]x1
+ [(0x0.013816) + (0x0.986184)]x1
+ [(1x0.013816) + (0x0.986184)]x1
+ [(0x0.013816) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300005) + (0x0.97)]x1
+ [(0x0.0300005) + (0x0.97)]x1
+ [(0x0.0300005) + (1x0.97)]x1
+ [(0x0.0300005) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300005) + (0x0.97)]x1
+ [(1x0.0300005) + (0x0.97)]x1
+ [(0x0.0300005) + (0x0.97)]x1
+ [(0x0.0300005) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381584494
π_Jn(a2) = π(a2) = 0.986184 = 0.9861841551
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300003)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300003)
+ (0.003x0.995x0.97) = 0.01381581329
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300003)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300003)
+ (0.997x0.995x0.97) = 0.9861841867
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.330080745e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300003x0.0138159)
+ (0x0.0300003x0.986184)
+ (0x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.0004144826689
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300003x0.0138159)
+ (1x0.0300003x0.986184)
+ (0x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.02958584011
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300003x0.0138159)
+ (0x0.0300003x0.986184)
+ (1x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.01340145764
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300003x0.0138159)
+ (0x0.0300003x0.986184)
+ (0x0.97x0.0138159)
+ (1x0.97x0.986184) = 0.9565982196
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.033478731e-07
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000014 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000032278 0.5
f2 0.9699996772 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000032278 0.5
f2 0.9699996772 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381581329 0.5 0.01381581329
a2 0.9861841867 0.5 0.9861841867
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381594031 0.5
a2 0.9861840597 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144826689 1 0.0004144826689
_jn1 0.02958584011 1 0.02958584011
_jn2 0.01340145764 1 0.01340145764
_jn3 0.9565982196 1 0.9565982196
********************************************************************************
Iteration 36
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300003) + (0.99x0.97)]x0.5
+ [(0.008x0.0300003) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300003) + (0.003x0.97)]x0.5
+ [(0.8x0.0300003) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (1x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1
+ [(1x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300003) + (0x0.97)]x1
+ [(0x0.0300003) + (0x0.97)]x1
+ [(0x0.0300003) + (1x0.97)]x1
+ [(0x0.0300003) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300003) + (0x0.97)]x1
+ [(1x0.0300003) + (0x0.97)]x1
+ [(0x0.0300003) + (0x0.97)]x1
+ [(0x0.0300003) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381581329
π_Jn(a2) = π(a2) = 0.986184 = 0.9861841867
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300002)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300002)
+ (0.003x0.995x0.97) = 0.01381579219
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300002)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300002)
+ (0.997x0.995x0.97) = 0.9861842078
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.219582663e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300002x0.0138159)
+ (0x0.0300002x0.986184)
+ (0x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.000414479277
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300002x0.0138159)
+ (1x0.0300002x0.986184)
+ (0x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.02958573591
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300002x0.0138159)
+ (0x0.0300002x0.986184)
+ (1x0.97x0.0138159)
+ (0x0.97x0.986184) = 0.01340139752
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300002x0.0138159)
+ (0x0.0300002x0.986184)
+ (0x0.97x0.0138159)
+ (1x0.97x0.986184) = 0.9565983873
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.354279168e-07
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000007 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000021519 0.5
f2 0.9699997848 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000021519 0.5
f2 0.9699997848 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381579219 0.5 0.01381579219
a2 0.9861842078 0.5 0.9861842078
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.0138158768 0.5
a2 0.9861841232 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.000414479277 1 0.000414479277
_jn1 0.02958573591 1 0.02958573591
_jn2 0.01340139752 1 0.01340139752
_jn3 0.9565983873 1 0.9565983873
********************************************************************************
Iteration 37
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300002) + (0.99x0.97)]x0.5
+ [(0.008x0.0300002) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300002) + (0.003x0.97)]x0.5
+ [(0.8x0.0300002) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (1x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (0x0.986184)]x1
+ [(1x0.0138159) + (0x0.986184)]x1
+ [(0x0.0138159) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300002) + (0x0.97)]x1
+ [(0x0.0300002) + (0x0.97)]x1
+ [(0x0.0300002) + (1x0.97)]x1
+ [(0x0.0300002) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300002) + (0x0.97)]x1
+ [(1x0.0300002) + (0x0.97)]x1
+ [(0x0.0300002) + (0x0.97)]x1
+ [(0x0.0300002) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381579219
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842078
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300001)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300001)
+ (0.003x0.995x0.97) = 0.01381577812
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300001)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300001)
+ (0.997x0.995x0.97) = 0.9861842219
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.812819542e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144770168
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (1x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958566644
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340135748
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565984991
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.235476582e-07
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000004 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000014346 0.5
f2 0.9699998565 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000014346 0.5
f2 0.9699998565 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381577812 0.5 0.01381577812
a2 0.9861842219 0.5 0.9861842219
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381583449 0.5
a2 0.9861841655 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144770168 1 0.0004144770168
_jn1 0.02958566644 1 0.02958566644
_jn2 0.01340135748 1 0.01340135748
_jn3 0.9565984991 1 0.9565984991
********************************************************************************
Iteration 38
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300001) + (0.99x0.97)]x0.5
+ [(0.008x0.0300001) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300001) + (0.003x0.97)]x0.5
+ [(0.8x0.0300001) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300001) + (0x0.97)]x1
+ [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381577812
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842219
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300001)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300001)
+ (0.003x0.995x0.97) = 0.01381576875
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300001)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300001)
+ (0.997x0.995x0.97) = 0.9861842313
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.875095211e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144755106
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (1x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958562013
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134013308
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565985736
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.489951524e-07
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000002 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000009564 0.5
f2 0.9699999044 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000009564 0.5
f2 0.9699999044 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381576875 0.5 0.01381576875
a2 0.9861842313 0.5 0.9861842313
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381580631 0.5
a2 0.9861841937 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144755106 1 0.0004144755106
_jn1 0.02958562013 1 0.02958562013
_jn2 0.0134013308 1 0.0134013308
_jn3 0.9565985736 1 0.9565985736
********************************************************************************
Iteration 39
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300001) + (0.99x0.97)]x0.5
+ [(0.008x0.0300001) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300001) + (0.003x0.97)]x0.5
+ [(0.8x0.0300001) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300001) + (0x0.97)]x1
+ [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381576875
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842313
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.0300001)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.0300001)
+ (0.003x0.995x0.97) = 0.0138157625
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.0300001)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.0300001)
+ (0.997x0.995x0.97) = 0.9861842375
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.250004601e-08
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144745068
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (1x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958558925
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340131302
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.0300001x0.0138158)
+ (0x0.0300001x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565986232
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 9.931121969e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005000000001 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000006376 0.5
f2 0.9699999362 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000006376 0.5
f2 0.9699999362 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.0138157625 0.5 0.0138157625
a2 0.9861842375 0.5 0.9861842375
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381578753 0.5
a2 0.9861842125 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144745068 1 0.0004144745068
_jn1 0.02958558925 1 0.02958558925
_jn2 0.01340131302 1 0.01340131302
_jn3 0.9565986232 1 0.9565986232
********************************************************************************
Iteration 40
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.0300001) + (0.99x0.97)]x0.5
+ [(0.008x0.0300001) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.0300001) + (0.003x0.97)]x0.5
+ [(0.8x0.0300001) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.0300001) + (0x0.97)]x1
+ [(1x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (0x0.97)]x1
+ [(0x0.0300001) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.0138157625
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842375
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575833
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842417
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.333069516e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144738377
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958556867
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340130118
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565986563
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 6.61977534e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000004251 0.5
f2 0.9699999575 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000004251 0.5
f2 0.9699999575 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575833 0.5 0.01381575833
a2 0.9861842417 0.5 0.9861842417
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381577501 0.5
a2 0.986184225 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144738377 1 0.0004144738377
_jn1 0.02958556867 1 0.02958556867
_jn2 0.01340130118 1 0.01340130118
_jn3 0.9565986563 1 0.9565986563
********************************************************************************
Iteration 41
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575833
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842417
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575556
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842444
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 5.555232455e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144733917
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958555495
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340129328
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565986784
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.412682933e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000002834 0.5
f2 0.9699999717 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000002834 0.5
f2 0.9699999717 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575556 0.5 0.01381575556
a2 0.9861842444 0.5 0.9861842444
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381576667 0.5
a2 0.9861842333 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144733917 1 0.0004144733917
_jn1 0.02958555495 1 0.02958555495
_jn2 0.01340129328 1 0.01340129328
_jn3 0.9565986784 1 0.9565986784
********************************************************************************
Iteration 42
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575556
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842444
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.0138157537
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842463
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.703414561e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144730944
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855458
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340128802
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565986931
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.941531181e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000001889 0.5
f2 0.9699999811 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000001889 0.5
f2 0.9699999811 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.0138157537 0.5 0.0138157537
a2 0.9861842463 0.5 0.9861842463
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381576111 0.5
a2 0.9861842389 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144730944 1 0.0004144730944
_jn1 0.0295855458 1 0.0295855458
_jn2 0.01340128802 1 0.01340128802
_jn3 0.9565986931 1 0.9565986931
********************************************************************************
Iteration 43
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.0138157537
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842463
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575247
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842475
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.46890635e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144728963
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855397
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340128451
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987029
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.960888467e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000001259 0.5
f2 0.9699999874 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000001259 0.5
f2 0.9699999874 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575247 0.5 0.01381575247
a2 0.9861842475 0.5 0.9861842475
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575741 0.5
a2 0.9861842426 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144728963 1 0.0004144728963
_jn1 0.0295855397 1 0.0295855397
_jn2 0.01340128451 1 0.01340128451
_jn3 0.9565987029 1 0.9565987029
********************************************************************************
Iteration 44
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575247
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842475
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575165
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842484
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.645919151e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144727642
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958553563
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340128217
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987094
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.307191058e-08
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.0300000084 0.5
f2 0.9699999916 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.0300000084 0.5
f2 0.9699999916 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575165 0.5 0.01381575165
a2 0.9861842484 0.5 0.9861842484
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575494 0.5
a2 0.9861842451 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144727642 1 0.0004144727642
_jn1 0.02958553563 1 0.02958553563
_jn2 0.01340128217 1 0.01340128217
_jn3 0.9565987094 1 0.9565987094
********************************************************************************
Iteration 45
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575165
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842484
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.0138157511
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842489
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.097270131e-09
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144726761
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958553292
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340128062
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987138
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 8.714258307e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.0300000056 0.5
f2 0.9699999944 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.0300000056 0.5
f2 0.9699999944 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.0138157511 0.5 0.0138157511
a2 0.9861842489 0.5 0.9861842489
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575329 0.5
a2 0.9861842467 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144726761 1 0.0004144726761
_jn1 0.02958553292 1 0.02958553292
_jn2 0.01340128062 1 0.01340128062
_jn3 0.9565987138 1 0.9565987138
********************************************************************************
Iteration 46
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.0138157511
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842489
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575073
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842493
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 7.315088656e-10
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144726174
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958553111
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127958
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987167
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.809326921e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000373 0.5
f2 0.9699999963 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000373 0.5
f2 0.9699999963 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575073 0.5 0.01381575073
a2 0.9861842493 0.5 0.9861842493
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575219 0.5
a2 0.9861842478 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144726174 1 0.0004144726174
_jn1 0.02958553111 1 0.02958553111
_jn2 0.01340127958 1 0.01340127958
_jn3 0.9565987167 1 0.9565987167
********************************************************************************
Iteration 47
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575073
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842493
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575049
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842495
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.876703156e-10
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725783
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552991
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127888
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987186
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.872792849e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000249 0.5
f2 0.9699999975 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000249 0.5
f2 0.9699999975 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575049 0.5 0.01381575049
a2 0.9861842495 0.5 0.9861842495
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575146 0.5
a2 0.9861842485 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725783 1 0.0004144725783
_jn1 0.02958552991 1 0.02958552991
_jn2 0.01340127888 1 0.01340127888
_jn3 0.9565987186 1 0.9565987186
********************************************************************************
Iteration 48
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575049
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842495
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575033
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842497
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.25112378e-10
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725522
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552911
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127842
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987199
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.58181512e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000166 0.5
f2 0.9699999983 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000166 0.5
f2 0.9699999983 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575033 0.5 0.01381575033
a2 0.9861842497 0.5 0.9861842497
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575098 0.5
a2 0.986184249 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725522 1 0.0004144725522
_jn1 0.02958552911 1 0.02958552911
_jn2 0.01340127842 1 0.01340127842
_jn3 0.9565987199 1 0.9565987199
********************************************************************************
Iteration 49
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575033
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842497
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575022
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842498
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.167409273e-10
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725348
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552857
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127812
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987208
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.721185934e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000111 0.5
f2 0.9699999989 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000111 0.5
f2 0.9699999989 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575022 0.5 0.01381575022
a2 0.9861842498 0.5 0.9861842498
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575065 0.5
a2 0.9861842493 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725348 1 0.0004144725348
_jn1 0.02958552857 1 0.02958552857
_jn2 0.01340127812 1 0.01340127812
_jn3 0.9565987208 1 0.9565987208
********************************************************************************
Iteration 50
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575022
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842498
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575014
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842499
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.444937295e-10
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725232
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552821
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127791
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987214
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.147445038e-09
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000074 0.5
f2 0.9699999993 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000074 0.5
f2 0.9699999993 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575014 0.5 0.01381575014
a2 0.9861842499 0.5 0.9861842499
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575043 0.5
a2 0.9861842496 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725232 1 0.0004144725232
_jn1 0.02958552821 1 0.02958552821
_jn2 0.01340127791 1 0.01340127791
_jn3 0.9565987214 1 0.9565987214
********************************************************************************
Iteration 51
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575014
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842499
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.0138157501
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842499
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 9.632908707e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725155
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552798
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127777
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987217
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 7.649571397e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000049 0.5
f2 0.9699999995 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000049 0.5
f2 0.9699999995 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.0138157501 0.5 0.0138157501
a2 0.9861842499 0.5 0.9861842499
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575029 0.5
a2 0.9861842497 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725155 1 0.0004144725155
_jn1 0.02958552798 1 0.02958552798
_jn2 0.01340127777 1 0.01340127777
_jn3 0.9565987217 1 0.9565987217
********************************************************************************
Iteration 52
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.0138157501
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842499
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575006
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.9861842499
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.421927573e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725103
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552782
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127768
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.956598722
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.099682295e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000033 0.5
f2 0.9699999997 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000033 0.5
f2 0.9699999997 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575006 0.5 0.01381575006
a2 0.9861842499 0.5 0.9861842499
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575019 0.5
a2 0.9861842498 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725103 1 0.0004144725103
_jn1 0.02958552782 1 0.02958552782
_jn2 0.01340127768 1 0.01340127768
_jn3 0.956598722 1 0.956598722
********************************************************************************
Iteration 53
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575006
π_Jn(a2) = π(a2) = 0.986184 = 0.9861842499
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575004
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.281283314e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725069
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552771
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127762
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987222
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.399771473e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000022 0.5
f2 0.9699999998 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000022 0.5
f2 0.9699999998 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575004 0.5 0.01381575004
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575013 0.5
a2 0.9861842499 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725069 1 0.0004144725069
_jn1 0.02958552771 1 0.02958552771
_jn2 0.01340127762 1 0.01340127762
_jn3 0.9565987222 1 0.9565987222
********************************************************************************
Iteration 54
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575004
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575003
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.854173495e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725046
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552764
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127758
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987223
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.26650527e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000015 0.5
f2 0.9699999999 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000015 0.5
f2 0.9699999999 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575003 0.5 0.01381575003
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575009 0.5
a2 0.9861842499 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725046 1 0.0004144725046
_jn1 0.02958552764 1 0.02958552764
_jn2 0.01340127758 1 0.01340127758
_jn3 0.9565987223 1 0.9565987223
********************************************************************************
Iteration 55
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575003
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575002
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.90280014e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725031
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552759
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127755
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987223
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.510999967e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.0300000001 0.5
f2 0.9699999999 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.0300000001 0.5
f2 0.9699999999 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575002 0.5 0.01381575002
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575006 0.5
a2 0.9861842499 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725031 1 0.0004144725031
_jn1 0.02958552759 1 0.02958552759
_jn2 0.01340127755 1 0.01340127755
_jn3 0.9565987223 1 0.9565987223
********************************************************************************
Iteration 56
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575002
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575001
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.268522093e-11
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.000414472502
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552756
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127754
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987224
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.007329311e-10
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000006 0.5
f2 0.9699999999 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000006 0.5
f2 0.9699999999 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575001 0.5 0.01381575001
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575004 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.000414472502 1 0.000414472502
_jn1 0.02958552756 1 0.02958552756
_jn2 0.01340127754 1 0.01340127754
_jn3 0.9565987224 1 0.9565987224
********************************************************************************
Iteration 57
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575001
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575001
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.456813375e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725014
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552754
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127752
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987224
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 6.715544169e-11
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000004 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000004 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575001 0.5 0.01381575001
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575003 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725014 1 0.0004144725014
_jn1 0.02958552754 1 0.02958552754
_jn2 0.01340127752 1 0.01340127752
_jn3 0.9565987224 1 0.9565987224
********************************************************************************
Iteration 58
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575001
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575001
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 5.637913747e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725009
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552753
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127752
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.477005312e-11
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000003 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000003 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575001 0.5 0.01381575001
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575002 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725009 1 0.0004144725009
_jn1 0.02958552753 1 0.02958552753
_jn2 0.01340127752 1 0.01340127752
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 59
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575001
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.75856811e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725006
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552752
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127751
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.984675652e-11
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000002 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000002 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575001 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725006 1 0.0004144725006
_jn1 0.02958552752 1 0.02958552752
_jn2 0.01340127751 1 0.01340127751
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 60
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.50575255e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725004
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552751
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.01340127751
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.98978317e-11
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575001 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725004 1 0.0004144725004
_jn1 0.02958552751 1 0.02958552751
_jn2 0.01340127751 1 0.01340127751
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 61
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.67046238e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725003
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552751
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.326518344e-11
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575001 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725003 1 0.0004144725003
_jn1 0.02958552751 1 0.02958552751
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 62
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.113716758e-12
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725002
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.02958552751
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 8.843527364e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03000000001 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725002 1 0.0004144725002
_jn1 0.02958552751 1 0.02958552751
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 63
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 7.423679727e-13
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725001
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.89547443e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725001 1 0.0004144725001
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 64
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.949495674e-13
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725001
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.930521381e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725001 1 0.0004144725001
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 65
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.299634871e-13
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725001
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.620320573e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725001 1 0.0004144725001
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 66
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.200132437e-13
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.746729985e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 67
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.466032157e-13
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.164591806e-12
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 68
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 9.784360822e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 7.76429756e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 69
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.512151929e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.175910698e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 70
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.34860481e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.450537382e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 71
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.891784034e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.300415717e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 72
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.931441118e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.533916765e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 73
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.287511764e-14
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.021882774e-13
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 74
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.621575676e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 6.816595899e-14
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 75
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 5.748873599e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.547870327e-14
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 76
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.797309689e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.024924061e-14
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 77
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.492797635e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.019500019e-14
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 78
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.734723476e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.350200333e-14
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 79
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.011343786e-15
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 9.038451411e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 80
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.170547572e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.989729112e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 81
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 5.846018114e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.880955887e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 82
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.775557562e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.665402621e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 83
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.237793284e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.776953151e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 84
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.856154119e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.250464576e-15
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 85
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 4.683753385e-17
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 7.278791285e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 86
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.439820485e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.857767834e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 87
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 2.255140519e-17
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 3.903127821e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 88
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.561251128e-17
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 2.243756396e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 89
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 8.67361738e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.90656952e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 90
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.938893904e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 5.838428699e-17
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 91
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 6.938893904e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 4.065758147e-17
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 92
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 3.469446952e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.341158087e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 93
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.127570259e-16
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.339531784e-16
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 94
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 8.67361738e-19
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.734723476e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 8.836247706e-18
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 95
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 1.734723476e-18
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 8.836247706e-18
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 96
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.788933585e-18
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 97
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 1.788933585e-18
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
********************************************************************************
Iteration 98
********************************************************************************
λ message Alarm --> Burglar
λAlarm(b1)
= [p(a1|b1,f1).πAlarm(f1) + p(a1|b1,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(f1) + p(a2|b1,f2).πAlarm(f2)].λ(a2)
= [(0.992x0.03) + (0.99x0.97)]x0.5
+ [(0.008x0.03) + (0.01x0.97)]x0.5 = 0.5
λAlarm(b2)
= [p(a1|b2,f1).πAlarm(f1) + p(a1|b2,f2).πAlarm(f2)].λ(a1)
+ [p(a2|b2,f1).πAlarm(f1) + p(a2|b2,f2).πAlarm(f2)].λ(a2)
= [(0.2x0.03) + (0.003x0.97)]x0.5
+ [(0.8x0.03) + (0.997x0.97)]x0.5 = 0.5
λ message Alarm --> FreightTruck
λAlarm(f1)
= [p(a1|b1,f1).πAlarm(b1) + p(a1|b2,f1).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f1).πAlarm(b1) + p(a2|b2,f1).πAlarm(b2)].λ(a2)
= [(0.992x0.005) + (0.2x0.995)]x0.5
+ [(0.008x0.005) + (0.8x0.995)]x0.5 = 0.5
λAlarm(f2)
= [p(a1|b1,f2).πAlarm(b1) + p(a1|b2,f2).πAlarm(b2)].λ(a1)
+ [p(a2|b1,f2).πAlarm(b1) + p(a2|b2,f2).πAlarm(b2)].λ(a2)
= [(0.99x0.005) + (0.003x0.995)]x0.5
+ [(0.01x0.005) + (0.997x0.995)]x0.5 = 0.5
λ message _Jn --> FreightTruck
λ_Jn(f1)
= [p(_jn0|f1,a1).π_Jn(a1) + p(_jn0|f1,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(a1) + p(_jn1|f1,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(a1) + p(_jn2|f1,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(a1) + p(_jn3|f1,a2).π_Jn(a2)].λ(_jn3)
= [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1 = 1
λ_Jn(f2)
= [p(_jn0|f2,a1).π_Jn(a1) + p(_jn0|f2,a2).π_Jn(a2)].λ(_jn0)
+ [p(_jn1|f2,a1).π_Jn(a1) + p(_jn1|f2,a2).π_Jn(a2)].λ(_jn1)
+ [p(_jn2|f2,a1).π_Jn(a1) + p(_jn2|f2,a2).π_Jn(a2)].λ(_jn2)
+ [p(_jn3|f2,a1).π_Jn(a1) + p(_jn3|f2,a2).π_Jn(a2)].λ(_jn3)
= [(0x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (0x0.986184)]x1
+ [(1x0.0138158) + (0x0.986184)]x1
+ [(0x0.0138158) + (1x0.986184)]x1 = 1
λ message _Jn --> Alarm
λ_Jn(a1)
= [p(_jn0|f1,a1).π_Jn(f1) + p(_jn0|f2,a1).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a1).π_Jn(f1) + p(_jn1|f2,a1).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a1).π_Jn(f1) + p(_jn2|f2,a1).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a1).π_Jn(f1) + p(_jn3|f2,a1).π_Jn(f2)].λ(_jn3)
= [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1 = 1
λ_Jn(a2)
= [p(_jn0|f1,a2).π_Jn(f1) + p(_jn0|f2,a2).π_Jn(f2)].λ(_jn0)
+ [p(_jn1|f1,a2).π_Jn(f1) + p(_jn1|f2,a2).π_Jn(f2)].λ(_jn1)
+ [p(_jn2|f1,a2).π_Jn(f1) + p(_jn2|f2,a2).π_Jn(f2)].λ(_jn2)
+ [p(_jn3|f1,a2).π_Jn(f1) + p(_jn3|f2,a2).π_Jn(f2)].λ(_jn3)
= [(0x0.03) + (0x0.97)]x1
+ [(1x0.03) + (0x0.97)]x1
+ [(0x0.03) + (0x0.97)]x1
+ [(0x0.03) + (1x0.97)]x1 = 1
π message Burglar --> Alarm
πAlarm(b1) = π(b1) = 0.005 = 0.005
πAlarm(b2) = π(b2) = 0.995 = 0.995
π message FreightTruck --> Alarm
πAlarm(f1) = π(f1).λ_Jn(f1) = 0.03 x 0.5 = 0.015
πAlarm(f2) = π(f2).λ_Jn(f2) = 0.97 x 0.5 = 0.485
π message FreightTruck --> _Jn
π_Jn(f1) = π(f1).λAlarm(f1) = 0.03 x 0.5 = 0.015
π_Jn(f2) = π(f2).λAlarm(f2) = 0.97 x 0.5 = 0.485
π message Alarm --> _Jn
π_Jn(a1) = π(a1) = 0.0138158 = 0.01381575
π_Jn(a2) = π(a2) = 0.986184 = 0.98618425
var Burglar:
π(b1)
= p(b1)
= (0.005) = 0.005
π(b2)
= p(b2)
= (0.995) = 0.995
λ(b1) = λAlarm(b1) = 0.5 = 0.5
λ(b2) = λAlarm(b2) = 0.5 = 0.5
belief change = 0
var FreightTruck:
π(f1)
= p(f1)
= (0.03) = 0.03
π(f2)
= p(f2)
= (0.97) = 0.97
λ(f1) = λAlarm(f1).λ_Jn(f1) = 0.5 x 0.5 = 0.25
λ(f2) = λAlarm(f2).λ_Jn(f2) = 0.5 x 0.5 = 0.25
belief change = 0
var Alarm:
π(a1)
= p(a1|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a1|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a1|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a1|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.992x0.005x0.03)
+ (0.99x0.005x0.97)
+ (0.2x0.995x0.03)
+ (0.003x0.995x0.97) = 0.01381575
π(a2)
= p(a2|b1,f1).πAlarm(b1).πAlarm(f1)
+ p(a2|b1,f2).πAlarm(b1).πAlarm(f2)
+ p(a2|b2,f1).πAlarm(b2).πAlarm(f1)
+ p(a2|b2,f2).πAlarm(b2).πAlarm(f2)
= (0.008x0.005x0.03)
+ (0.01x0.005x0.97)
+ (0.8x0.995x0.03)
+ (0.997x0.995x0.97) = 0.98618425
λ(a1) = λ_Jn(a1) = 0.5 = 0.5
λ(a2) = λ_Jn(a2) = 0.5 = 0.5
belief change = 0
var _Jn:
π(_jn0)
= p(_jn0|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn0|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn0|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn0|f2,a2).π_Jn(f2).π_Jn(a2)
= (1x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0004144725
π(_jn1)
= p(_jn1|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn1|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn1|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn1|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (1x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0295855275
π(_jn2)
= p(_jn2|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn2|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn2|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn2|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (1x0.97x0.0138158)
+ (0x0.97x0.986184) = 0.0134012775
π(_jn3)
= p(_jn3|f1,a1).π_Jn(f1).π_Jn(a1)
+ p(_jn3|f1,a2).π_Jn(f1).π_Jn(a2)
+ p(_jn3|f2,a1).π_Jn(f2).π_Jn(a1)
+ p(_jn3|f2,a2).π_Jn(f2).π_Jn(a2)
= (0x0.03x0.0138158)
+ (0x0.03x0.986184)
+ (0x0.97x0.0138158)
+ (1x0.97x0.986184) = 0.9565987225
λ(_jn0) = 1
λ(_jn1) = 1
λ(_jn2) = 1
λ(_jn3) = 1
belief change = 0
domain π(Burglar) λ(Burglar) belief
----------------------------------------------------------------
b1 0.005 0.5 0.005
b2 0.995 0.5 0.995
domain πAlarm(Burglar) λAlarm(Burglar)
----------------------------------------------------------------
b1 0.005 0.5
b2 0.995 0.5
domain π(FreightTruck) λ(FreightTruck) belief
----------------------------------------------------------------
f1 0.03 0.25 0.03
f2 0.97 0.25 0.97
domain πAlarm(FreightTruck) λAlarm(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π_Jn(FreightTruck) λ_Jn(FreightTruck)
----------------------------------------------------------------
f1 0.03 0.5
f2 0.97 0.5
domain π(Alarm) λ(Alarm) belief
----------------------------------------------------------------
a1 0.01381575 0.5 0.01381575
a2 0.98618425 0.5 0.98618425
domain π_Jn(Alarm) λ_Jn(Alarm)
----------------------------------------------------------------
a1 0.01381575 0.5
a2 0.98618425 0.5
domain π(_Jn) λ(_Jn) belief
----------------------------------------------------------------
_jn0 0.0004144725 1 0.0004144725
_jn1 0.0295855275 1 0.0295855275
_jn2 0.0134012775 1 0.0134012775
_jn3 0.9565987225 1 0.9565987225
Iterative belief propagation converged in 98 iterations