Changes

Jump to: navigation, search

Chess Game

12,120 bytes added, 10:54, 9 May 2018
Created page with "'''Home * Chess * Game''' FILE:ChessIsenburgII20150928.jpg|border|right|thumb|A Game of Chess <ref>A Game of Chess in the [https://en.wikipedia.org/wiki/M..."
'''[[Main Page|Home]] * [[Chess]] * Game'''

[[FILE:ChessIsenburgII20150928.jpg|border|right|thumb|A Game of Chess <ref>A Game of Chess in the [https://en.wikipedia.org/wiki/Middle_Ages Middle Ages], Image photographed from an explanation table labeled "Die Essener Isenburg" at the [https://de.wikipedia.org/wiki/Neue_Isenburg Isenburg Castle] in [https://en.wikipedia.org/wiki/Essen Essen], Germany, by [[Gerd Isenberg]], September 28, 2015</ref> ]]

The '''Game of Chess''' which is actually played (or analyzed) by a chess program via its [[GUI|user interface]] requires a [[Game Notation|game record]], or game history, which is a [[Move List|list]] or [[Array|array]] of [[Moves|moves]] or a tree of alternative move variants even containing comments. While the game record is necessary to take back moves f.i. after operator errors, the game history needs to be considered if it is about to claim or accepts [[Draw|draws]] by [[Repetitions|three fold repetitions]], and might therefor be referred by the [[Search|search algorithm]] as well.

=Start of the Game=
The game of chess starts with the [[Initial Position|initial position]], white to move. Both sides alternately move their pieces until the game is finished.
<span id="endofgame"></span>
=End of the Game=
There are three possible outcomes of the game, white wins (1-0), black wins (0-1) or [[Draw|draw]] (1/2-1/2). Unfinished games may be [https://en.wikipedia.org/wiki/Adjournment#Chess adjudicated], which was common until the 80s in [[Tournaments|computer chess tournaments]], for instance the adjudicated win of [[Cray Blitz]] against [[Schach|Schach 2.7]] during [[WCCC 1986]] <ref>[[Helmut Horacek]], ('''1986''') ''The Fifth World Computer Chess Championship Cologne, 1986'', Research Unit for Information Science and Artificial Intelligence, [[University of Hamburg]], from '''''Kings move''' Welcome to the 1989 AGT World Computer Chess Championship.'' pg 21, [http://archive.computerhistory.org/projects/chess/related_materials/text/3-1%20and%203-2%20and%203-3%20and%204-3.1989_WCCC/1989%20WCCC.062302028.sm.pdf pdf] from [[The Computer History Museum]]</ref> . [[Checkmate]] and [[Stalemate|stalemate]] finish the game immediately. Other occurrences usually require communication with the opponent and admission or adjudication of an arbiter instance (i.e. Tournament director), which in computer chess requires a protocol and/or interaction, like claiming a [[Repetitions|threefold repetition]] draw in over the board computer chess.

''see main article [[Rules of Chess]]''

==Win/Loss==
Since chess is a [https://en.wikipedia.org/wiki/Zero-sum_game Zero-sum game], the win of one player is the loss of the other player.
* [[Checkmate]] - if in [[Check|check]] with an empty set of [[Legal Move|legal moves]]
* [[Time Management|Loss on time]]
* [https://en.wikipedia.org/wiki/Resignation Resignation] (to resign)

==Draw==
The game of chess ends and is [[Draw|draw]] after either
* [[Stalemate]] - if '''not''' in [[Check|check]] but no [[Legal Move|legal moves]]
* Correct [[Repetitions|threefold repetition]] claim
* Correct [[Fifty-move Rule|fifty-move rule]] claim
* [[Material#InsufficientMaterial|Insufficient material]]
* Draw offer accepted

<span id="GameRecord"></span>
=Game Record=
Chess programs (not necessarily the pure (search) engine) keep track of all [[Moves|moves]] played in the game from the [[Initial Position|initial starting position]] stored inside a [[Move List|move list]], often in conjunction with a [[Move List#SignatureList|list]] of [[Zobrist Hashing|Zobrist]] or [[BCH Hashing|BCH signatures]] of the up to 100 last [[Reversible Moves|reversible moves]] for the purpose to detect twofold or threefold [[Repetitions|repetitions]].
* [[Game Notation]]
** [[Algebraic Chess Notation]]
** [[Portable Game Notation]]
* [[Move List]]
<span id="Header"></span>
=Game Header=
The game header keeps [https://en.wikipedia.org/wiki/Metadata metadata] of a game, such as player names, date of the game and site of the event and result. For instance, the [[Portable Game Notation|PGN]] game header consists of a set of [https://en.wikipedia.org/wiki/Attribute%E2%80%93value_pair attribute value pairs]. The so called '''Seven Tag Roster''' (STR) is mandatory <ref>[http://www.thechessdrum.net/PGN_Reference.txt Standard: Portable Game Notation Specification and Implementation Guide] by [[Steven Edwards]], 8.1.1: Seven Tag Roster</ref>:
# Event (the name of the tournament or match event)
# Site (the location of the event)
# Date (the starting date of the game)
# Round (the playing round ordinal of the game)
# White (the player of the white pieces)
# Black (the player of the black pieces)
# Result (the result of the game)

=Longest Game=
In 1966, Eero Bonsdorff, [https://en.wikipedia.org/wiki/Karl_Fabel Karl Fabel], and Olvai Riihimaa gave 5899 as the maximum number of [[Moves|moves]] in a chess game, considering the [[Fifty-move Rule]] <ref>Eero Bonsdorff, [https://en.wikipedia.org/wiki/Karl_Fabel Karl Fabel], Olvai Riihimaa ('''1966''') ''Schach und Zahl - Unterhaltsame Schachmathematik''. Seite 11-13, Walter Rau Verlag, Düsseldorf (German)</ref> <ref>[http://de.wikipedia.org/wiki/50-Z%C3%BCge-Regel#Schachmathematik 50-Züge-Regel - Schachmathematik from Wikipedia.de] (German)</ref> <ref>[http://www.xs4all.nl/~timkr/chess2/honor.htm Defending Humanity's Honor] by [https://en.wikipedia.org/wiki/Tim_Krabb%C3%A9 Tim Krabbé], see game [[Rival|NewRival]] - [[Faile]] with 493 moves, and playing 402 moves with bare kings!</ref>.

=MVC=
{{MVC to include}}
<span id="GameLoop"></span>
=The Game Loop=
Early chess programs without [[Pondering]] used a simple sequential control structure to play the whole game for instance via a [https://en.wikipedia.org/wiki/Teleprinter teleprinter] or any [https://en.wikipedia.org/wiki/Computer_terminal Computer terminals] in a sequential manner.
<pre>
state := playGame;
initialize position
print board
while (state != gameover)
wait for input of a move by the user
make move (if legal)
if (mate or stalemate) {
state := gameOver;
break;
}
search move with allocated time
make move
print move and update board
if (mate or stalemate)
state := gameOver;
}
print "thank you for playing the game";
</pre>
==CLI==
Most current chess engines communicate via a sequential [[CLI|command-line interface]], available in all common [https://en.wikipedia.org/wiki/Operating_system operating systems]. [[Pondering]] and the need to [[Entering Moves|enter moves]] and commands even if the program is "thinking", requires a more complicated control structure and an interruptible search routine. Often engines used [https://en.wikipedia.org/wiki/Coroutine coroutines] to implement internal [https://en.wikipedia.org/wiki/Context_switch context switching] between search and user interaction. Today, it is more common to rely on [https://en.wikipedia.org/wiki/Multi-threading multithreading] abilities of recent operating systems, and to use an explicit I/O-thread, while the search routine is regularly pondering whether it needs to be interrupted by pending input received by another thread, with the option to asynchronous stop the search.

==Event driven GUIs==
With the advent of operating systems with [https://en.wikipedia.org/wiki/Graphical_user_interface graphical user interfaces], also encouraged by additional input devices such as a [https://en.wikipedia.org/wiki/Mouse_%28computing%29 computer mouse] for asynchronous user interaction, the embedding of a chess engine with a classical CLI inside the [https://en.wikipedia.org/wiki/Event-driven_architecture event-driven architecture] of a graphical user interface became more difficult. Today, most programmers rely on external event driven [[GUI|graphical user interface]] applications using [https://en.wikipedia.org/wiki/Standard_streams standard streams] or [https://en.wikipedia.org/wiki/Pipeline_%28Unix%29 pipelines] to communicate with the GUI via protocols such as the [[Chess Engine Communication Protocol]] and the [[UCI|Universal Chess Interface]]. The external GUI application constitutes the MVC view and controller, and more or less even parts of a (redundant) game model (or even multi-game model), to make the GUI aware of its own game states to even make decisions on behalf of the engine, such as move selection from opening books and [[Endgame Tablebases|endgame tablebases]], draw claims and offers and to finally declare the game over. These game interacting features of the external GUI application in conjunction with certain protocols such as UCI by far exceeds what a pure chess user interface was initially designed for - controller and view only, enter legal moves and render the state of the game, which has become disputed issue in playing official [[Tournaments|tournament]] games.

=See also=
* [[Board Representation]]
* [[Chess Engine Communication Protocol]]
* [[Chess Position]]
* [[Contempt Factor]]
* [[GUI|Graphical User Interface]]
* [[Match Statistics]]
* [[Pawn Advantage, Win Percentage, and ELO]]
* [[Strategy]]
* [[Tactics]]
* [[Time Management]]
* [[UCI]]
* [[User Interface]]

=Publications=
* [[Ingo Althöfer]] ('''1990'''). ''Compressing Chess Games with the Help of a fast Deterministic Chess Program.'' [[ICGA Journal#13_4|ICCA Journal, Vol. 13, No. 4]]
* [[Ingo Althöfer]] ('''1991'''): ''[http://www.sciencedirect.com/science/article/pii/000437029190026G Data compression using an intelligent generator: The storage of chess games as an example]''. [https://en.wikipedia.org/wiki/Artificial_Intelligence_%28journal%29 Artificial Intelligence], Vol. 52, No. 1
* [[Borko Bošković]], [[Sašo Greiner]], [[Janez Brest]], [[Viljem Žumer]] ('''2005'''). ''[http://ieeexplore.ieee.org/xpl/freeabs_all.jsp?arnumber=1491153 The Representation of Chess Game]''. Proceedings of the 27th International Conference on Information Technology Interfaces
* [[Nick Pelling]] ('''2013'''). ''[https://www.amazon.co.uk/Chess-Superminiatures-Nick-Pelling-ebook/dp/B00HEOZ8B6 Chess Superminiatures]''. [https://en.wikipedia.org/wiki/E-book eBook], [https://en.wikipedia.org/wiki/Amazon_Kindle Kindle edition], [https://en.wikipedia.org/wiki/Amazon.com Amazon]

=Forum Posts=
* [http://www.talkchess.com/forum/viewtopic.php?t=40193 One billion random games] by [[Steven Edwards]], [[CCC]], August 27, 2011
* [http://www.talkchess.com/forum/viewtopic.php?t=48542 One billion random games] by [[Steven Edwards]], [[CCC]], July 03, 2013
* [http://www.talkchess.com/forum/viewtopic.php?t=56328 Revised source for the random game generator] by [[Steven Edwards]], [[CCC]], May 12, 2015
* [http://www.talkchess.com/forum/viewtopic.php?t=59483 Random game mating probabilities] by [[Steven Edwards]], [[CCC]], March 12, 2016
* [http://www.talkchess.com/forum/viewtopic.php?t=59841&start=14 This should be in the wiki] by [[Steven Edwards]], [[CCC]], April 13, 2016 » [[Repetitions]]
* [http://www.talkchess.com/forum/viewtopic.php?t=61672 Photographing Chess Clock] by [[Harm Geert Muller]], [[CCC]], October 10, 2016
* [http://www.talkchess.com/forum/viewtopic.php?t=63572 What can be said about 1 - 0 score?] by [[Kai Laskos]], [[CCC]], March 28, 2017 » [[Match Statistics]]

=External Links=
* [http://c2.com/cgi/wiki?GameOfChess Game Of Chess]
* [https://en.wikipedia.org/wiki/Chess_notation Chess notation from Wikipedia]
* [http://labraj.uni-mb.si/en/Representation_of_Chess_Game Representation of Chess Game - Computer Architecture and Languages Laboratory], [[University of Maribor]]
* How many chess games are possible? by [http://singingbanana.com/ Dr James Grime], [http://numberphile.com/team/index.html numberphile], [https://en.wikipedia.org/wiki/YouTube YouTube] Video <ref>[[Claude Shannon]], [https://en.wikipedia.org/wiki/Shannon_number Shannon number], [[Mathematician#Hardy|Godfrey Harold Hardy]], [[Matthieu Walraet#googolplex|A googolplex of Go games]]</ref>
: {{#evu:https://www.youtube.com/watch?v=Km024eldY1A|alignment=left|valignment=top}}

=References=
<references />

'''[[Chess|Up one Level]]'''

Navigation menu