Rev | Line | |
---|
[11742] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.Threading.Tasks;
|
---|
| 6 | using HeuristicLab.Common;
|
---|
| 7 | using HeuristicLab.Problems.GrammaticalOptimization;
|
---|
| 8 |
|
---|
| 9 | namespace HeuristicLab.Algorithms.Bandits.GrammarPolicies {
|
---|
| 10 | public class RandomPolicy : IGrammarPolicy {
|
---|
| 11 | public ReadonlySequence SelectAction(Random random, ReadonlySequence state, IEnumerable<ReadonlySequence> actions) {
|
---|
| 12 | return actions.SelectRandom(random);
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | public void UpdateReward(ReadonlySequence state, ReadonlySequence action, double reward, ReadonlySequence newState) {
|
---|
| 16 | // ignore
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | public bool Done(ReadonlySequence state) {
|
---|
| 20 | return false;
|
---|
| 21 | }
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.