srAlmende::ChoreoFitness Class Reference

#include <choreoFitness.h>

List of all members.

Public Member Functions

 ChoreoFitness (const std::string &name)
 Constructor.
void ProcessMessage (const dtGame::Message &message)
 Handle messages from the GM.

Protected Member Functions

virtual ~ChoreoFitness ()
 Destructor.

Detailed Description

This is an example use of the base input component for our tutorial. We will put all of our keyboard and mouse event handling in here. As a GM component, it will also receive all game messages in ProcessMessage() and DispatchNetworkMessage().

Definition at line 15 of file choreoFitness.h.


Constructor & Destructor Documentation

srAlmende::ChoreoFitness::ChoreoFitness ( const std::string &  name  ) 

Constructor.

Author:
Anne C. van Rossum
Date:
Jan 28, 2009
Project:
Replicator FP7
Company:
Almende B.V. (prefix "alm")
Cases:
Evolution

This component is a dtGame::GMComponent which each simulation tick calculates the attribution to the fitness defined per robot. In this implementation each robot does have the same genetic code, so fitness can just be averaged and used as a global figure. At the end of the trial this component sends a message with the accumulated fitness value to the tcpipComponent class in the form of a TCPIP message.

Definition at line 24 of file choreoFitness.cpp.


Member Function Documentation

void srAlmende::ChoreoFitness::ProcessMessage ( const dtGame::Message &  message  ) 

Handle messages from the GM.

Each tick the success of the robot population is measured, using routines on the AlmChoreoAgent class. The fitness is incremented each tick with a certain amount. After a predefined number of trials, a message is sent with the fitness values to the TCP/IP component. In this implementation the fitness value for all (both) robots will be the same. Different robots in the same generation are not put in parallel, but are tested out at different times.

Start measuring fitness after receiving a "reincarnation" command.

Definition at line 87 of file choreoFitness.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations

Generated on Thu Feb 4 16:32:06 2010 for Delta3D Plugin by  doxygen 1.6.1