public override Tuple<int, int> PerformAction(int action)
{
Debug.Assert(this.IsValidAction(action), "non-valid action used " + action);
this.Action = action;
if (this._rnd.NextDouble() < this._probability)
{
this.Observation = this.OHead;
}
else
{
this.Observation = this.OTail;
}
if (action == this.Observation)
{
Reward = this.RWin;
}
else
{
Reward = this.RLose;
}
return new Tuple<int, int>(this.Observation, this.Reward);
}