-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAII.java
More file actions
30 lines (27 loc) · 1.09 KB
/
AII.java
File metadata and controls
30 lines (27 loc) · 1.09 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
public interface AII {
/**
* Returns the best move given the current board, employing
* negamax. Negamax should select the move that maximizes
* the negation of the value of the position from the
* opponents point of view after the move has been played.
* This is equivalent to minimizing the opponent's evaluation
* of the move being played.
* @param node - game node
* @param depth - depth to search
* @return
*/
public abstract int findMove(ConnectFourI node, int depth);
/**
* Returns the score of the best move given the current board.
* Negamax should select the move that maximizes
* the negation of the value of the position from the
* opponents point of view after the move has been played.
* This is equivalent to minimizing the opponent's evaluation
* of the move being played. If the depth is zero, then
* the evaluation function is simply called.
* @param node - game node
* @param depth - depth to search
* @return
*/
public abstract int negamax(ConnectFourI node, int depth);
}