-
Notifications
You must be signed in to change notification settings - Fork 49
/
Copy pathaction_abstraction.hpp
70 lines (53 loc) · 1.57 KB
/
action_abstraction.hpp
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
#ifndef __PURE_CFR_ACTION_ABSTRACTION_HPP__
#define __PURE_CFR_ACTION_ABSTRACTION_HPP__
/* action_abstraction.hpp
* Richard Gibson, Jun 28, 2013
*
* Home of the action_abstraction abstract class and all implementing classes
*
* Copyright (C) 2013 by Richard Gibson
*/
/* C / C++ / STL indluces */
/* project_acpc_server includes */
extern "C" {
#include "acpc_server_code/game.h"
}
/* Pure CFR includes */
#include "constants.hpp"
/* Base Class */
class ActionAbstraction {
public:
ActionAbstraction( );
virtual ~ActionAbstraction( );
virtual int get_actions( const Game *game,
const State &state,
Action actions[ MAX_ABSTRACT_ACTIONS ] ) const = 0;
protected:
};
/* The null action abstraction makes every action in the real game allowable in
* the abstract game. Standard for limit games, but not feasible for large
* nolimit games.
*/
class NullActionAbstraction : public ActionAbstraction {
public:
NullActionAbstraction( );
virtual ~NullActionAbstraction( );
virtual int get_actions( const Game *game,
const State &state,
Action actions[ MAX_ABSTRACT_ACTIONS ] ) const;
protected:
};
/* The FCPA action abstraction only allows the fold, call, pot (if legal), and
* allin actions. Not applicable in limit games, but a good starting point for
* nolimit games.
*/
class FcpaActionAbstraction : public ActionAbstraction {
public:
FcpaActionAbstraction( );
virtual ~FcpaActionAbstraction( );
virtual int get_actions( const Game *game,
const State &state,
Action actions[ MAX_ABSTRACT_ACTIONS ] ) const;
protected:
};
#endif