1

我正在設計一款國際象棋遊戲,並在其後面的AI上實現一個帶有alpha-beta修剪的搜索樹。我在設計遊戲的評估功能時遇到困難。Alpha beta修剪評估函數的設計

對於任何類型的遊戲,如何設計評估函數?

+0

氣味像功課。通常最好把這個包括在你的問題中,免得人們對你不滿。另外,你必須證明你至少已經付出了一些努力;) – mpen

回答

3

構建評估函數的一個流行策略是作爲被認爲影響位置價值的各種因素的加權總和。例如,對於象棋的評價函數可能採取的形式,其中

c1 * material + c2 * mobility + c3 * king safety + c4 * center control + ... 

f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ... 

K, Q, R, B, N, P are the number of white kings, queens, rooks, bishops, knights and pawns on the board. 
D, S, I are doubled, backward and isolated white pawns. 
M represents white mobility (measured, say, as the number of legal moves available to White). 

source