AbstractGobang is a simple and entertaining popular game.However,the popularitybetween the game and the public is not very high.In order to solve the problemthat the level of fighting between players is not high enough and the challengeof gobang still needs to be improved,I designed the game of AI gobang basedon the game tree algorithm,so that players can experience the pressure andchallenge of fighting against Al.The design of the implementation of the use of calling python languagegraphics module library to plan the size of the game program,defined as a16x16 board,and then use the range function to delimit the board.The positionclicked in each chess game determines whether the position of the drop iswithin the range of x20 and <15 to determine whether the drop is valid.Tkinterclass library is applied to realize the popover design to complete the scoreboardand scoring system.By simulating the two sides playing chess in turn on theboard,the computer side combined with the minimax pruning of the three-layergame tree algorithm,through the game tree to search for the optimal position,the computer into an intelligent opponent.Compared with the man-machinemode of general gobang game,intelligent man-machine is obviously moreplayable and challenging,and is more favored by the public.Key words:gobang;artificial intelligence;game theory;Minimax search
暂无评论内容