-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexpectimaxAgent.h
More file actions
37 lines (32 loc) · 806 Bytes
/
Copy pathexpectimaxAgent.h
File metadata and controls
37 lines (32 loc) · 806 Bytes
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
/*
* Project name: Food collection
* Version 4
* Student : Albert Eduard Merino Pulido
*/
#ifndef expectimaxAgent_h
#define expectimaxAgent_h
#include "strategy.h"
using namespace std;
class ExpectimaxAgent : public Strategy {
public:
static const int c1;
static const int c2;
// Constructors
ExpectimaxAgent();
ExpectimaxAgent(Map *, CellType, int = 4);
// Methods
Direction getAction();
private:
float maxValue(Map, CellType, int);
float minValue(Map, CellType, int);
Direction expectimaxDecision();
Map result(Map, CellType, Direction);
bool terminalTest(Map, int);
float utility(Map);
float evaluationFunction(Map);
int depth;
int best;
bool alarm;
vector<Direction> bestDirections;
};
#endif // ifndef expectimaxAgent_h