Daniel@0: #| Daniel@0: The following code represents the burglar alarm Bayes network from Daniel@0: Chapter 14 of Russell & Norvig, 2nd Edition. This network representation Daniel@0: is used in the corresponding Bayes net code found in this directory. Daniel@0: Daniel@0: The conditional probability tables consist of the values listed here Daniel@0: (along with the probabilities of the corresponding complementary events): Daniel@0: Daniel@0: P(Burglary = true) = 0.001 (=> P(Burglary = false) = 0.999) Daniel@0: P(Earthquake = true) = 0.002 (=> P(Earthquake = false) = 0.998) Daniel@0: Daniel@0: P(Alarm = true | Burglary = true, Earthquake = true) = 0.95 Daniel@0: P(Alarm = true | Burglary = true, Earthquake = false) = 0.94 Daniel@0: P(Alarm = true | Burglary = false, Earthquake = true) = 0.29 Daniel@0: P(Alarm = true | Burglary = false, Earthquake = false) = 0.001 Daniel@0: Daniel@0: P(JohnCalls = true | Alarm = true) = 0.90 Daniel@0: P(JohnCalls = true | Alarm = false) = 0.05 Daniel@0: Daniel@0: P(MaryCalls = true | Alarm = true) = 0.70 Daniel@0: P(MaryCalls = true | Alarm = false) = 0.01 Daniel@0: |# Daniel@0: Daniel@0: (setf *burglar-alarm-net* Daniel@0: '((MaryCalls (true false) Daniel@0: (Alarm) Daniel@0: ((true) 0.70 0.30) Daniel@0: ((false) 0.01 0.99)) Daniel@0: (JohnCalls (true false) Daniel@0: (Alarm) Daniel@0: ((true) 0.90 0.10) Daniel@0: ((false) 0.05 0.95)) Daniel@0: (Alarm (true false) Daniel@0: (Burglary Earthquake) Daniel@0: ((true true) 0.95 0.05) Daniel@0: ((true false) 0.94 0.06) Daniel@0: ((false true) 0.29 0.71) Daniel@0: ((false false) 0.001 0.999)) Daniel@0: (Burglary (true false) Daniel@0: () Daniel@0: (0.001 0.999)) Daniel@0: (Earthquake (true false) Daniel@0: () Daniel@0: (0.002 0.998)) Daniel@0: ))