示例#1
0
 public double GetTransitionProbability(
     MDPTransition <TState, TAction> transition)
 {
     return(transitionModel.GetTransitionProbability(transition
                                                     .GetInitialState(), transition.GetAction(), transition
                                                     .GetDestinationState()));
 }
示例#2
0
 public void SetTransitionProbability(
     MDPTransition <TState, TAction> transition,
     double probability)
 {
     transitionModel.SetTransitionProbability(transition.GetInitialState(),
                                              transition.GetAction(), transition.GetDestinationState(),
                                              probability);
 }
示例#3
0
 public void SetTransitionProbability(TState initialState,
                                      TAction action, TState finalState, double probability)
 {
     if (!(IsTerminal(initialState)))
     {
         MDPTransition <TState, TAction> t = new MDPTransition <TState, TAction>(
             initialState, action, finalState);
         transitionToProbability[t] = probability;
     }
 }
示例#4
0
        public double GetTransitionProbability(TState initialState,
                                               TAction action, TState finalState)
        {
            MDPTransition <TState, TAction> key = new MDPTransition <TState, TAction>(
                initialState, action, finalState);

            if (transitionToProbability.Keys.Contains(key))
            {
                return(transitionToProbability[key]);
            }
            else
            {
                return(0.0);
            }
        }
示例#5
0
 public bool Equals(MDPTransition <TState, TAction> other)
 {
     return(Equals(other.triplet, this.triplet));
 }