新增 Python 五子棋人机对战(Minimax + Threat Search)#2
Open
chongpeng-tech wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Minimax+Alpha-Beta剪枝并结合威胁空间搜索以优先处理活四/冲四/活三等关键局面。Description
gomoku_dl/gomoku_game.py,在其中实现 Tkinter GUI、15×15 棋盘、点击落子、最后落子高亮、落子动画、悔棋与重新开始等玩法逻辑。Minimax+Alpha-Beta(搜索深度为4)、Threat Space Search、棋型评分表(活四 100000、冲四 10000、活三 5000、眠三 500、活二 100)与简化开局库。DeepPolicyNet(多层感知机)作为候选走子先验以改进候选排序并与博弈树混合。gomoku_dl/README.md并更新仓库根目录README.md,并通过after + threading在 UI 中实现电脑思考中…的异步行为以避免界面卡死。Testing
python -m py_compile gomoku_dl/gomoku_game.py,静态编译检查通过。get_best_move在空棋盘上返回中心点,验证返回值为(7, 7)(预期行为)。Codex Task