Grail (C++)  1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
grail::evolution::EvoParam Class Reference
Inheritance diagram for grail::evolution::EvoParam:

Public Member Functions

void Randomize (std::mt19937_64 &rand_gen)
 
const EvoParamSetNext ()
 
const EvoParamSetPrev ()
 
const EvoParamSetNextClamped ()
 
const EvoParamSetPrevClamped ()
 
float GetNormalizedPositionWeight () const
 
size_t GetPositionIndex () const
 
void SetPositionIndex (size_t position)
 
virtual std::string ToString () const
 

Protected Member Functions

 EvoParam (size_t domainLength)
 

Protected Attributes

const size_t domainLength = {0}
 
size_t positionIndex
 

Member Function Documentation

◆ GetNormalizedPositionWeight()

float grail::evolution::EvoParam::GetNormalizedPositionWeight ( ) const

Returns the normalized postion as [0.0, 1.0] floating point number.

◆ GetPositionIndex()

size_t grail::evolution::EvoParam::GetPositionIndex ( ) const

Returns the position of the parameter i.e. the index of the currently assigned element from the domain.

◆ Randomize()

void grail::evolution::EvoParam::Randomize ( std::mt19937_64 &  rand_gen)

Sets to a random possible value from a domain.

◆ SetNext()

const EvoParam * grail::evolution::EvoParam::SetNext ( )

Sets to the next possible value in the domain (wrapped, i.e. last.next -> first) and returns itself.

◆ SetNextClamped()

const EvoParam * grail::evolution::EvoParam::SetNextClamped ( )

Sets to the next possible value in the domain (clamped, i.e. last.next -> last) and returns itself.

◆ SetPositionIndex()

void grail::evolution::EvoParam::SetPositionIndex ( size_t  position)

Sets the position of the paramter i.e. the index of the currently assigned element from the domain.

◆ SetPrev()

const EvoParam * grail::evolution::EvoParam::SetPrev ( )

Sets to the previous possible value in the domain (wrapped, i.e. first.prev -> last) and returns itself.

◆ SetPrevClamped()

const EvoParam * grail::evolution::EvoParam::SetPrevClamped ( )

Sets to the previous possible value in the domain (clamped, i.e. first.prev -> first) and returns itself.

Member Data Documentation

◆ positionIndex

size_t grail::evolution::EvoParam::positionIndex
protected

EvoParam uses @positionIndex to point to an element from its domain.


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