Merge remote-tracking branch 'refs/remotes/origin/ai' into ai

このコミットが含まれているのは:
ninya9k 2023-11-16 06:26:05 +00:00
コミット debfe59b18
1個のファイルの変更2行の追加2行の削除

4
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;