public override ReinforcementLearningAction ActionForState(ReinforcementLearningState state, ReinforcementLearningQStore qFunction)
 {
     Random r = new Random();
     if (r.NextDouble() > EPSILON)
     {
         return new InvertedPendulumAction2((float)r.NextDouble());
     }
     else
     {                
         ReinforcementLearningAction ret;
         float value;
         qFunction.GetBestActionAndUtilityForState(state, out ret, out value);
         return ret;
     }
     
 }
        public override void ActionProbabilities(ReinforcementLearningState state, ReinforcementLearningQStore qFunction, out ReinforcementLearningAction[] actions, out float[] probabilities)
        {
            ReinforcementLearningAction action;
            float utility;

            actions = state.GetActions();
            probabilities = new float[actions.Length];

            qFunction.GetBestActionAndUtilityForState(state, out action, out utility);

            for (int i = 0; i < actions.Length; ++i)
            {
                if (actions[i].Equals(action))
                {
                    probabilities[i] = Epsilon;
                }
                else probabilities[i] = (1 - Epsilon) / (actions.Length - 1);
            }            
        }
 public new ReinforcementLearningAction ActionForState(ReinforcementLearningState state, ReinforcementLearningQStore qFunction)
 {
     ReinforcementLearningAction action;
     float utility;
     qFunction.GetBestActionAndUtilityForState(state, out action, out utility);
     return action;
 }