forked from SharifAIChallenge/AIC17-Client-Cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConstants.h
171 lines (145 loc) · 3.45 KB
/
Constants.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <string>
#include "jsoncpp-src-0.5.0/include/json/json.h"
class Constants {
public:
static const std::string MESSAGE_KEY_TYPE;
static const std::string MESSAGE_KEY_NAME;
static const std::string MESSAGE_KEY_ARGS;
static const std::string MESSAGE_KEY_TURN;
static const std::string MESSAGE_KEY_INIT;
static const std::string MESSAGE_KEY_TOKEN;
static const std::string MESSAGE_KEY_EVENT;
static const std::string MESSAGE_KEY_SHUTDOWN;
static const std::string MESSAGE_KEY_WRONG_TOKEN;
static const std::string TYPE_CHANGE_STRATEGY;
static const std::string TYPE_DETERMINISTIC_MOVE;
static const std::string TYPE_ANTENNA_CHANGE;
static const int ARGS_NUMBER_CHANGE_STRATEGY;
static const int ARGS_NUMBER_DETERMINISTIC_MOVE;
static const int ARGS_NUMBER_ANTENNA_CHANGE;
double foodProb;
double trashProb;
double slipperProb;
int typeChangeCost;
int sickCost;
int updateCost;
int detMoveCost;
int killWingedScore;
int killBothWingedScore;
int killBeetleScore;
int wingedCollisionScore;
int beetleFoodScore;
int wingedBeetleFoodScore;
int sickLifeTime;
double powerRatio;
double endRatio;
int disobeyConstant;
int foodValidTime;
int trashValidTime;
int slipperValidTime;
void setConstants(Json::Value &msg);
/**
* Probability of a food showing up in any of the tiles without content(Roach or Food)
*
* @return Food probability
*/
double getFoodProb() const;
/**
* Probability of a trash showing up in any of the tiles without content(Roach or Food)
*
* @return Trash probability
*/
double getTrashProb() const;
/**
* Probability of a net showing up in any of the tiles without a net
*
* @return Net probability
*/
double getSlipperProb() const;
/**
* Cost of changing the antenna of a roach
*
* @return Antenna cost
*/
int getTypeChangeCost() const;
/**
* Sick roachs give points to the opposing team of all their 8 neighbours
*
* @return Given points for each neighbour
*/
int getSickCost() const;
/**
*
* @return Cost of changing strategy
*/
int getUpdateCost() const;
/**
*
* @return Cost of a deterministic move
*/
int getDetMoveCost() const;
/**
*
* @return Points achieved when a normal roach kills a queen
*/
int getKillWingedScore() const;
/**
*
* @return Points achieved when two queens kill each other
*/
int getKillBothWingedScore() const;
/**
*
* @return Points achieved from killing a normal roach
*/
int getKillBeetleScore() const;
/**
*
* @return Points achieved when a normal roach consumes food
*/
int getBeetleFoodScore() const;
/**
*
* @return Points achieved when a queen roach consumes food
*/
int getWingedBeetleFoodScore() const;
/**
*
* @return Beetle's lifespan since getting sick
*/
int getSickLifeTime() const;
/**
*
* @return Amount of power that a roach achieves each turn
*/
double getPowerRatio() const;
/**
* If the map is "end ratio" percent full, the game ends
*
* @return End ratio
*/
double getEndRatio() const;
/**
*
* @return Minimum roach population required for a roach to disobey
*/
int getDisobeyConstant() const;
/**
*
* @return Amount of turns a food stays on the map
*/
int getFoodValidTime() const;
/**
*
* @return Amount of turns a trash stays on the map
*/
int getTrashValidTime() const;
/**
*
* @return Amount of turns a slipper stays on the map
*/
int getSlipperValidTime() const;
};
#endif /* CONSTANTS_H */