Rev | Line | |
---|
[11744] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.Threading.Tasks;
|
---|
| 6 | using HeuristicLab.Problems.GrammaticalOptimization;
|
---|
| 7 |
|
---|
| 8 | namespace HeuristicLab.Algorithms.Bandits {
|
---|
| 9 | // this interface represents a policy for reinforcement learning
|
---|
| 10 | public interface IPolicy<in TState, TAction> {
|
---|
| 11 | TAction SelectAction(Random random, TState state, IEnumerable<TAction> actions);
|
---|
| 12 | void UpdateReward(TState state, TAction action, double reward, TState newState); // reward received when after taking action in state and new state
|
---|
| 13 | bool Done(TState state); // for deterministic MDP with deterministic rewards and goal to find a state with max reward
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | public interface IGrammarPolicy : IPolicy<ReadonlySequence, ReadonlySequence> {
|
---|
| 17 |
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.