With the rapid development of computer technology, artificial intelligence is emerging. Hex chess became popular because of its simple rules, but it also brought complex algorithms. Although the simple Monte Carlo tree search can be applied to the Hex game system, the search process is slow due to a large number of calculations. This paper proposes an improved Monte Carlo tree search algorithm based on the Upper Confidence Bound(UCB) formula to optimize the Hex game system and reduce the randomness of the Monte Carlo algorithm. To improve the efficiency of the search algorithm in the Hex game system, an effective system is adopted. Compared with the improved algorithm, not only the searching time of the Monte Carlo algorithm tree is improved, but also the performance of the algorithm is improved. At the same time, the system uses QT Creator to realize graphic interaction and complete the design of each module.