61 std::vector<uint> rowNo;
62 std::vector<uint> columnNo;
63 std::vector<uint> maxSteps;
64 std::vector<uint> foodNo;
65 std::vector<char*> board;
79 static const char LEFT, RIGHT, UP, DOWN;
89 FitnessP
evaluate(IndividualP individual);
99typedef boost::shared_ptr<AntEvalOp> AntEvalOpP;
Artificial ant evaluation class (and environment simulator)
friend ostream & operator<<(ostream &os, AntEvalOp &ant)
Output the current state of the board (show ant movements)
void turnRight()
Turn ant on the right.
void showStep(string action)
Show the ant's current action (interactive)
bool initialize(StateP)
Initialize the simulator, read environments from input file.
static bool step
show the ant's movement interactive step by step (no effect if trace is false!)
static bool trace
trace the ant's movement in the simulator (for visual output)
void moveAhead()
Move ant ahead.
void registerParameters(StateP)
Register evaluator parameters. Called before EvaluateOp::initialize method.
FitnessP evaluate(IndividualP individual)
Evaluation function, simulates ant movement and counts the eaten food.
bool facingFood()
Check if there's food in front.
void turnLeft()
Turn ant on the left.