ros_monty_hall.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # monty hall example
4 # https://github.com/eBay/bayesian-belief-networks/blob/master/docs/tutorial/tutorial.rst
5 # rosservice call /monty_hall/query []
6 # rosservice call /monty_hall/query [[guest_door,A]]
7 # rosservice call /monty_hall/query [[guest_door,A],[monty_door,B]]
8 
9 import imp
10 try:
11  imp.find_module('bayesian_belief_networks')
12 except:
13  import roslib; roslib.load_manifest('bayesian_belief_networks')
14 
17 
18 import rospy
19 
20 rospy.init_node('monty_hall')
22  f_prize_door,
23  f_guest_door,
24  f_monty_door,
25  domains=dict(
26  prize_door=['A', 'B', 'C'],
27  guest_door=['A', 'B', 'C'],
28  monty_door=['A', 'B', 'C']))
29 
30 rospy.spin()
31 
32 
33 


bayesian_belief_networks
Author(s):
autogenerated on Wed Jul 10 2019 03:47:00