ECF 1.5
MoveAhead.h
1#include "AntEvalOp.h"
2
3
9{
10public:
11 MoveAhead()
12 {
13 nArguments_ = 0;
14 name_ = "move";
15 }
16
17 void execute(void* evalOp, Tree::Tree& tree)
18 {
19 // get pointer to simulator from the context
20 AntEvalOp* ant = (AntEvalOp*) state_->getContext()->environment;
21 ant->moveAhead();
22 }
23
25 { }
26};
Artificial ant evaluation class (and environment simulator)
Definition: AntEvalOp.h:51
void moveAhead()
Move ant ahead.
Definition: AntEvalOp.cpp:211
GP terminal, moves the ant one square ahead.
Definition: MoveAhead.h:9
void execute(void *evalOp, Tree::Tree &tree)
Execute the primitive.
Definition: MoveAhead.h:17
Base primitive class (Tree genotype).
Definition: Primitive.h:37
Tree class - implements genotype as a tree.
Definition: Tree_c.h:29