diff --git a/uttt.c b/uttt.c index f8d9bdd..15b64b3 100644 --- a/uttt.c +++ b/uttt.c @@ -892,7 +892,7 @@ int ut_alphabetaq(const struct ut_state *state, struct ut_move move, int depth, } return q; } -#define UT_DEPTH 5 +#define UT_DEPTH 6 struct ut_move ut_minimax(const struct ut_state *state) { struct ut_move best_move = {-1, -1}; @@ -901,7 +901,7 @@ struct ut_move ut_minimax(const struct ut_state *state) for(int c = 0; c < 9; c++) { struct ut_move move = (struct ut_move){r, c}; - int q = ut_alphabetaq(state, move, UT_DEPTH, UT_VALUEMIN - 1, UT_VALUEMAX + 1); + int q = ut_alphabetaq(state, move, UT_DEPTH - 1, UT_VALUEMIN - 1, UT_VALUEMAX + 1); if((state->player == 'X') ? q > best_q : q < best_q) { best_q = q;