Skip to content

Commit

Permalink
Alpha-beta should return -3, not -1
Browse files Browse the repository at this point in the history
  • Loading branch information
tewalds committed Nov 22, 2011
1 parent 311ddd9 commit c0972d8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solverab.cpp
Expand Up @@ -112,7 +112,7 @@ int SolverAB::negamax(const Board & board, const int depth, int alpha, int beta)

int SolverAB::negamax_outcome(const Board & board, const int depth){
int abval = negamax(board, depth, -2, 2);
if( abval == 0) return -1; //unknown
if( abval == 0) return -3; //unknown
else if(abval == 2) return board.toplay(); //win
else if(abval == -2) return 3 - board.toplay(); //loss
else return 0; //draw
Expand Down

0 comments on commit c0972d8

Please sign in to comment.