在Java实施的跳棋演奏代理。该代理使用α-beta修剪的最小算法。
英国选秀或美国跳棋是在8x8棋盘上玩过的2个受欢迎的2个玩家游戏。当计算机游戏和AI创建了一个自学习的Checkers计划时,AI在通过Checkers玩游戏中最早的游戏中取得了最早的成功。该项目的动机是游戏的历史和AI的历史。
按下叉按钮(在页面的右上角),以将该项目的副本保存在您的帐户中。
从“下载”部分下载存储库文件(项目)或通过在bash中输入以下命令来克隆此项目:
git clone https://github.com/sramakrishnan247/Checkers-AI
使用IntellijIDE(或任何其他IDE或您喜欢的文本编辑器)导入项目
从game.java:D运行应用程序
提示将以这种格式列出所有可用的移动,以便用户只需要选择所需的移动即可。
遵循以下标准检查器符号:
Welcome!
Pick the difficulty!
1.Rookie
2.Intermediate
3.Pro
4.Grandmaster
Pick the difficulty(1-4)!
2
Player color: 2
AI color: 1
Player King: 4
AI King: 3
Light(Player) Pieces: 12,Dark(AI) Pieces: 12
Current Board
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
2 0 2 0 2 0 2 0
0 2 0 2 0 2 0 2
2 0 2 0 2 0 2 0
Available Moves:
1: 21-17
2: 22-17
3: 22-18
4: 23-18
5: 23-19
6: 24-19
7: 24-20
Please choose move number:
2
Player Played last...
Light(Player) Pieces: 12,Dark(AI) Pieces: 12
AI thinking...
Heuristic val(AI is winning if +ve): 0.0
Source: 2,1, Dest: 3,2 Jump: false
Skipped squares:
Move notation: 9-14
AI PLAYED LAST...
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
0 0 0 1 0 1 0 1
0 0 1 0 0 0 0 0
0 2 0 0 0 0 0 0
2 0 0 0 2 0 2 0
0 2 0 2 0 2 0 2
2 0 2 0 2 0 2 0
Available Moves:
1: 17-13
2: 23-18
3: 23-19
4: 24-19
5: 24-20
6: 25-22
7: 26-22
Please choose move number:
...
Player Played last...
Light(Player) Pieces: 1,Dark(AI) Pieces: 8
AI thinking...
Heuristic val(AI is winning if +ve): 9.0
Source: 5,6, Dest: 7,4 Jump: true
Skipped squares: (6,5),
Move notation: 24x31
AI PLAYED LAST...
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0
0 0 0 1 0 1 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 3 0 3 0 0 0
Light(Player) Pieces: 0,Dark(AI) Pieces: 8
Final Board Status
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 0
0 0 0 1 0 1 0 1
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 3 0 3 0 0 0
1
AI WINS!