Games have become an important place for testing Artificial Intelligence (AI). Minimax and Alpha-Beta Pruning are two common and basic algorithms implemented in game AIs. However, there are still limitations of the searching time and searching depth. This paper strives to improve the game AI with a Heuristic Algorithm to optimize both the searching time and depth. The experiment consists of three AIs built with Minimax, Alpha-Beta Pruning, and Heuristic Algorithm to evident the improvement. These AIs are built to play a traditional Chinese zero-sum game, Gobang, which can be seen as an enhanced version of tic-tac-toe but more advanced. The data is collected when AIs compete with each other. Comparing the search time of three AIs, there is significant improvement of AI implemented Heuristic Algorithm; the median search time for Heuristic AI is only half of the Alpha-Beta Pruning AI, and only quarter of the Minimax AI. Moreover, because the search time decreases, the searching depth of the Heuristic AI can also be increased. With the larger searching depth, the Heuristic AI also gains a higher winning rate against the other two AIs.