Last change
on this file since 13042 was
12893,
checked in by gkronber, 9 years ago
|
#2283: experiments on grammatical optimization algorithms (maxreward instead of avg reward, ...)
|
File size:
755 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Diagnostics;
|
---|
4 | using System.Linq;
|
---|
5 | using System.Text;
|
---|
6 | using System.Threading.Tasks;
|
---|
7 | using HeuristicLab.Common;
|
---|
8 |
|
---|
9 | namespace HeuristicLab.Algorithms.Bandits.BanditPolicies {
|
---|
10 | public class SingleArmPolicy : IBanditPolicy {
|
---|
11 | public int Arm { get; private set; }
|
---|
12 |
|
---|
13 | public SingleArmPolicy(int arm) {
|
---|
14 | this.Arm = arm;
|
---|
15 | }
|
---|
16 |
|
---|
17 | public override string ToString() {
|
---|
18 | return string.Format("SingleArmPolicy({0})", Arm);
|
---|
19 | }
|
---|
20 |
|
---|
21 | public int SelectAction(Random random, IEnumerable<IBanditPolicyActionInfo> actionInfos) {
|
---|
22 | return Arm;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public IBanditPolicyActionInfo CreateActionInfo() {
|
---|
26 | return new DefaultPolicyActionInfo();
|
---|
27 | }
|
---|
28 | }
|
---|
29 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.