using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using HeuristicLab.Common; using HeuristicLab.Core; using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; namespace HeuristicLab.Algorithms.IteratedSymbolicExpressionConstruction { // simply returns the concatenated actions (the full path of actions to the current decision represents the state) [StorableClass] [Item("DefaultStateFunction", "")] internal class DefaultStateFunction : Item, IStateFunction { public DefaultStateFunction() : base() { } public object CreateState(ISymbolicExpressionTreeNode root, List actions, ISymbolicExpressionTreeNode parentNode, int childIdx) { return string.Join(",", actions); } #region item [StorableConstructor] protected DefaultStateFunction(bool deserializing) : base(deserializing) { } protected DefaultStateFunction(DefaultStateFunction original, Cloner cloner) : base(original, cloner) { } public override IDeepCloneable Clone(Cloner cloner) { return new DefaultStateFunction(this, cloner); } #endregion } }