📄 walker.h
字号:
#ifndef WAKLER_H
#define WALKER_H
#include "Dude.h"
#include "../TOOLS/Utilities.h"
class Walker : public Dude {
#define stepFreqIndex 0
#define maxForwardIndex 1
#define maxBackIndex 2
#define fshIndex 3
#define ffoIndex 4
#define fsoIndex 5
#define fhIndex 6
#define bshIndex 7
#define bfoIndex 8
#define bsoIndex 9
#define bhIndex 10
#define dataSize 11
#define HILLCLIMBING 0
#define HILLCLIMBING2 1
public:
Walker();
~Walker();
virtual void NewReadyModel();
virtual void NewPlayingModel();
void StartTimer();
void EndTimer(bool);
void ChangeParameters(bool);
void WriteConfigFile();
void HillClimbing(bool); // Inline
void HillClimbing2(bool); // 1-alpha use of prevoious step
double GaussianDistribution(double);
double CauchyDistribution();
struct ParameterSet {
double data[dataSize];
int time;
};
private:
bool learnType;
int runCount;
int unsucCount;
Utilities utils;
VisionObject* targetBeacon;
bool targetGP;
bool inPlaying;
bool paramLearning;
bool locusFrontLearning;
bool locusBackLearning;
double multiplier;
double maxLocusChange;
int startFrame;
int endFrame;
ParameterSet currentSet;
ParameterSet lastSet;
ParameterSet bestSet;
ParameterSet change;
double **currFrontLocus;
double **currBackLocus;
double **bestFrontLocus;
double **bestBackLocus;
double alpha;
double maxAlpha;
bool decreaseAlpha;
double decreaseAlphaRate;
double beaconDistance;
int beaconCount;
double prevBeaconDistance;
double prevWalkDistance;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -