# Chess Manual

glChess is a game for playing the classic board game of chess, in which two players simulate a battle by capturing the opponents pieces and ultimately the king. It can be played in 2D or 3D mode, full screen or in a window.

2006-2008
Andreas Røsdal
GNOME Documentation Project

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License (GFDL), Version 1.1 or any later version published by the Free Software Foundation with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. You can find a copy of the GFDL at this link or in the file COPYING-DOCS distributed with this manual.

This manual is part of a collection of GNOME manuals distributed under the GFDL. If you want to distribute this manual separately from the collection, you can do so by adding a copy of the license to the manual, as described in section 6 of the license.

Many of the names used by companies to distinguish their products and services are claimed as trademarks. Where those names appear in any GNOME documentation, and the members of the GNOME Documentation Project are made aware of those trademarks, then the names are in capital letters or initial capital letters.

DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT ARE PROVIDED UNDER THE TERMS OF THE GNU FREE DOCUMENTATION LICENSE WITH THE FURTHER UNDERSTANDING THAT:

1. DOCUMENT IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS FREE OF DEFECTS MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY, ACCURACY, AND PERFORMANCE OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS WITH YOU. SHOULD ANY DOCUMENT OR MODIFIED VERSION PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL WRITER, AUTHOR OR ANY CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER; AND

2. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE AUTHOR, INITIAL WRITER, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF THE DOCUMENT OR MODIFIED VERSION OF THE DOCUMENT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER DAMAGES OR LOSSES ARISING OUT OF OR RELATING TO USE OF THE DOCUMENT AND MODIFIED VERSIONS OF THE DOCUMENT, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES.

Andreas
Røsdal

     andrearo@pvv.ntnu.no

Chess Manual V2.18
December

Andreas Røsdal andrearo@pvv.ntnu.no

GNOME Documentation Project

1
December 2006
AR
First draft completed.
This manual describes version 2.18 of Chess.

## Odziv

To report a bug or make a suggestion regarding the Chess application or this manual, follow the directions in the GNOME Feedback Page.

## Introduction

### Overview of Chess

Chess is a two-player strategy board game. glChess is a 2D/3D chess game, where games can be played between a combination of human and computer players. glChess detects known third party chess engines for computer players. The game was originally developed by Robert Ancell, now the game is included in gnome-games.

glChess is written in Python and uses GTK+ and Cairo to render the chess board. 3D support is optionally available using OpenGl, using the Python OpenGL and GtkGLExt libraries. As with most modern 3D programs hardware acceleration is recommended but it should run OK in software. glChess is bundled with GNU Chess as the default chess AI. glChess can be played in network mode against other players on the Internet.

Chess is played on a square chessboard, consisting of 64 squares of alternating color. Each player begins the game with sixteen pieces: one king, one queen, two rooks, two knights, two bishops, and eight pawns. One player controls the white pieces and the other player controls the black pieces; the player that controls white is the first to move. The players take turns moving pieces; certain moves involve a "capturing" of an opponent's piece, removing it from the chessboard. The object of the game is to checkmate the opponent's king. This occurs when the king is under immediate attack (in check) and there is no way to remove it from attack on the next move. Theoreticians have developed extensive chess strategies and tactics since the game's inception.

The current form of the game emerged in South Europe in the second half of the 15th century after evolving from similar, much older games of Asian origin. Chess is one of the world's most popular board games. The tradition of competitive chess began in the 16th century. The first official World Chess Champion, Wilhelm Steinitz, claimed his title in 1886; his modern equivalent, Vladimir Kramnik, is the 14th Champion in the lineage. There are also biennial world team events called Chess Olympiads. Since the 20th century, two international organizations, the World Chess Federation and the International Correspondence Chess Federation have organized and overseen the top chess competitions and international titles.

One of the goals of early computer scientists was to create a chess-playing machine, and today's chess is deeply influenced by the overwhelming abilities of current chess programs. In 1997, a match between Garry Kasparov, then World Champion, and IBM's Deep Blue chess program proved that computers are able to beat even the strongest human players.

To run glChess, select Chess from the Games submenu of the Main Menu, or type `glchess` on the command line.

## Playing glChess

### Main game window

Starting glChess displays the main game window as shown below. The game is played by moving chess pieces using the mouse. Each player alternates to move a piece in the appropriate colour, from one board position to another valid board position. The main game window is organized in three main areas: In the top menu and toolbar area, most common game actions can be made. The chess board is in the middle of the window, where the game is played by moving chess pieces using the mouse. Finally, the game history panel is shown at the bottom, where information about the game history, the remaining move time and buttons for showing previous or next moves are available.

#### Main window in glChess

Main window in glChess.

### Starting a new game

To start a new game, press the New Game buttton on the toolbar. The new game dialog is then shown, which allows you to setup a new game with the settings of your choice. In the game properties section, the game name and time-limit for each player's move is set. In the players section, it is possible to setup the number of human and AI players. If you have installed any supported chess engines as AI players, these will be displayed in the list of available players. Finally, the difficulty setting of the AI players is set in the difficulty section.

#### Start new game dialog

Start new game dialog for glChess.

### Menus

The menu bar, located at the top of the Main Window, contains the following menus:

Game

  This menu contains:

  - Ctrl+N New This starts a new game of Chess.

  - Ctrl+O Open Loads a previously saved game.

  - Ctrl+S Save Saves the current game of chess.

  - Save AS Saves the current game of chess with a new filename.

  - Ctrl+L Network Game This starts a network multiplayer game using GGZ Gaming Zone.

  - Resign To concede loss of the game, so that the opponent wins the game.

  - Claim Draw If a claimed draw is accepted, the game ends without victory for either player.

  - Ctrl+Q Quit Ends the game.

View

  This menu contains:

  - F11 Fullscreen Shows the game window in fullscreen mode.

  - 3D Chess View Enables 3D chess view mode using OpenGL. This requires Python OpenGL and Python GTKGLExt installed, in addition to a 3D graphics card setup properly. Please contact your system administrator if you have problems, either way you will always be able to play chess in 2D mode.

  - Show Logs Show logs for debugging glChess and the active chess AI engines.

Settings

  This menu contains:

  - Preferences This opens your window to edit preferences.

Help

  This menu contains:

  - F1 Contents Display this manual.

    About This opens the About dialog which shows basic information about glChess, such as the author's name, the version number of the game.

## Chess Rules

### The Rules of Chess

Chess is played on a square board of eight rows (called ranks and denoted with numbers 1 to 8) and eight columns (called files and denoted with letters a to h) of squares. The colors of the sixty-four squares alternate between light and dark, and are referred to as "light squares" and "dark squares". The chessboard is placed so that each player has a white square in the near right hand corner, and the pieces are set out as shown in the diagram, with each queen on a square that matches its color.

Each player begins the game with sixteen pieces: each player's pieces comprise one king, one queen, two rooks, two bishops, two knights and eight pawns. One player, referred to as White, controls the white pieces and the other player, Black, controls the black pieces; White is always the first player to move. The colors are chosen either by a friendly agreement, by a game of chance or by a tournament director. The players alternate moving one piece at a time (with the exception of castling, when two pieces are moved at the same time). Pieces are moved to either an unoccupied square, or one occupied by an opponent's piece, capturing it and removing it from play. With one exception (en passant), all pieces capture opponent's pieces by moving to the square that the opponent's piece occupies.

#### King

When a king is under direct attack by one (or possibly two) of the opponent's pieces, the player is said to be in check. When in check, only moves that remove the king from attack are permitted. The player must not make any move that would place his king in check. The object of the game is to checkmate the opponent; this occurs when the opponent's king is in check, and there are no moves that remove the king from attack.

The king can move only one square horizontally, vertically, or diagonally. Once in the game, each king is allowed to make a special double move, to castle. Castling consists of moving the king two squares towards a rook, then moving the rook onto the square over which the king crossed. Castling is only permissible if all of the following conditions hold:

- The player must never have moved both the king and the rook involved in castling.

- There must be no pieces between the king and the rook.

- The king may not currently be in check, nor may the king pass through squares that are under attack by enemy pieces. As with any move, castling is illegal if it would place the king in check.

- The king and the rook must be on the same rank (to exclude castling with a promoted pawn).

#### Rook

The rook moves any number of vacant squares vertically or horizontally (it is also involved in the king's special move of castling).

#### Bishop

The bishop moves any number of vacant squares in any direction diagonally. Note that a bishop never changes square color, therefore players speak about "light-squared" or "dark-squared" bishops.

#### Queen

The queen can move any number of vacant squares diagonally, horizontally, or vertically.

#### Knight

The knight can jump over occupied squares and moves two spaces horizontally and one space vertically or vice versa, making an "L" shape. A knight in the middle of the board has eight squares to which it can move. Note that every time a knight moves, it changes square color.

#### Pawns

Pawns have the most complex rules of movement: A pawn can move forward one square, if that square is unoccupied. If it has not moved yet, the pawn has the option of moving two squares forward, if both squares in front of the pawn are unoccupied. A pawn cannot move backward. When such an initial two square advance is made that puts that pawn horizontally adjacent to an opponent's pawn, the opponent's pawn can capture that pawn "en passant" as if it moved forward only one square rather than two, but only on the immediately subsequent move. Pawns are the only pieces that capture differently than they move. They can capture an enemy piece on either of the two spaces adjacent to the space in front of them (i.e., the two squares diagonally in front of them), but cannot move to these spaces if they are vacant. If a pawn advances all the way to its eighth rank, it is then promoted (converted) to a queen, rook, bishop, or knight of the same color. In practice, the pawn is almost always promoted to a queen.

#### Remaining movement rules

With the exception of the knight, pieces cannot jump over each other. One's own pieces ("friendly pieces") cannot be passed if they are in the line of movement, and a friendly piece can never replace another friendly piece. Enemy pieces cannot be passed, but they can be "captured". When a piece is captured (or taken), the attacking piece replaces the enemy piece on its square (en passant being the only exception). The captured piece is thus removed from the game and may not be returned to play for the remainder of the game. The king cannot be captured, only put in check. If a player is unable to get the king out of check, checkmate results, with the loss of the game.

Chess games do not have to end in checkmate — either player may resign if the situation looks hopeless. Games also may end in a draw (tie). A draw can occur in several situations, including draw by agreement, stalemate, threefold repetition of a position, the fifty move rule, or a draw by impossibility of checkmate (usually because of insufficient material to checkmate).

### Timed Games

Games can be played with a time-limit by setting a move time when creating a new game. In timed games each player has a certain amount of time available for deciding which moves to make, and the time remaining for each player decreases only when it is their turn to move.

### Game Draw

A game that ends without victory for either player. Most drawn games are draws by agreement based upon the rules. The other ways that a game can end in a draw are stalemate, three-fold repetition, the fifty-move rule, and insufficient material. A position is said to be a draw (or a drawn position) if either player can, through correct play, eventually force the game into a position where the game must end in a draw, regardless of the moves made by the other player.

#### Stalemate

A stalemate is a position in which the player whose turn it is to move has no legal move and his king is not in check. A stalemate results in an immediate draw.

#### Threefold repetetion

The game is drawn if the same position occurs three times with the same player to move, and with each player having the same set of legal moves each time (the latter includes the right to take en passant and the right to castle).

#### Fifty move rule

The fifty move rule states that the game is drawn after fifty moves from each side without a pawn move or capture.

#### Insufficient material

An endgame scenario in which all pawns have been captured, and one side has only its king remaining while the other is down to just a king or a king plus one knight or one bishop. The position is a draw because it is impossible for the dominant side to deliver checkmate regardless of play. Situations where checkmate is possible only if the inferior side blunders are covered by the fifty-move rule.

## Game Settings

### Game Preferences

This preference dialog allows you to modify board orientation, move format and promotion type.

#### Game preferences dialog for glChess

Game preferences dialog for glChes.

### View Preferences

This preference dialog allows you to modify the look and feel of glChess.

#### View preferences dialog for glChess

View preferences dialog for glChess.

## Chess Engines

glChess should be able to use any Chess Engine Communication Protocol or Universal Chess Interface compatible chess engines, including these chess engines:

- GNUChess

- Sjeng

- Amy

- Crafty

- Faile

- Phalanx

- Glaurung

- HoiChess

- Diablo

- BBChess

- Fruit

- Amundsen

- Shredder

- Toga II

- Boo's Chess Engine

## Known Bugs and Limitations

- There are no documented bugs or limitations in glChess. To find areas where you can help improve glChess, please refer to the TODO file which is distributed with the game.

## Authors

glChess was written by Robert Ancell, and is now maintained in gnome-games. This documentation was originally written by Andreas Røsdal, with input from several GPL sources. To report a bug or make a suggestion regarding this application or this manual, follow the directions in this document.

## License

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

A copy of the GNU General Public License is included as an appendix to the GNOME Users Guide. You may also obtain a copy of the GNU General Public License from the Free Software Foundation by visiting their Web site or by writing to

        Free Software Foundation, Inc.
        59 Temple Place - Suite 330
        Boston, MA 02111-1307
        USA