forked from Fossana/cplusplus-cfr-poker-solver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTrainer.h
More file actions
32 lines (27 loc) · 771 Bytes
/
Trainer.h
File metadata and controls
32 lines (27 loc) · 771 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
#ifndef TRAINER_H
#define TRAINER_H
#include "Node.h"
#include "RangeManager.h"
#include "ChanceNode.h"
#include "TerminalNode.h"
#include "BestResponse.h"
#include <memory>
#include <array>
#include <vector>
using std::vector;
using std::unique_ptr;
using std::shared_ptr;
class Trainer
{
private:
unique_ptr<BestResponse> br;
shared_ptr<RangeManager> rangeManager;
int initialPot;
int inPositionPlayer;
uint8_t initialBoard[5];
vector<float> cfr(int hero, int villain, Node *root, int iterationCount);
public:
Trainer(shared_ptr<RangeManager> rangeManager, uint8_t initialBoard[5], int initialPot, int inPositionPlayer);
void train(Node* root, int numIterations);
};
#endif