HOG2
|
#include <WeightedUnitGroup.h>
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) |
WeightedMap2DEnvironment * | GetWeightedEnvironment () |
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 | |
WeightedMap2DEnvironment * | wme |
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 |
Definition at line 11 of file WeightedUnitGroup.h.
|
inline |
Definition at line 14 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::currDrawEnv, WeightedUnitGroup< state, action, environment >::learningRate, WeightedUnitGroup< state, action, environment >::localWeights, WeightedUnitGroup< state, action, environment >::noweighting, WeightedUnitGroup< state, action, environment >::prop, WeightedUnitGroup< state, action, environment >::updateOnQuery, WeightedUnitGroup< state, action, environment >::updateSurrounding, WeightedUnitGroup< state, action, environment >::usePerceptron, WeightedUnitGroup< state, action, environment >::useWindow, WeightedUnitGroup< state, action, environment >::windowSize, WeightedUnitGroup< state, action, environment >::wme, and WeightedUnitGroup< state, action, environment >::wt.
|
inlinevirtual |
Definition at line 29 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::unitWme, and WeightedUnitGroup< state, action, environment >::wme.
|
inline |
Definition at line 276 of file WeightedUnitGroup.h.
References WeightedMap2DEnvironment::ComputeArrowMetric(), and WeightedUnitGroup< state, action, environment >::wme.
|
inline |
Definition at line 258 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::currDrawEnv, UnitGroup< state, action, environment >::GetMembers(), and WeightedUnitGroup< state, action, environment >::unitWme.
|
inlinevirtual |
Reimplemented from UnitGroup< state, action, environment >.
Definition at line 36 of file WeightedUnitGroup.h.
|
inline |
Definition at line 171 of file WeightedUnitGroup.h.
References UnitGroup< state, action, environment >::GetMembers().
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), and WeightedUnitGroup< state, action, environment >::UpdateLocalWeights().
|
inline |
Definition at line 28 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::wme.
|
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.
|
inlinevirtual |
Reimplemented from UnitGroup< state, action, environment >.
Definition at line 265 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::currDrawEnv, WeightedMap2DEnvironment::OpenGLDraw(), WeightedUnitGroup< state, action, environment >::unitWme, and WeightedUnitGroup< state, action, environment >::wme.
|
inline |
Definition at line 22 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::localRadius.
|
inline |
Definition at line 23 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::noweighting.
|
inline |
Definition at line 18 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::prop.
|
inline |
Definition at line 24 of file WeightedUnitGroup.h.
References d, WeightedUnitGroup< state, action, environment >::queryProp, and WeightedUnitGroup< state, action, environment >::updateOnQuery.
|
inline |
Definition at line 25 of file WeightedUnitGroup.h.
References d, WeightedUnitGroup< state, action, environment >::surrProp, and WeightedUnitGroup< state, action, environment >::updateSurrounding.
|
inline |
Definition at line 19 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::useWindow.
|
inline |
Definition at line 17 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::wt.
|
inline |
Definition at line 20 of file WeightedUnitGroup.h.
References d, and WeightedUnitGroup< state, action, environment >::windowSize.
|
inline |
Definition at line 139 of file WeightedUnitGroup.h.
References WeightedMap2DEnvironment::GetAngle(), Unit< state, action, environment >::GetLocation(), WeightedUnitGroup< state, action, environment >::GetUnitIndex(), WeightedUnitGroup< state, action, environment >::localRadius, WeightedMap2DEnvironment::SetAngle(), WeightedUnitGroup< state, action, environment >::unitWme, WeightedUnitGroup< state, action, environment >::wme, xyLoc::x, and xyLoc::y.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove().
|
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.
|
inline |
Definition at line 21 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::localWeights.
|
inline |
Definition at line 26 of file WeightedUnitGroup.h.
References WeightedUnitGroup< state, action, environment >::learningRate, and WeightedUnitGroup< state, action, environment >::usePerceptron.
|
private |
Definition at line 296 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::DrawNextEnvironment(), WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::OpenGLDraw(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 288 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), and WeightedUnitGroup< state, action, environment >::UpdateLocation().
|
private |
Definition at line 303 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), WeightedUnitGroup< state, action, environment >::UsePerceptron(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 295 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::SetLocalWeightRadius(), and WeightedUnitGroup< state, action, environment >::UpdateLocalWeights().
|
private |
Definition at line 294 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), WeightedUnitGroup< state, action, environment >::UseLocalWeights(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 289 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), and WeightedUnitGroup< state, action, environment >::UpdateLocation().
|
private |
Definition at line 297 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetNoWeighting(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 291 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetProportion(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
|
private |
|
private |
Definition at line 287 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), and WeightedUnitGroup< state, action, environment >::UpdateLocation().
|
private |
Definition at line 286 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::DrawNextEnvironment(), WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::OpenGLDraw(), WeightedUnitGroup< state, action, environment >::UpdateLocalWeights(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::~WeightedUnitGroup().
|
private |
Definition at line 298 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetUpdateOnQuery(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 300 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetUpdateSurrounding(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 302 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), WeightedUnitGroup< state, action, environment >::UsePerceptron(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 292 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetUseWindow(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 293 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetWindowSize(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().
|
private |
Definition at line 285 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::ComputeArrowMetric(), WeightedUnitGroup< state, action, environment >::GetWeightedEnvironment(), WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::OpenGLDraw(), WeightedUnitGroup< state, action, environment >::UpdateLocalWeights(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), WeightedUnitGroup< state, action, environment >::WeightedUnitGroup(), and WeightedUnitGroup< state, action, environment >::~WeightedUnitGroup().
|
private |
Definition at line 290 of file WeightedUnitGroup.h.
Referenced by WeightedUnitGroup< state, action, environment >::MakeMove(), WeightedUnitGroup< state, action, environment >::SetWeight(), WeightedUnitGroup< state, action, environment >::UpdateLocation(), and WeightedUnitGroup< state, action, environment >::WeightedUnitGroup().