# A Rook Game

DevFeed: [A Rook Game](<https://devfeed.tech/articles/a-rook-game-40365.md>)

Original publisher: [Read original article](<https://www.jeremykun.com/2014/08/31/a-rook-game/>)

Published: 2014-08-31T17:51:37Z

Content type: tutorial

Language: en

Sources: [Jeremy Kun](<https://devfeed.tech/sources/jeremy-kun.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Mathematics](<https://devfeed.tech/topics/mathematics.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [board-games](<https://devfeed.tech/tags/board-games.md>), [chessboard](<https://devfeed.tech/tags/chessboard.md>), [game](<https://devfeed.tech/tags/game.md>), [games](<https://devfeed.tech/tags/games.md>), [mathematics](<https://devfeed.tech/tags/mathematics.md>), [strategy](<https://devfeed.tech/tags/strategy.md>), [symmetry](<https://devfeed.tech/tags/symmetry.md>)

## AI overview

This article presents a rook game on an 8x8 chessboard in which players move only south or west. It shows that symmetry provides the optimal strategy: move the rook to the diagonal whenever possible and return it there after the opponent moves it away. The first player wins from an off-diagonal starting square; otherwise, the second player wins.

## Source excerpt

Problem: Two players take turns moving a rook on an 8x8 chessboard. The rook is only allowed to move south or west (but not both in a single turn), and may move any number of squares in the chosen direction on a turn. The loser is the player who first cannot move the rook. What is the optimal play for any starting position? rook-board Solution: Take advantage of the symmetry of the board.