用c#编写的五子棋人机对战 核心算法 核心算法就是计算计算机应该在哪里落子。 思路的伪代码如下。 PC_Stone For i = 1 to 15 For j = 1 to 15 If ( board[i][j] != -1) Qz[i][j] = - Esle FindQz(Qz[i][j]) getTheMaxQz() 而在这个过程中最主要的算法是计算每个点的权重,由此判断电脑应该将棋子落在哪个地方。 计算确定点的
public class ComputerBrainpower { FlagMoveRule b; FlagMoveRule c; JudgeWhichOneWiner jiangJun; public ComputerBrainpower { b new FlagMoveRule ; c new FlagMoveRule ; this jiangJun new JudgeWhichOneWiner ; } public void ComputerAuto FlagMoveRule a Jud