-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.h
More file actions
35 lines (32 loc) · 1.07 KB
/
functions.h
File metadata and controls
35 lines (32 loc) · 1.07 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
#ifndef FUNC
#define FUNC
#include "node.h"
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <algorithm>
#include <climits>
struct param{
int depth;
int branch_factor;
node* root;
bool para;
param(int depth, int branch_factor, node* root, bool para):depth(depth), branch_factor(branch_factor), root(root), para(para){}
};
struct alphabeta{
node* temp;
int* result;
int branch_factor;
int num_of_thread;
int idx;
alphabeta(node* temp, int* result, int branch_factor, int num_of_thread, int idx):temp(temp), result(result), branch_factor(branch_factor), num_of_thread(num_of_thread), idx(idx){}
};
node* generateSearchTree(int depth, int branch_factor, node* root);
int AlphaBeta(node* currentNode, int alpha, int beta, bool maximisingPlayer);
//int MinMax(node* currentNode, bool maximisingPlayer);
int MinMax(node*, int, int);
int MinMax(node*);
void* paragenerateSearchTree(void*);
int newparaAlphaBeta(node* currentNode, int branch_factor, int num_of_thread, int* result, pthread_t* thr, alphabeta** t);
#endif