forked from Fossana/cplusplus-cfr-poker-solver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBestResponseTask.h
More file actions
41 lines (34 loc) · 1.41 KB
/
BestResponseTask.h
File metadata and controls
41 lines (34 loc) · 1.41 KB
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
#pragma once
#ifndef BEST_RESPONSE_TASK_H
#define BEST_RESPONSE_TASK_H
#include <memory>
#include "RangeManager.h"
#include "Node.h"
#include "ActionNode.h"
#include "ChanceNode.h"
#include "TerminalNode.h"
#include "tbb/task.h"
#include <stdint.h>
using std::unique_ptr;
using std::shared_ptr;
using tbb::task;
class BestResponseTask : public task
{
private:
shared_ptr<RangeManager> rangeManager;
vector<float> chance_node_best_response(ChanceNode* node, int hero, int villain, vector<float>& villainReachProbs, uint8_t board[5]);
vector<float> terminal_node_best_response(TerminalNode* node, int hero, int villain, vector<float>& villainReachProbs, uint8_t board[5]);
vector<float> showdown_best_response(TerminalNode* node, int hero, int villain, vector<float>& villainReachProbs, uint8_t board[5]);
vector<float> allin_best_response(TerminalNode* node, int hero, int villain, vector<float>& villainReachProbs, uint8_t board[5]);
vector<float> uncontested_best_response(TerminalNode* node, int hero, int villain, vector<float>& villainReachProbs, uint8_t board[5]);
public:
Node* node;
int hero;
int villain;
vector<float>* villainReachProbs;
uint8_t board[5];
vector<float>* result;
task* execute();
BestResponseTask(shared_ptr<RangeManager> rangeManager, vector<float>* result, Node* node, int hero, int villain, vector<float>* villainReachProbs, uint8_t board[5]);
};
#endif