Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends

AntEvalOp Class Reference
[Artificial Ant Example (GP)]

Artificial ant evaluation class (and environment simulator). More...

#include <AntEvalOp.h>

Inheritance diagram for AntEvalOp:

List of all members.

Public Member Functions

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 initialize (StateP)
 Initialize the simulator, read environments from input file.
void turnLeft ()
 Turn ant on the left.
bool facingFood ()
 Check if there's food in front.
void turnRight ()
 Turn ant on the right.
void moveAhead ()
 Move ant ahead.

Static Public Attributes

static bool trace = false
 trace the ant's movement in the simulator (for visual output)
static bool step = false
 show the ant's movement interactive step by step (no effect if trace is false!)

Protected Member Functions

void showStep (string action)
 Show the ant's current action (interactive).

Protected Attributes

uint x_
uint y_
uint facing_
uint moves_
uint foodEaten_
std::vector< uint > rowNo
std::vector< uint > columnNo
std::vector< uint > maxSteps
std::vector< uint > foodNo
std::vector< char * > board
uint tmpRow
uint tmpColumn
uint tmpMaxSteps
uint tmpFoodNo
uint boardNo
uint boardNo2
char * tmpBoard
StateP state_
string currentTree

Static Protected Attributes

static const char LEFT = '<'
static const char RIGHT = '>'
static const char UP = '^'
static const char DOWN = 'v'


ostream & operator<< (ostream &os, AntEvalOp &ant)
 Output the current state of the board (show ant movements).

Detailed Description

Artificial ant evaluation class (and environment simulator).

Definition at line 50 of file AntEvalOp.h.

The documentation for this class was generated from the following files: