Computer chess

The idea of creating a chess-playing machine dates back to the eighteenth century. Around 1769, the chess playing automaton called The Turk became famous before being exposed as a hoax. After that, the field of mechanical chess research languished until the advent of the digital computer in the 1950s. Since then, chess enthusiasts and computer engineers have built, with increasing degrees of seriousness and success, chess-playing machines and computer programs.

Chess-playing computers are available for negligible cost, and there are many programs (even the free GNU Chess, Amy, Pepito, Crafty, and more (http://wbec-ridderkerk.nl/)) that play a game that, with the aid of virtually any modern personal computer can defeat most master players under tournament conditions, while top commercial programs like Shredder or Fritz have surpassed even world champion caliber players at blitz and short time controls.

Contents

Motivation

The prime motivations for computerized chess playing have been solo entertainment (allowing players to practice and to amuse themselves when no human players are available), their use in chess analysis, and as research to provide insights into human cognition. For the first two purposes computer science has been a phenomenal success, from the earliest real attempts to programs which challenge the best human players in less than fifty years. The latter objective has largely been unrealized. We can say that chess play is not an intractable problem to modern computing.

However, to the surprise and disappointment of many, chess has taught us little about building machines that offer human-like intelligence, or indeed do anything except play excellent chess. For this reason, computer chess, (as with other games, like Scrabble) is no longer of great academic interest to researchers in artificial intelligence, and has largely been replaced by more intuitive games such as Go as a testing paradigm. Chess-playing programs essentially explore huge numbers of potential future moves by both players and apply a relatively simple evaluation function to the positions that result, whereas Computer Go challenges programmers to consider conceptual approaches to play.

The brute-force methods are useless for most other problems artificial intelligence researchers have tackled, and are very different from how human chess players select their moves. In some strategy games, computers easily win every game, while in others they are regularly beaten even by amateurs. In chess, the combined skills of knowledgeable humans and computer chess engines can produce a result stronger than either alone (see Modern Chess Analysis by Robin Smith for a detailed discussion of how this works in practice.)

Therefore, the fact that the best efforts of chess masters and computer engineers are as of 2004 so finely balanced should probably be viewed as an amusing quirk of fate rather than the profound comment on thought that many in the past, including some of the early theorists on machine intelligence, thought it to be.

Brute force vs. strategy

In the early years of computer chess, there were two general schools of thought. The first camp took a "strategic AI" approach, estimating that examining all possible sequences of moves to any reasonable depth would be impractical due to the astronomical number of possibilities and nominal processing power. Instead of wasting processing power examining bad or trivial moves (and their extensions), they tried to make their programs discriminate between bad, trivial and good moves, recognize patterns or formulate and execute plans, much as humans do.

The second camp took a "brute force search" approach, examining as many positions as possible using the minimax algorithm with only the most basic evaluation function. A program might, for example, pay attention only to checkmate, which side has more pieces, and which side has more possible moves, without any attempt at more complicated positional judgement. In compensation, the program would be fast enough to look exhaustively at all positions to a certain depth within its allotted time.

Use of alpha-beta pruning combined with a number of search heuristics dramatically improved the performance of brute-force search algorithms. In modern times, the general consensus is that chess is theoretically a nearly-understood paradigm as an AI design goal and the Chinese game of Go is now at the forefront of challenges to AI designers.

Ultimately, the brute force camp won out, in the sense that their programs simply played better chess. The game of chess is not conducive to inerrantly discriminating between obviously bad, trivial and good moves using a rigid set of rules. Traps are set and sprung by expert players who understand and master the many levels of depth and irony inherent to the game. Furthermore, technological advances by orders of magnitude in processing power have made the brute force approach far more incisive in recent years than was the case in the early years. The result is that a very solid, tactical AI player has been built which is errorless to the limits of its search depth and time. This has left the strategic AI approach universally recognized as obsolete. It turned out to produce better results, at least in the field of chess, to let computers do what they do best (calculate) rather than coax them into imitating human thought processes and knowledge.

Brute force vs. humans

On the other hand, it remained an open question whether any amount of brute force computation would ever be adequate to defeat the expertise of top humans. In 1968, IM David Levy made a famous bet that no chess computer would be able to beat him within ten years. He won his bet in 1978 by beating Chess 4.7 (the strongest computer at the time), but acknowledged then that it would not be long before he would be surpassed. It is well that Levy didn't renew his bet for another ten years, because in 1989 he was crushed by the computer Deep Thought in an exhibition match.

Deep Thought, however, was still considerably below World Championship Level, as the then reigning world champion Garry Kasparov demonstrated in two sterling wins in 1989. It wasn't until a 1996 match with IBM's Deep Blue that Kasparov lost his first game to a computer at tournament time controls in Deep Blue - Kasparov, 1996, Game 1. This game was, in fact, the first time a reigning world champion had lost to a computer using regular time controls. However, Kasparov regrouped to win three and draw two of the remaining five games of the match, for a convincing victory.

In May 1997, an updated version of Deep Blue defeated Kasparov 3.5-2.5 in a return match. IBM keeps a web site of the event (http://www.chess.ibm.com). While not an official world championship, the outcome of the match is often taken to mean that the strongest player in the world is a computer. Such a claim is open to strong debate, as a truly fair human-machine match is difficult to arrange.

IBM retired Deep Blue after the match and it has not played since. However, other "Man vs. Machine" matches continue to be played. In October 2002, Vladimir Kramnik and Deep Fritz competed in the eight-game Brains in Bahrain match, which ended in a draw. Kramnik won games 2 and 3 by "conventional" anti-computer tactics—play conservatively for a long-term advantage the computer is not able to see in its game tree search. Fritz, however, won game 5 after a severe blunder by Kramnik. Game 6 was described by the tournament commentators as "spectacular." Kramnik, in a better position in the early middlegame, tried a piece sacrifice to achieve a strong tactical attack, a strategy known to be highly risky against computers who are at their strongest defending such attacks. True to form, Fritz found a watertight defence and Kramnik's attack petered out leaving him in a bad position. Kramnik resigned the game, believing the position lost. However, post-game human and computer analysis has shown that the Fritz program was unlikely to have been able to force a win and Kramnik effectively sacrificed a drawn position. The final two games were draws. Given the circumstances, most commentators still rate Kramnik the stronger player in the match.

In January 2003, Kasparov played Deep Junior, another chess computer program, in New York. The match ended 3-3.

In November 2003, Kasparov played X3D Fritz. The match ended 2-2.

Endgame databases

Computers have been used to analyse some chess endgame positions completely. Such endgame databases are generated in advance using a form of retrograde analysis. Ken Thompson, perhaps better known as the key designer of the UNIX operating system, was a pioneer in this area. Over the years, other endgame database formats have been released including the Edward Tablebases, the De Koning Endgame Database (released in 2002) and the Nalimov Endgame Tablebases which is the current standard supported by most chess programs such as Shredder or Fritz. All five-piece endings have now been analysed completely, and some of the six-piece endings are available. A computer using these databases will, upon reaching a position in them, be able to play perfectly, and immediately determine whether the position is a win, loss or draw. Knowledge of whether a position is a win, loss or draw is also helpful in advance since this can help the computer avoid or head towards such positions depending on the situation.

Endgame databases featured prominently in 1999, when Kasparov played an exhibition match on the Internet against the Rest of the World. A seven piece Queen and pawn endgame was reached with the World Team fighting to salvage a draw. Eugene Nalimov helped by generating the six piece ending tablebase where both sides had 2 Queens which was used heavily to aid analysis by both sides.

Chronology of computer chess

Computer chess implementation issues

Developers of chess-playing computer system must decide on a number of fundamental implementation issues. These include

  • board representation (how a single position is represented in data structures),
  • search techniques (how to identify the possible moves and select the most promising ones for further examination),
  • leaf evaluation (how to evaluate the value of a board position, if no further search will be done from that position).

Implementors also need to decide if they will use endgame databases or other optimizations, and often implement common de facto chess standards.

Board representations

One of the simplest ways to represent a board is to create an 8x8 two-dimensional array (or, equivalently, a 64 element one-dimensional array). Each array element would identify what piece or pawn occupied the given square, or alternatively, if the square is empty. A common encoding is to consider 0 as empty, positive as white, and negative as black, e.g., white knight +1, black knight -1, white bishop +2, and so on.

One problem with this approach is that knight moves must be carefully examined to make sure they do not go "off the board". One solution is to use a 10x10 array instead, with the outer edges filled with nonsense blocking pieces; this means that knight moves do not have to implement special edge-checking code.

However, another technique has gained favor in many programs: the bitboard. The bitboard appears to have been originally developed by the Kaissa team in the Soviet Union in the late 1960s. A bitboard is a 64-bit sequence of bits (0 or 1), which indicates the absence or presence (false or true) of some state about each place on the board. A board position can then be represented using a series of bitboards. For example, a series of bitboards for each piece type or pawn, for each side, can represent the board position. See Bitboard.

Additional information must be stored as well as piece and pawn location, such as move number, which side is to move, whether or not castling is possible (and on which side), en passant information, draw-related information, and so on.

Search techniques

Computer chess programs consider chess moves as a game tree. In theory, they examine all moves, then all counter-moves to those moves, then all moves countering them, and so on, where each individual move by one player is called a "ply". This evaluation continues until it reaches a final "leaf" position which is evaluated.

A naïve implementation of this approach, however, would play relatively poorly, so various methods have been devised to greatly speed the search for good moves.

For more information, see:

Leaf evaluation

For most chess positions, computers cannot look ahead to all final possible positions. Instead, they must look ahead a few plies and then evaluate the final board position. The algorithm that evaluates final board positions is termed the "evaluation function", and these algorithms are often vastly different between different chess programs.

Nearly all evaluation functions evaluate positions in units and at the least consider material value. Thus, they will count up the amount of material on the board for each side (where a pawn is worth exactly 1 point, a knight is worth 3 points, a bishop is worth 3 points, a rook is worth 5 points and a queen is worth 9 points). The king is sometimes given the value of 200 points to artificially include checkmate situation to position evaluation.

Evaluation functions take many other factors into account, however, such as pawn structure, the fact that doubled bishops are usually worth more, centralized pieces are worth more, and so on. The protection of kings is usually considered, as well as the phase of the game (opening, middle or endgame).

Using endgame databases

Some computer chess operators have suggested that endgame tablebases will actually weaken performance strength in chess computers. Because some positions are analyzed as forced wins for one side, the program will avoid these positions at all costs. However, many endgames are forced wins only with flawless play, where an even slight error would produce a different result. Consequently, most modern engines will play endgames well enough on their own. A symptom of this problem is that computers may resign too early because they see that they are being forced into a position that is theoretically dead lost (although they may be thirty or more moves away from the end of the game).

Also, the Nalimov tablebases do not consider the fifty move rule, under which a game where fifty moves pass without a pawn move or capture is automatically drawn. This results in the tablebase returning erroneous results in some positions such as "Forced mate in 66 moves" when the position is actually a dead draw because of the fifty move rule.

The Nalimov tablebases, which use state-of-the-art compression techniques, require 7.05 GB of hard disk space for all five-piece endings. It is estimated that to cover all the six-piece endings will require at least 1 terabyte. It is estimated that seven-piece tablebases will require more storage capacity than will be available in the forseeable future.

Since endgame positions are typically very simple, and with the power of desktop computers growing exponentially, most engines can calculate in endgames very effectively, making the usefulness of endgame databases questionable in light of these serious shortcomings.

Other optimizations

Many other optimizations can be used to make chess-playing programs stronger. For example, transposition tables are used to record positions that have been previously evaluated, to save recalculation of them. Refutation tables record key moves that "refute" what appears to be a good move; these are typically tried first in variant positions (since a move that refutes one position is likely to refute another). Opening books aid computer programs by giving common openings that are considered good play (and|or good ways to counter poor openings).

Of course, faster hardware and additional processors can improve chess-playing program abilities, and some systems (such as Deep Blue) use specialized chess hardware instead of solely software implementations.

Standards

Computer chess programs usually support a number of common de facto standards. Nearly all of today's programs can read and write game moves as Portable Game Notation (PGN), and can read and write individual positions as Forsyth-Edwards Notation (FEN). Older chess programs often only understood long algebraic notation, but today users expect chess programs to understand standard algebraic chess notation.

Most computer chess programs are divided into an engine (which computes the best move given a current position) and a user interface. Most engines are separate programs from the user interface, and the two parts communicate to each other using a public communication protocol. The most popular protocol is the Xboard/Winboard Communication protocol. Another open alternate chess communication protocol is the Universal Chess Interface. By dividing chess programs into these two pieces, developers can write only the user interface, or only the engine, without needing to write both parts of the program. (See also List of chess engines.)

Playing strength vs. the computer speed

It has been estimated that doubling the computer speed gains approximately 50-70 ELO points in playing strength. However, this applies mainly to computer-vs-computer matches, and not to computer-vs-human matches.

Other chess software

There are several other forms of chess-related computer software, including the following:

  • Chess game viewers allow players to view a pre-recorded game on a computer. Most chess-playing programs can be also used for this purpose, but some special-purpose software exists.
  • Chess instruction software is designed to teach chess.
  • Chess databases are systems which allow the searching of a large library of historical games.

Computer chess theorists

Well-known computer chess theorists include:

The future of computer chess?

Many observers extrapolate that computers will consistently beat the best human players by perhaps 2010, and then go on to exceed their abilities to the point where a human vs. computer chess match would be as unfair as a human vs. automobile race. Others are unconvinced, saying that there are still deep strategic elements to chess that will resist brute-force computer searching.

See also

External links

he:תוכנת שחמט nl:Schaaksoftware pl:Szachy komputerowe sl:šahovski računalniški programi

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools