public void RecordContinuousAction(StatisticsCalculator <RobotJoint, float> statisticsCalculator) { if (this.ContinuousActionCache.HasValue) { statisticsCalculator.Record(this.RobotJoint, this.ContinuousActionCache.Value, this.outcomeCache.Value); Console.WriteLine($" {statisticsCalculator.TotalActions}, ctxt, {this.RobotJoint.Id}, action, {this.ContinuousActionCache.Value}, outcome, {this.outcomeCache.Value}, dist, {this.ActionDistributionString}, {statisticsCalculator.GetStats(this.RobotJoint, this.ContinuousActionCache.Value)}"); } }
public void Record(StatisticsCalculator <Person, int> statisticsCalculator) { if (this.DecisionCache.HasValue) { statisticsCalculator.Record(this.Person, (int)this.DecisionCache.Value, this.outcomeCache.Value); Console.WriteLine($" {statisticsCalculator.TotalActions}, ctxt, {this.Person.Id}, action, {this.DecisionCache.Value}, outcome, {this.outcomeCache.Value}, dist, {this.ActionDistributionString}, {statisticsCalculator.GetStats(this.Person, (int)this.DecisionCache.Value)}"); } }