Abstract
We can use java language to design the game of chess on eclipse platform and design a new rule for it : “Six in a Row”, this game is more complex than Five-in-a-Row,and we can add a function of Man-Machine Battle in the program.This paper which based on the practical programming experience introduce the algorithm of the above game. The basic mentality of the algorithm is creating a scoring table and all points of the chessboard are scored by using ergodic method.Finally, the machine will placing the chess in the point which have the highest score.This algorithm is clearly operable, and the machine has a high rate of winning when play with human.