Relative Content

Tag Archive for trn

How to make the computer try to attack or defend in gomoku game using python?

I’m writing a program that simulates a player-versus-computer python game. The program has been running stably. However, when checking, the machine plays very randomly, with no attack or defense at all. If I research, I will use the minmax algorithm to process. But I don’t know how to do it. Can anyone help me? My python code is: