Last change
on this file since 9584 was
9565,
checked in by melkaref, 12 years ago
|
Robocode Plugin code without Mutation Operators
|
File size:
1.3 KB
|
Line | |
---|
1 | using HeuristicLab.Common;
|
---|
2 | using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
|
---|
3 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
4 |
|
---|
5 | namespace HeuristicLab.Problems.Robocode
|
---|
6 | {
|
---|
7 | [StorableClass]
|
---|
8 | public class DoNothing : CodeNode
|
---|
9 | {
|
---|
10 | public override int MinimumArity { get { return 0; } }
|
---|
11 | public override int MaximumArity { get { return 0; } }
|
---|
12 |
|
---|
13 | [Storable]
|
---|
14 | public override string Prefix { get; set; }
|
---|
15 |
|
---|
16 | [Storable]
|
---|
17 | public override string Suffix { get; set; }
|
---|
18 |
|
---|
19 | [StorableConstructor]
|
---|
20 | private DoNothing(bool deserializing) : base(deserializing) { }
|
---|
21 | private DoNothing(DoNothing original, Cloner cloner)
|
---|
22 | : base(original, cloner)
|
---|
23 | {
|
---|
24 | }
|
---|
25 |
|
---|
26 | public DoNothing()
|
---|
27 | : base("DoNothing", "Do nothing this turn, meaning that the robot will skip it's turn.")
|
---|
28 | {
|
---|
29 | }
|
---|
30 |
|
---|
31 | public override IDeepCloneable Clone(Cloner cloner)
|
---|
32 | {
|
---|
33 | return new DoNothing(this, cloner);
|
---|
34 | }
|
---|
35 |
|
---|
36 | public override string Interpret(ISymbolicExpressionTreeNode node, System.Collections.Generic.IEnumerable<ISymbolicExpressionTreeNode> children)
|
---|
37 | {
|
---|
38 | return "";
|
---|
39 | }
|
---|
40 | }
|
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.