摘 要
人工智能是近年來很活躍的研究領域之一,計算機博弈是人工智能研究的一個重要分支,它的研究為人工智能帶來了很多重要的方法和理論,產生了廣泛的社會影響和學術影響。五子棋本身就是一款益智休閑游戲,規則簡單。五子棋不僅能增強思維能力,提高智力,而且富含哲理,有助于修身養性。
本系統就以五子棋游戲作為研究課題,對五子棋的算法與規則做了研究,闡述了如何在 Microsoft Visual C++ 下用 API 函數來開發Windows下的游戲并給出了具體的實現。本系統以五子棋為例實現的主要功能有棋盤、棋子的輸出、人機對下等。本系統還有和棋、再來一盤、幫助等輔助功能。
關鍵字:五子棋;Microsoft Visual C++; API函數
The Design and Exploitation of Gobang Game with VC
Abstract
Artificial intelligence is one of the brisk research areas. The chess game on computer is an important branch of the research on artificial intelligence. The researches on chess game bring plenty of important methods and theories for researching on artificial intelligence, and cause broad influences on society and academe. Gobang chess game means five pieces on one line, is a sort of game, which is full of wisdom, leisure and benefits, and the rules of it are very simple.
This paper focuses on the study of this chess game, and uses the Microsoft Visual C++ to explore the Window’s game. This system mainly uses the function of Visual C++/API to realize the export of chessboard and checker, and people can play with computer. Moreover, this system has the assistant functions such as “Deuce”、“ Play Again”、“ Help” and so on.
Key words: Gobang; Microsoft Visual C++; API Function