-
Notifications
You must be signed in to change notification settings - Fork 51
/
optimizationbehaviors.h
59 lines (40 loc) · 1.4 KB
/
optimizationbehaviors.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef _OPTIMIZATION_BEHAVIORS_H
#define _OPTIMIZATION_BEHAVIORS_H
#include "../behaviors/naobehavior.h"
bool isBallMoving(const WorldModel *worldModel);
class OptimizationBehaviorFixedKick: public NaoBehavior {
const string outputFile;
double timeStart;
bool hasKicked;
bool beamChecked;
bool backwards;
bool ranIntoBall;
bool fallen;
int kick;
double INIT_WAIT_TIME;
VecPosition ballInitPos;
void initKick();
void writeFitnessToOutputFile(double fitness);
public:
OptimizationBehaviorFixedKick(const std::string teamName, int uNum, const map<
string, string>& namedParams_, const string& rsg_, const string& outputFile_);
virtual void beam(double& beamX, double& beamY, double& beamAngle);
virtual SkillType selectSkill();
virtual void updateFitness();
};
class OptimizationBehaviorWalkForward : public NaoBehavior {
const string outputFile;
int run;
double startTime;
bool beamChecked;
double INIT_WAIT;
double totalWalkDist;
void init();
bool checkBeam();
public:
OptimizationBehaviorWalkForward(const std::string teamName, int uNum, const map<string, string>& namedParams_, const string& rsg_, const string& outputFile_);
virtual void beam( double& beamX, double& beamY, double& beamAngle );
virtual SkillType selectSkill();
virtual void updateFitness();
};
#endif