HOG2
Public Member Functions | Private Attributes | List of all members
WeightedUnitGroup< state, action, environment > Class Template Reference

#include <WeightedUnitGroup.h>

Inheritance diagram for WeightedUnitGroup< state, action, environment >:
Inheritance graph
[legend]
Collaboration diagram for WeightedUnitGroup< state, action, environment >:
Collaboration graph
[legend]

Public Member Functions

 WeightedUnitGroup (environment *e)
 
void SetWeight (double wght)
 
void SetProportion (double proport)
 
void SetUseWindow (bool b)
 
void SetWindowSize (double d)
 
void UseLocalWeights (bool b)
 
void SetLocalWeightRadius (double r)
 
void SetNoWeighting (bool b)
 
void SetUpdateOnQuery (double d)
 
void SetUpdateSurrounding (double d)
 
void UsePerceptron (double lr)
 
WeightedMap2DEnvironmentGetWeightedEnvironment ()
 
virtual ~WeightedUnitGroup ()
 
virtual const char * GetName ()
 
virtual bool MakeMove (Unit< state, action, environment > *u, environment *e, SimulationInfo< state, action, environment > *si, action &a)
 
void UpdateLocalWeights (Unit< state, action, environment > *u)
 
int GetUnitIndex (Unit< state, action, environment > *u)
 
virtual void UpdateLocation (Unit< state, action, environment > *u, environment *e, state &loc, bool success, SimulationInfo< state, action, environment > *si)
 
void DrawNextEnvironment ()
 
virtual void OpenGLDraw (const environment *, const SimulationInfo< state, action, environment > *) const
 
double ComputeArrowMetric (bool b, double t, bool b2, double mt)
 
- Public Member Functions inherited from UnitGroup< state, action, environment >
virtual ~UnitGroup ()
 
void AddUnit (Unit< state, action, environment > *u)
 
virtual bool Done ()
 
void RemoveUnit (Unit< state, action, environment > *u)
 
virtual void StartNewTrial (StatCollection *c)
 
virtual std::vector< Unit< state, action, environment > * > GetMembers ()
 
unsigned int GetNumMembers ()
 
Unit< state, action, environment > * GetMember (int which) const
 

Private Attributes

WeightedMap2DEnvironmentwme
 
std::vector< WeightedMap2DEnvironment * > unitWme
 
std::vector< environment * > unitEnv
 
environment * env
 
environment * myE
 
double wt
 
double prop
 
bool useWindow
 
double windowSize
 
bool localWeights
 
double localRadius
 
unsigned int currDrawEnv
 
bool noweighting
 
bool updateOnQuery
 
double queryProp
 
bool updateSurrounding
 
double surrProp
 
bool usePerceptron
 
double learningRate
 

Detailed Description

template<class state, class action, class environment>
class WeightedUnitGroup< state, action, environment >

Definition at line 11 of file WeightedUnitGroup.h.

Constructor & Destructor Documentation

◆ WeightedUnitGroup()

template<class state , class action , class environment >
WeightedUnitGroup< state, action, environment >::WeightedUnitGroup ( environment *  e)
inline

◆ ~WeightedUnitGroup()

template<class state , class action , class environment >
virtual WeightedUnitGroup< state, action, environment >::~WeightedUnitGroup ( )
inlinevirtual

Member Function Documentation

◆ ComputeArrowMetric()

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::ComputeArrowMetric ( bool  b,
double  t,
bool  b2,
double  mt 
)
inline

◆ DrawNextEnvironment()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::DrawNextEnvironment ( )
inline

◆ GetName()

template<class state , class action , class environment >
virtual const char* WeightedUnitGroup< state, action, environment >::GetName ( )
inlinevirtual

Reimplemented from UnitGroup< state, action, environment >.

Definition at line 36 of file WeightedUnitGroup.h.

◆ GetUnitIndex()

template<class state , class action , class environment >
int WeightedUnitGroup< state, action, environment >::GetUnitIndex ( Unit< state, action, environment > *  u)
inline

◆ GetWeightedEnvironment()

template<class state , class action , class environment >
WeightedMap2DEnvironment* WeightedUnitGroup< state, action, environment >::GetWeightedEnvironment ( )
inline

◆ MakeMove()

template<class state , class action , class environment >
virtual bool WeightedUnitGroup< state, action, environment >::MakeMove ( Unit< state, action, environment > *  u,
environment *  e,
SimulationInfo< state, action, environment > *  si,
action &  a 
)
inlinevirtual

Reimplemented from UnitGroup< state, action, environment >.

Definition at line 38 of file WeightedUnitGroup.h.

References WeightedUnitGroup< state, action, environment >::currDrawEnv, WeightedUnitGroup< state, action, environment >::env, Unit< state, action, environment >::GetLocation(), UnitGroup< state, action, environment >::GetMembers(), WeightedUnitGroup< state, action, environment >::GetUnitIndex(), WeightedUnitGroup< state, action, environment >::learningRate, WeightedUnitGroup< state, action, environment >::localWeights, Unit< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::myE, WeightedUnitGroup< state, action, environment >::noweighting, WeightedUnitGroup< state, action, environment >::prop, WeightedUnitGroup< state, action, environment >::queryProp, WeightedMap2DEnvironment::SetNoWeighting(), WeightedMap2DEnvironment::SetProportionOld(), WeightedMap2DEnvironment::SetQueryProportionOld(), WeightedMap2DEnvironment::SetSurroundingProportion(), WeightedMap2DEnvironment::SetUpdateOnQuery(), WeightedMap2DEnvironment::SetUpdateSurrounding(), WeightedMap2DEnvironment::SetWeight(), WeightedMap2DEnvironment::SetWindowCenter(), WeightedMap2DEnvironment::SetWindowSize(), WeightedUnitGroup< state, action, environment >::surrProp, WeightedUnitGroup< state, action, environment >::unitEnv, WeightedUnitGroup< state, action, environment >::unitWme, WeightedUnitGroup< state, action, environment >::UpdateLocalWeights(), WeightedUnitGroup< state, action, environment >::updateOnQuery, WeightedUnitGroup< state, action, environment >::updateSurrounding, WeightedMap2DEnvironment::UsePerceptron(), WeightedUnitGroup< state, action, environment >::usePerceptron, WeightedMap2DEnvironment::UseWindow(), WeightedUnitGroup< state, action, environment >::useWindow, WeightedUnitGroup< state, action, environment >::windowSize, WeightedUnitGroup< state, action, environment >::wme, and WeightedUnitGroup< state, action, environment >::wt.

◆ OpenGLDraw()

template<class state , class action , class environment >
virtual void WeightedUnitGroup< state, action, environment >::OpenGLDraw ( const environment *  ,
const SimulationInfo< state, action, environment > *   
) const
inlinevirtual

◆ SetLocalWeightRadius()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetLocalWeightRadius ( double  r)
inline

◆ SetNoWeighting()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetNoWeighting ( bool  b)
inline

◆ SetProportion()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetProportion ( double  proport)
inline

◆ SetUpdateOnQuery()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetUpdateOnQuery ( double  d)
inline

◆ SetUpdateSurrounding()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetUpdateSurrounding ( double  d)
inline

◆ SetUseWindow()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetUseWindow ( bool  b)
inline

◆ SetWeight()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetWeight ( double  wght)
inline

◆ SetWindowSize()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::SetWindowSize ( double  d)
inline

◆ UpdateLocalWeights()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::UpdateLocalWeights ( Unit< state, action, environment > *  u)
inline

◆ UpdateLocation()

template<class state , class action , class environment >
virtual void WeightedUnitGroup< state, action, environment >::UpdateLocation ( Unit< state, action, environment > *  u,
environment *  e,
state &  loc,
bool  success,
SimulationInfo< state, action, environment > *  si 
)
inlinevirtual

Reimplemented from UnitGroup< state, action, environment >.

Definition at line 181 of file WeightedUnitGroup.h.

References WeightedUnitGroup< state, action, environment >::currDrawEnv, WeightedUnitGroup< state, action, environment >::env, Unit< state, action, environment >::GetLocation(), UnitGroup< state, action, environment >::GetMembers(), SimulationInfo< state, action, environment >::GetSimulationTime(), WeightedUnitGroup< state, action, environment >::learningRate, WeightedUnitGroup< state, action, environment >::localWeights, WeightedUnitGroup< state, action, environment >::myE, WeightedUnitGroup< state, action, environment >::noweighting, WeightedUnitGroup< state, action, environment >::prop, WeightedUnitGroup< state, action, environment >::queryProp, WeightedMap2DEnvironment::SetNoWeighting(), WeightedMap2DEnvironment::SetProportionOld(), WeightedMap2DEnvironment::SetQueryProportionOld(), WeightedMap2DEnvironment::SetSurroundingProportion(), WeightedMap2DEnvironment::SetUpdateOnQuery(), WeightedMap2DEnvironment::SetUpdateSurrounding(), WeightedMap2DEnvironment::SetWeight(), WeightedMap2DEnvironment::SetWindowSize(), WeightedUnitGroup< state, action, environment >::surrProp, WeightedUnitGroup< state, action, environment >::unitEnv, WeightedUnitGroup< state, action, environment >::unitWme, WeightedMap2DEnvironment::UpdateAngle(), Unit< state, action, environment >::UpdateLocation(), WeightedUnitGroup< state, action, environment >::updateOnQuery, WeightedUnitGroup< state, action, environment >::updateSurrounding, WeightedMap2DEnvironment::UsePerceptron(), WeightedUnitGroup< state, action, environment >::usePerceptron, WeightedMap2DEnvironment::UseWindow(), WeightedUnitGroup< state, action, environment >::useWindow, WeightedUnitGroup< state, action, environment >::windowSize, WeightedUnitGroup< state, action, environment >::wme, and WeightedUnitGroup< state, action, environment >::wt.

◆ UseLocalWeights()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::UseLocalWeights ( bool  b)
inline

◆ UsePerceptron()

template<class state , class action , class environment >
void WeightedUnitGroup< state, action, environment >::UsePerceptron ( double  lr)
inline

Member Data Documentation

◆ currDrawEnv

template<class state , class action , class environment >
unsigned int WeightedUnitGroup< state, action, environment >::currDrawEnv
private

◆ env

template<class state , class action , class environment >
environment* WeightedUnitGroup< state, action, environment >::env
private

◆ learningRate

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::learningRate
private

◆ localRadius

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::localRadius
private

◆ localWeights

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::localWeights
private

◆ myE

template<class state , class action , class environment >
environment* WeightedUnitGroup< state, action, environment >::myE
private

◆ noweighting

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::noweighting
private

◆ prop

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::prop
private

◆ queryProp

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::queryProp
private

◆ surrProp

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::surrProp
private

◆ unitEnv

template<class state , class action , class environment >
std::vector<environment*> WeightedUnitGroup< state, action, environment >::unitEnv
private

◆ unitWme

template<class state , class action , class environment >
std::vector<WeightedMap2DEnvironment*> WeightedUnitGroup< state, action, environment >::unitWme
private

◆ updateOnQuery

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::updateOnQuery
private

◆ updateSurrounding

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::updateSurrounding
private

◆ usePerceptron

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::usePerceptron
private

◆ useWindow

template<class state , class action , class environment >
bool WeightedUnitGroup< state, action, environment >::useWindow
private

◆ windowSize

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::windowSize
private

◆ wme

template<class state , class action , class environment >
WeightedMap2DEnvironment* WeightedUnitGroup< state, action, environment >::wme
private

◆ wt

template<class state , class action , class environment >
double WeightedUnitGroup< state, action, environment >::wt
private

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