Graine
Génération procédurale de créatures et apprentissage par réseaux de neurones.
Public Member Functions | Static Public Member Functions | List of all members
Creature Class Reference

#include <Creature.hpp>

Public Member Functions

 Creature (int id, Map &map, Position position)
 
 Creature (int id, Map &map, Position position, NeuronNetwork brain)
 
 Creature (int id, Map &map, Position position, Position &objective)
 
 Creature (int id, Map &map, Position position, NeuronNetwork brain, Position &objective)
 
 Creature (Creature &copy)
 
void think ()
 
void eat ()
 
void doActions ()
 
void move (int speed)
 
void move (double forceLeft, double forceRight)
 
void turnLeft ()
 
void turnRight ()
 
void addInputFeature (InputId, InputFeature *input)
 
void addOutputFeature (OutputId, OutputFeature *output)
 
void clearFeatures ()
 
void addFeelingBar (FeelingBarId id, FeelingBar *bar)
 
double getFeelingValue (FeelingBarId id) const
 
Position & getPosition ()
 
void setPosition (Position position)
 
double getRotation () const
 
double & getRotationRef ()
 
void setRotation (double rotation)
 
int getId () const
 
NeuronNetworkgetBrain ()
 
Position & getObjective ()
 
void setObjective (Position &objective)
 
void setObjective (double x, double y)
 

Static Public Member Functions

static bool comparePosition (const Creature *c1, const Creature *c2)
 
static bool compareHunger (const Creature *c1, const Creature *c2)
 

Constructor & Destructor Documentation

Creature::Creature ( int  id,
Map &  map,
Position  position 
)
Creature::Creature ( int  id,
Map &  map,
Position  position,
NeuronNetwork  brain 
)
Creature::Creature ( int  id,
Map &  map,
Position  position,
Position &  objective 
)
Creature::Creature ( int  id,
Map &  map,
Position  position,
NeuronNetwork  brain,
Position &  objective 
)
Creature::Creature ( Creature copy)

Member Function Documentation

void Creature::addFeelingBar ( FeelingBarId  id,
FeelingBar bar 
)

Here is the caller graph for this function:

void Creature::addInputFeature ( InputId  id,
InputFeature input 
)

Here is the caller graph for this function:

void Creature::addOutputFeature ( OutputId  id,
OutputFeature output 
)

Here is the caller graph for this function:

void Creature::clearFeatures ( )
bool Creature::compareHunger ( const Creature c1,
const Creature c2 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

bool Creature::comparePosition ( const Creature c1,
const Creature c2 
)
static

Here is the caller graph for this function:

void Creature::doActions ( )

Here is the call graph for this function:

Here is the caller graph for this function:

void Creature::eat ( )

Here is the call graph for this function:

Here is the caller graph for this function:

NeuronNetwork & Creature::getBrain ( )
double Creature::getFeelingValue ( FeelingBarId  id) const

Here is the caller graph for this function:

int Creature::getId ( ) const
Position & Creature::getObjective ( )

Here is the caller graph for this function:

Position & Creature::getPosition ( )

Here is the caller graph for this function:

double Creature::getRotation ( ) const
double & Creature::getRotationRef ( )
void Creature::move ( int  speed)

Here is the caller graph for this function:

void Creature::move ( double  forceLeft,
double  forceRight 
)

Here is the call graph for this function:

void Creature::setObjective ( Position &  objective)
void Creature::setObjective ( double  x,
double  y 
)
void Creature::setPosition ( Position  position)
void Creature::setRotation ( double  rotation)
void Creature::think ( )

Here is the call graph for this function:

void Creature::turnLeft ( )
void Creature::turnRight ( )

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