Othello Master Mind

黑白棋智慧大师 - 人机对战游戏

Battle an Othello AI that thinks faster than you—no excuses when you lose!

对战一个比你还会算计的黑白棋AI,输了别怪它太聪明!

2
2
Your turn你的回合
1

Game Rules

游戏规则

Othello (also known as Reversi) is a strategic board game played on an 8×8 board with 64 disks that are dark on one side and light on the other.

  • Starting Position: The game begins with 4 disks placed in the center, with 2 dark and 2 light disks arranged diagonally.
  • Gameplay: Players take turns placing disks on the board with their assigned color facing up.
  • Valid Moves: A move is valid only if it "brackets" at least one opponent's disk between the newly placed disk and another disk of the player's color.
  • Flipping: When a player makes a valid move, all opponent disks that are bracketed are flipped to the player's color.
  • No Valid Moves: If a player has no valid moves, their turn is skipped.
  • Game End: The game ends when neither player can make a valid move or the board is full.
  • Winner: The player with the most disks of their color on the board wins.

黑白棋(又称翻转棋)是一种策略性棋盘游戏,在8×8的棋盘上进行,使用64个黑白双面的棋子。

  • 起始位置:游戏开始时,棋盘中央放置4个棋子,2个黑色和2个白色呈对角线排列。
  • 游戏流程:玩家轮流在棋盘上放置棋子,棋子的指定颜色朝上。
  • 有效落子:落子必须能够在新放置的棋子和玩家已有的同色棋子之间"夹住"至少一个对手的棋子。
  • 翻转棋子:当玩家进行有效落子时,所有被"夹住"的对手棋子都会被翻转为玩家的颜色。
  • 无有效落子:如果玩家没有有效的落子位置,将跳过其回合。
  • 游戏结束:当双方都无法进行有效落子或棋盘已满时,游戏结束。
  • 胜利条件:棋盘上拥有最多己方颜色棋子的玩家获胜。

About This AI

关于此AI

This Othello/Reversi AI player was developed by Xuanyi Lyu as a project for CSC384 - Introduction to AI at the University of Toronto. The AI uses the Alpha-Beta pruning algorithm with state caching and node ordering optimizations to efficiently search the game tree.

Advanced Heuristic Evaluation

The custom heuristic evaluates board positions using multiple weighted factors that change according to the game phase:

  • Corner Control - Corners are extremely valuable as they can never be flipped
  • Edge Stability - Edge pieces are more stable than center pieces
  • Mobility - Having more possible moves provides strategic flexibility
  • Piece Difference - Raw count becomes more important in the endgame
  • Corner Adjacency - Avoiding dangerous positions near corners unless already controlled

The AI dynamically adjusts its evaluation weights based on the game phase, prioritizing mobility and positional play early, and transitioning to maximizing piece count in the endgame.

这个黑白棋AI由Xuanyi Lyu开发,作为多伦多大学CSC384人工智能导论课程的项目。该AI使用Alpha-Beta剪枝算法,结合状态缓存和节点排序优化,高效地搜索游戏树。

高级启发式评估

自定义启发式算法根据游戏阶段使用多种加权因素评估棋盘局势:

  • 角落控制 - 角落极其珍贵,因为它们永远不会被翻转
  • 边缘稳定性 - 边缘棋子比中心棋子更稳定
  • 行动力 - 拥有更多可能的走法提供战略灵活性
  • 棋子差异 - 在残局阶段,原始棋子数量变得更加重要
  • 角落相邻位置 - 避免在角落附近的危险位置,除非已经控制了角落

AI根据游戏阶段动态调整评估权重,在早期优先考虑行动力和位置战略,在残局过渡到最大化棋子数量。

AI is thinking...

AI正在思考...