Ejemplo n.º 1
0
 /// <summary>
 /// Build a new belief node with an empty belief
 /// </summary>
 /// <param name="observation">Observation that characterize the node</param>
 /// <param name="parentNode">Parent of the node</param>
 public BeliefNode(Observation observation, ActionNode parentNode, MarkovModel markovModel)
 {
     Observation = observation;
     Parent      = parentNode;
     MarkovModel = markovModel;
     Belief      = new Distribution <State>();
     Children    = new List <ActionNode>();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Build a new belief node with a given starting distribution
 /// </summary>
 /// <param name="d">Starting distribution</param>
 /// <param name="o">Observation that characterize the node</param>
 /// <param name="n">Parent of the node</param>
 public BeliefNode(Distribution <State> d, Observation o, ActionNode n, MarkovModel markovModel) : base()
 {
     Observation = o;
     Parent      = n;
     MarkovModel = markovModel;
     Belief      = d;
     Children    = new List <ActionNode>();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initialize a sampling tree with an  existing belief node
 /// </summary>
 /// <param name="n"></param>
 /// <param name="sampleNumber"></param>
 /// <param name="maxDepth"></param>
 /// <param name="markovModel"></param>
 public SamplingTree(BeliefNode n, MarkovModel markovModel, int sampleNumber, int maxDepth, float gama, float C)
 {
     // The root is an existing beliefNode, useful to conserve the previous explorations
     Root         = n;
     _markovModel = markovModel;
     for (int i = 0; i < sampleNumber; i++)
     {
         GrowTree(maxDepth, gama, C);
     }
 }
Ejemplo n.º 4
0
 //
 /// <summary>
 /// Create the Sampling tree of potential events
 /// </summary>
 /// <param name="d">Actual distribution of states of the system</param>
 /// <param name="sampleNumber">number of samples in the tree</param>
 /// <param name="maxDepth">maximum depth for each branch</param>
 /// <param name="markovModel">model</param>
 public SamplingTree(Distribution <State> d, MarkovModel markovModel, int sampleNumber, int maxDepth, float gama, float C)
 {
     // The root is the given distribution
     _markovModel = markovModel;
     Root         = new BeliefNode(d, null, null, markovModel);
     for (int i = 0; i < sampleNumber; i++)
     {
         GrowTree(maxDepth, gama, C);
     }
 }