using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading.Tasks; using HeuristicLab.Common; namespace HeuristicLab.Algorithms.Bandits { public class RandomPolicy : BanditPolicy { private readonly Random random; public RandomPolicy(Random random, int numActions) : base(numActions) { this.random = random; } public override int SelectAction() { Debug.Assert(Actions.Any()); return Actions.SelectRandom(random); } public override void UpdateReward(int action, double reward) { // do nothing } } }