100 Years of Shannon: Chess, Computing and Botvinik

22
HAL Id: cel-01709767 https://hal.archives-ouvertes.fr/cel-01709767 Submitted on 15 Feb 2018 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés. 100 Years of Shannon: Chess, Computing and Botvinik Iryna Andriyanova To cite this version: Iryna Andriyanova. 100 Years of Shannon: Chess, Computing and Botvinik. Doctoral. United States. 2016. cel-01709767

Transcript of 100 Years of Shannon: Chess, Computing and Botvinik

Page 1: 100 Years of Shannon: Chess, Computing and Botvinik

HAL Id: cel-01709767https://hal.archives-ouvertes.fr/cel-01709767

Submitted on 15 Feb 2018

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinée au dépôt et à la diffusion de documentsscientifiques de niveau recherche, publiés ou non,émanant des établissements d’enseignement et derecherche français ou étrangers, des laboratoirespublics ou privés.

100 Years of Shannon: Chess, Computing and BotvinikIryna Andriyanova

To cite this version:Iryna Andriyanova. 100 Years of Shannon: Chess, Computing and Botvinik. Doctoral. United States.2016. �cel-01709767�

Page 2: 100 Years of Shannon: Chess, Computing and Botvinik

1916—2001

CLAUDE E. SHANNON

• 1936 : Bachelor in EE and Mathematics from U.Michigan

• 1937 : Master in EE from MIT

• 1940 : PhD in EE from MIT

• 1940 : Research fellow at Princeton

• 1940-1956 : Researcher at Bell Labs

• 1948 : “A Mathematical Theory of Communication”, Bell System Technical Journal

• 1956-1978 : Professor at MIT

Page 3: 100 Years of Shannon: Chess, Computing and Botvinik

SHANNON, BOTVINNIK AND COMPUTER CHESS

100 YEARS OF SHANNON

54TH ALLERTON CONFERENCE

ETIS Lab, UMR 8051, ENSEA/Université de Cergy-Pontoise/CNRS

Iryna Andriyanova

Page 4: 100 Years of Shannon: Chess, Computing and Botvinik

CHESS/COMPUTER CHESSSHORT HISTORY OF

Page 5: 100 Years of Shannon: Chess, Computing and Botvinik

TWO PARALLELS

CHESS AND COMPUTER CHESS

1886 1894 1921 1948 1963 1975 1985 2006*W. Steinitz

E. Lasker

M. Botvinnik A. Karpov

G. Kasparov

W. Steinitz: simplicity and rationality E. Lasker: more risky play M. Botvinnik: complicated, very original positions A. Karpov, G. Kasparov: Botvinnik’s school

Page 6: 100 Years of Shannon: Chess, Computing and Botvinik

TWO PARALLELS

CHESS AND COMPUTER CHESS

1914 1948 1957 1997L. Torres y Quevedo

C. Shannon1950

A.Turing

Deep Blue

1974M-M

match

1989

1886 1894 1921 1948 1963 1975 1985 2006*W. Steinitz

E. Lasker

M. Botvinnik A. Karpov

G. Kasparov

A. Turing: TurboChamp algorithm C. Shannon: “Programming a Computer for Playing Chess” 1957, MANIAC: first simple chess machine 1974, first chess machine world championship

Page 7: 100 Years of Shannon: Chess, Computing and Botvinik

TWO PARALLELS

CHESS AND COMPUTER CHESS

1914 1948 1965 1997L. Torres y Quevedo

C. Shannon1950

A.Turing

Deep Blue

1974M-M

match

1989

1886 1894 1921 1948 1963 1975 1985 2006*W. Steinitz

E. Lasker

M. Botvinnik A. Karpov

G. Kasparov

- Match between Shannon and Botvinnik in 1965 - “An Algorithm for Chess” by Botvinnik in 1968

Page 8: 100 Years of Shannon: Chess, Computing and Botvinik

COMPUTER CHESS PROGRAMINSIDE A

Page 9: 100 Years of Shannon: Chess, Computing and Botvinik

• Board representation

• Move generator

• Database of openings

• Tree searching techniques

• Positional evaluation

• Transposition tables

WHAT A MODERN CHESS PROGRAMM HAS INSIDE?

Page 10: 100 Years of Shannon: Chess, Computing and Botvinik

• Board representation

• Move generator

• Database of openings

• Tree searching techniques

• Positional evaluation

• Transposition tables

WHAT A MODERN CHESS PROGRAMM HAS INSIDE?

materialScore = kingWt * (wK-bK) + queenWt * (wQ-bQ) + rookWt * (wR-bR) + knightWt* (wN-bN) + bishopWt* (wB-bB) + pawnWt * (wP-bP) mobilityScore = mobilityWt * (wMobility-bMobility)

Page 11: 100 Years of Shannon: Chess, Computing and Botvinik

• Board representation

• Move generator

• Database of openings

• Tree searching techniques

• Positional evaluation

• Transposition tables

WHAT A MODERN CHESS PROGRAMM HAS INSIDE?

Page 12: 100 Years of Shannon: Chess, Computing and Botvinik

• Sum-zero utility function

• Minimax evaluation [vonNeuman’47]

FIRST FORMALISM OF COMPUTER CHESS

STRATEGIES BY C. SHANNON (1950)

f(p) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B' + N-N') + 1(P-P') - 0.5(D-D' + S-S' + I-I') + 0.1(M-M') + ... KQRBNP = number of kings, queens, rooks, bishops, knights and pawns

D,S,I = doubled, blocked and isolated pawns

M = Mobility (the number of legal moves)

Page 13: 100 Years of Shannon: Chess, Computing and Botvinik

TYPES A AND B

STRATEGIES BY C. SHANNON (1950)

• Type A strategy search over all possible variations - exponential explosion - horizon effect

• Type B strategy consideration of carefully chosen better moves (human-like) - “plausible move generators” - successive learning - the search depth is unlimited

with minimax trees the only positions evaluated are those on the lowest level of the tree,

doing a full search at 3 ply requires the evaluation of ~8000 positions, a search at 5 ply

requires ~3200000 positions, and a search at 7 ply needs ~1280000000 evaluations. This

phenomenon is known as exponential explosion: the number of positions which need to

be evaluated grows exponentially in the depth. In general exponential functions are

considered intractable, that is computers are unable to cope with them for all but the

smallest inputs. When dealing with exponential functions getting faster computers

is usually of only limited help, as a computer

which is 400 times faster will only be able to

look 2 ply deeper. Consequently type A

strategies are necessarily near-sighted: although

they do not make trivial beginner blunders, they

are incapable of finding a plan which takes

more then a few moves to execute (see position

1). [Brudno 2000] Second the strategies suffer

from the horizon effect: after carrying out a

search to its set depth it may think it is winning

by some margin, but in reality it is left in a vulnerable position just a move past its depth.

Type B strategies are much more flexible, and consequently much harder to

implement. They do not consider all possible moves, but only the “plausible” ones, as a

human chess player would. The immediate problem is which moves to consider

“plausible”, since it is generally impossible to decide that a certain move is not worth

considering without first looking at it (humans are much better at this than computers).

Position 1: White has a trivial win, but because it requires a 10 move maneuver a trivial type A strategy will not find it.

Page 14: 100 Years of Shannon: Chess, Computing and Botvinik

COMPUTER CHESS EVOLUTION

= COMPUTERS EVOLUTION

Page 15: 100 Years of Shannon: Chess, Computing and Botvinik

= COMPUTERS EVOLUTION

COMPUTER CHESS EVOLUTION

Toy example:

White give a checkmate in 3 moves: 1. Fxh7+ Rf8 2.Cg6+ fxg6 3.Tf4×

Page 16: 100 Years of Shannon: Chess, Computing and Botvinik

FROM 1970’S TILL NOWADAYS

COMPUTER CHESS EVOLUTION

• Improved Type-A algorithms - alpha-beta pruning - killer heuristic no need for very good plausible move generators

• Improved computers - parallelized processing - special chess hardware - memory volume - cheap disk storage

Deep Blue chess machine : 30 parallel processors + 480 custom chess chips, 10 years of development

Kasparov against Deep Blue

Page 17: 100 Years of Shannon: Chess, Computing and Botvinik

STRATEGY OF TYPE B

Page 18: 100 Years of Shannon: Chess, Computing and Botvinik

BY C. SHANNON

TYPE-B STRATEGY

(1)Examine forceful variations out as far as possible and evaluate only at reasonable positions, where some quasi-stability has been established.

(2) Select the variations to be explored by some process so that the machine does not waste its time in totally pointless variations.

Example from [Shannon’50]:

g(P) = 1 if any piece is attacked by a piece of lower value or by more pieces than defences or if any check exists on a square controlled by the opponent g(P) = 0 otherwise

Page 19: 100 Years of Shannon: Chess, Computing and Botvinik

BY M. BOTVINNIK

TYPE-B STRATEGY

• “An Algorithm in Chess” 1968

• Pioneer project 1970s-1980s: - notion of attack maps - notion of trajectories and adversary counter-trajectories - endgame library with base positions, nodal positions and scores

two men who would go on to become world champions. It is ironic that some of these

advantages turned against him in his quest to develop a chess program.

Botvinnik’s interest in Computer Chess started very early. In 1968 he published

his main treatise on the subject, An Algorithm for Chess, in which he suggested a method

for finding the “weaknesses” in the opponent’s position and organizing attacks against

these. He spectacularly demonstrated his approach on some very hard tactical problems.

In position 3, for instance, white sacrifices

both its bishop and its knight in order to

attain a winning attack. Finding the winning

sequence of moves is difficult, and Fritz II

one of the strongest chess programs from the

mid-90s, was unable to do so (actually

finding the moves is left as an exercise for

the reader). Botvinnik’s algorithm

succeeded in this difficult position.

[Botvinnik 1968] The problem was that it

failed in many simple ones. Although good

at finding complicated themes and formulating powerful attacks, the algorithm was

helpless when faced with a trivial situation: Botvinnik’s co-worker recalled his frustration

when the program would follow Botvinnik’s algorithm and find the weakness in the

opponent’s position and attack it, while missing a much simpler checkmate in two moves.

When this was remedied by making a special case in the program, it would miss taking an

undefended piece. Once that was remedied another problem would come up. [Brudno

Position 3: Botvinnik-Capablanca 1938. By playing 1.Ba3!! White starts a remarkable combination which gives it a victory 12 moves later. This position was used by Botvinnik as a test case for his chess algorithms.

Page 20: 100 Years of Shannon: Chess, Computing and Botvinik

CONCLUSION

Page 21: 100 Years of Shannon: Chess, Computing and Botvinik

— M. Campbell, Deep Blue team member

I never considered Deep Blue intelligent in any way. It’s just an excellent problem solver in this very specific domain.

— Donskoy, KAISSA developer

Brute-force alpha-beta may have done as much damage to the process and credibility of computer-chess research as it has given chess programs high ratings.

Page 22: 100 Years of Shannon: Chess, Computing and Botvinik

MESSAGE TO TAKE HOME

• B-type strategy - by Shannon - by Botvinnik - machine learning

• Contribution of computer chess to science - alpha-beta pruning - transposition tables - artificial intelligence