-
Notifications
You must be signed in to change notification settings - Fork 0
/
MinimaxAgent.h
38 lines (32 loc) · 1.04 KB
/
MinimaxAgent.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
/* =============================================================================
# FileName: MinimaxAgent.h
# Desc: MinimaxAgent using Minimax
# Author: YanlongLi
# Email: [email protected]
# HomePage: http://www.yanlongli.me
# Created: 2017-10-14 01:01:58
# Version: 0.0.1
# LastChange: 2017-10-14 01:01:58
# History:
# 0.0.1 | YanlongLi | init
============================================================================= */
#ifndef MYAGENT_H
#define MYAGENT_H
#include "Agent.h"
#include "Evaluator.h"
#include <map>
class MinimaxAgent : public Agent {
long long MAX_DEPTH;
bool alphaBetaPrune;
Evaluator* evaluator;
long long depth;
double alpha, beta;
protected:
double maxValue(const Board& board);
double minValue(const Board& board);
public:
MinimaxAgent(long long maxdepth, bool alphaBetaPrune, Evaluator* _evaluator);
virtual Board nextByMaxer(const Board& board);
virtual Board nextByMiner(const Board& board);
};
#endif /* ifndef MYAGENT_H */