#probrc(bn_sprinkler_soffquery(shoes_wetshould be same as previous case #bn_sprinklerv querydo(seasonobs={sprinkler:"off"}#bn_sprinklerv querydo(seasondo={sprinkler:"off"}probdo py -(continued from probvariables import variable from probfactors import prob from probgraphicalmodels import boolean drug_prone variable("drug_prone"booleanposition=( , )takes_marijuana variable("takes_marijuana"booleanposition=( , )side_effects variable("side_effects"booleanposition=( , )takes_hard_drugs variable("takes_hard_drugs"booleanposition=( , ) p_dp prob(drug_prone[][ ]p_tm prob(takes_marijuana[drug_prone][[ ][ ]]p_be prob(side_effects[takes_marijuana][[ ][ ]]p_thd prob(takes_hard_drugs[side_effectsdrug_prone]drug_prone=false drug_prone=true [[[ ][ ]]side_effects=false [[ ][ ]]]side_effects=true drugs beliefnetwork("gateway drugs"[drug_prone,takes_marijuana,side_effects,takes_hard_drugs][p_dpp_tmp_bep_thd]drugsq probrc(drugsdrugsq querydo(takes_hard_drugsdrugsq querydo(takes_hard_drugsobs {takes_marijuanatrue}drugsq querydo(takes_hard_drugsobs {takes_marijuanafalse}drugsq querydo(takes_hard_drugsdo {takes_marijuanatrue}drugsq querydo(takes_hard_drugsdo {takes_marijuanafalse}version june