我使用的是最小最大算法的遊戲,因爲有很多的可能性極小極大遞歸花費的時間太長,即使有「α-β剪枝」 更好的辦法 我的代碼看起來有些東西是這樣的: min(state,depth,alpha,beta):
if stopingCond:
return value
for moves in allmoves:
state.do(move)
bet
public class OthelloJPlayer extends OthelloPlayer {
@Override
public OthelloMove getMove(OthelloState state) {
int bestchoice = 0;
int bestscore = Integer.MIN_VALUE;
boolean m