-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.h
64 lines (53 loc) · 1.87 KB
/
client.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
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
#include "list.h"
/** Implemented technics:
*
* minimax
* a-b pruning
* quiescence search
* Transposition table
* MTD(F)
* Iterative Deepening
*/
/*
*
* gain 100 points for each ant that you own
* gain points for the depth (in board ) of each ant
*
* lose 100 points for each ant that the opponent own
* lose points for the depth (in board ) of each opponent's ant
*
* pos -> score*90 because score has queens and food
*/
int evaluate_function(Position* pos);
/*
*It is an extension of the evaluation function to defer evaluation until the position is stable enough to be evaluated
* enough to be evaluated means no jump available
*
* evaluate_function works better because none of the ants is threatened!
*/
int quiescence_search(Position* pos);
/*** Main function of the agent
*
*/
Move* make_move(Position* pos);
/*
* MTD(f) derives its efficiency by only performing zero-window alpha-beta searches, with a "good" bound (variable beta)
* MTD(f) calls AlphaBeta a number of times, converging towards it and eventually finding the exact value.
* A transposition table stores and retrieves the previously searched portions of the tree in memory
* to reduce the overhead of re-exploring parts of the search tree
*
* f: First guess for best value
* d: depth to loop for
*
*
* iterative deeping will MTDF() multiple times with incrementing d
*/
int MTDF(Position* pos, int f, char d, Move* agent_move);
int iterativeDeepening(Position* pos, Move* agent_move);
//returns a list with all possible moves from a position
list* find_moves(Position *aPosition);
void follow_jump(list* moveList, Move* move, int k /* depth of recursion*/,char i, char j, Position *pos);
//similar to canJump(board.h) but for moves
int dirMoveFrom ( char row, char col, char player, Position *pos);
//alpha_beta with memory
int alpha_beta(Position *pos, char depth, int alpha, int beta, char maximizingPlayer, Move* finalMove);