Last change
on this file since 13553 was
12924,
checked in by gkronber, 9 years ago
|
#2471
- implemented a demo for value approximation with gbt and a trivial feature function
|
File size:
1.1 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using HeuristicLab.Common;
|
---|
4 | using HeuristicLab.Core;
|
---|
5 | using HeuristicLab.Parameters;
|
---|
6 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction {
|
---|
9 | [StorableClass]
|
---|
10 | [Item("TabularMaxStateValueFunction", "")]
|
---|
11 | public class TabularMaxStateValueFunction : TabularStateValueFunctionBase {
|
---|
12 |
|
---|
13 | public TabularMaxStateValueFunction()
|
---|
14 | : base() {
|
---|
15 | }
|
---|
16 |
|
---|
17 | #region item
|
---|
18 | [StorableConstructor]
|
---|
19 | protected TabularMaxStateValueFunction(bool deserializing) : base(deserializing) { }
|
---|
20 | protected TabularMaxStateValueFunction(TabularMaxStateValueFunction original, Cloner cloner)
|
---|
21 | : base(original, cloner) {
|
---|
22 | }
|
---|
23 | public override IDeepCloneable Clone(Cloner cloner) {
|
---|
24 | return new TabularMaxStateValueFunction(this, cloner);
|
---|
25 | }
|
---|
26 | #endregion
|
---|
27 |
|
---|
28 | protected override double CalculateNewQ(object state, double observedQuality) {
|
---|
29 | return Math.Max(Value(state), observedQuality);
|
---|
30 | }
|
---|
31 | }
|
---|
32 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.