SlideShare une entreprise Scribd logo
1  sur  40
o   History
o   Implementation
1) Claude E. Shannon (1949) Programming a Computer for
   Playing Chess. In: Philosophical Magazine, Ser.7, Vol. 41, No. 314 -
   March 1950.
2) T.A. Marsland (1992) Computer Chess and Search.
   Encyclopedia of Artificial Intelligence, S.C. Shapiro (ed), pp. 224r-
   241, Wiley & Sons, 2nd ed. 1992, ISBN 0471-50305-3.
3) Ernst A. Heinz (1997) How DarkThought Plays Chess, ICC A
   Journal 20(3), pp. 166-176, Sept. 1997.
4) John L. Jerz (2009) A Proposed Heuristic for a Computer Chess
   Program
5) Computer History Museum, Mastering the Game – A History
   of Computer Chess, http://www.computerhistory.org/chess/
6) Wikipedia, accessed November 2009
Part 1:
History
In 1769 the Hungarian engineer
Baron Wolfgang von Kempelen
built a chess playing machine for
the amusement of the Austrian
Queen Maria Theresia. It was a
purely mechanical device, shaped
like a Turk.
Naturally its outstanding playing
strength was supplied by a chess
master cleverly hidden inside the
device. The machine was a fake.
In 1914 Torres y Quevedo
   constructed a device which
   played an end game of king and
   rook against king
   (Vigneron, 1914). The machine
   played the side with king and
   rook and would force checkmate
   in few moves however its human
   opponent played.
Since an explicit set of rules can be
   given for making satisfactory
   moves in such an end game, the
   problem is relatively simple, but
   the idea was quite advanced for
   that period.
Gonzales Torres y Quevedo demonstrating the chess automaton to Norbert Wiener in 1951
●   In 1947, Turing
    designed the first
    program to play
    chess and tested it
    with paper and
    pencil using
    himself as the
    computer
“Although perhaps of no
  practical importance, the
  question is of theoretical
  interest, and it is hoped that
  a satisfactory solution of
  this problem will act as a
  wedge in attacking other
  problems of a similar nature
  and of greater significance..”
     „Programming a Computer for
                  Playing Chess”
Dr. Dietrich Prinz in England
  wrote the first limited
  chess program in 1951.
Alex Bernstein, an
  experienced chess player
  and a programmer at
  IBM, wrote a program in
  1958 that could play a full
  chess game (although it
  could be defeated by
  novice players).
●W 1968 roku David Levy założył się o 1,250
funtów, że w ciągu 10 lat żaden komputer
nie będzie w stanie go pokonać. W 1978
wygrał ten zakład pokonując najszybszy w
tym czasie program Chess 4.7
●   1983 US Master rating in - $5000 goes to Ken
    Thompson and Joe Condon, when their Belle
●   $10,000 for the first program to achieve a
    USCF 2500 rating (players who attain this
    rating may reasonably aspire to becoming
    Grandmasters) was awarded to Deep
    Thought in August 1989
●   $100,000 for attaining world-champion
    status remains unclaimed.
In 1977 at Bell Laboratories, Ken Thompson and Joe
  Condon took the brute force approach one step
  further by developing a custom chess-playing
  computer called Belle. By 1980 it included highly
  specialized circuitry that contained a “move
  generator” and “board evaluator,” allowing the
  computer to examine 160,000 positions per second.
This approach was so effective that in 1982 at the North
  American Computer Chess Championships
  (NACCC), this $17000 chess machine beat the Cray
  Blitz program running on a million supercomputer.
W 1989 programy były wciąż za słabe aby pokonać mistrzów świata. Garry Kasparov bez
●

problemu pokonuje wszystkie.

W 1996 Deep Blue pokonuje Kasparova (1 z 6 gier)
●




    „The Association for Computing Machinery (ACM), the first society in
       computing, announces a six game match between World Chess Champion Garry
       Kasparov and the top-rated chess program DEEP BLUE. A $500,000 prize fund
       has been established for the match to be held in Philadelphia, Pa., USA, Feb. 10-
       17, 1996, as part of ACM's year long 50th Anniversary Celebration which begins
       with the ACM Computing Week '96 conference. The winner will receive $400,000
       with the remaining $100,000 going to the loser.”
Part 2:
Implementation
Evaluating Function:
1) The relative values of queen, rook, bishop, knight and pawn are about
   9, 5, 3, 3, 1, respectively.
2) Rooks should be placed on open files. This is part of a more general principle that
   the side with the greater mobility, other things equal, has the better game.
3) Backward, isolated and doubled pawns are weak.
4) An exposed king is a weakness (until the end game).



          f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N')
               + (P-P') – 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ...
K,Q,R,B,B,P are the number of White kings, queens, rooks, bishops, knights and pawns
   on the board. D,S,I are doubled, backward and isolated White pawns. Weakness – ie.
   exchange of queens
”Type A” strategy considered all possible moves to a fixed depth.
  A world champion can construct (at best) combinations
  say, 15 or 20 moves deep. Some variations given by Alekhine
  ("My Best Games of Chess 1924-1937") are of this length.


  Let M_1, M_2, M_3, ..., M_s be the moves that can be made
  in position P and let M_1P, M_2P, etc. denote symbolically
  the resulting positions when M_1, M_2, etc. are applied to P.
  Then one chooses the M_m which maximizes f(M_mP).
A deeper strategy would consider the opponent's replies which
  are minimized...
“Type B” strategy used chess knowledge to explore the more promising
  lines to a greater depth.
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.
A crude definition might be:
●   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
Using this function, variations could be explored until
  g(P)=0, always, however, going at least two moves and never
  more, say, 10.
(...) the machine once designed would always make the same move in the
     same position. If the opponent made the same moves this would always
     lead to the same game.
(...) the opening is another place where statistical variation can be introduced.
    It would seem desirable to have a number of the standard openings
    stored in a slow-sped memory in the machine. Perhaps a few hundred
    would be satisfactory.
(...) program based on "type position" could not be constructed. (...). Although
     there are various books analysing combination play and the middle
     game, they are written for human consumption, not for computing
     machines.
     (...)To program such a strategy we might suppose that any position in the
     machine is accompanied by a rather elaborate analysis of the tactical
     structure of the position suitably encoded. This analytical data will state
     that, for example, the Black knight at f6 is pinned by a bishop, that the
     White rook at e1 cannot leave the back rank because of a threatened mate
     on c1, that a White knight at a4 has no move, etc.;
     - These data would be supplied by a program and would be continually
     changed and kept up-to-date as the game progressed.
1) Board description
  and move generation
2) Tree searching/pruning
3) Position evaluation
DeepThought bit boards
Opening Books: a listing of known good move sequences
 that can be used at the beginning of a chess game.


Endgame Databases: a catalog of previously analyzed
 board configurations near the end of a chess game that
 allows the program to play the remaining moves of the
 game flawlessly.
A way to quickly check a catalog of positions already examined, which
  cuts down the number of positions that must be searched.
12 different piece types {K,Q,R,B,N,P,–K ... –P} on a 64-square board.
   Thus a set of 12*64 unique integers (plus a few more for en passant
   and castling privileges), {Ri }, may be used to represent all the
   possible piece/square combinations. Zobrist (1970)
Pawn hash table - similar technique can be used to store an
  evaluation of the pawn structures in a position. Since the number of
  pawn positions examined is generally much smaller than the total
  number of positions searched, the pawn hash table has a very high
  hit rate, allowing a program to spend more time on sophisticated
  pawn evaluations because they are reused many times.
A model chess program has three phases to its search:
1) Typically, from the root node an exhaustive examination of
   layers of moves occurs,
2) This is followed by a phase of selective searches up to a
   limiting depth (the horizon).
3) An evaluation function is applied at the frontier nodes to
   assess the material balance and the structural properties of
   the position (e.g., relative placement of pawns). To aid in this
   assessment a third phase is used, a variable depth
   quiescence search of those moves that are not dead
   (i.e., cannot be accurately assessed).
(..., Pb2; Bxb2, Pc3; Bxc3, Pd4; Bxd4, Pe5; Bxe5)
Alpha-Beta searcher with enhancements like:
●   aggressive futility pruning [19, 31],
●   internal iterative deepening [3, 33], *
●   dynamic move ordering (history+ killer heuristic) [2, 16, 30, 32, 35], *
●   recursive null-move pruning [7, 15, 17], *
●   selective extensions [3, 6],
●   interior-node recognizers [18, 34],
On average, all enhancements taken together reduce the effective
  branching factor of DARKTHOUGHT to 2-3 and its search-tree size to
  roughly 55% of that of the according minimal tree [21]. These
  observations are consistent with reports by other researchers [6, 38],
Iterative Deepening: a technique that gradually
  increases the depth of the search tree (the number of
  moves and counter-moves) that is examined, rather than
  searching to a fixed depth. This allows the most efficient
  use of the limited time each player is given to choose a
  move.
DarkThought implements a standard node-expansion procedure whose structure probably does not differ much
    from that of other chess programs:


  • extension decisions related to incoming move (U),
  • internal iterative deepening (U), *
  • transposition-table lookup (L/U), *
  • interior-node recognizer decision (L/U),
  • endgame database lookup (L/U),        *
  • null-move search with deep extension decision (U), *
  • single-reply extension decision (U),
  • futility pruning decision (F/L),
  • static evaluation (F/L),
  • search of all outgoing moves (L/U).
      1. hashed move from transposition table (L/U), *
       2. capture moves in MVV/LVA order (L/U),
              (most valuable victim / least valuable aggressor)
       3. killer moves (U),      *
       4. history moves (U),      *
       5. statically presorted remaining moves (U).

F means "frontier" (depth = 1), L "lower part" (depth < 0), and U "upper part" (depth > 1)
.. produce a cutoff by assuming that a move that produced a cutoff in
    another branch at the same depth is likely to produce a cutoff in the
    present position, that is to say that a move that was a very good
    move from a different (but possibly similar) position might also be a
    good move in the present position.
By trying the killer move before other moves, a game playing program
   can often produce an early cutoff, saving itself the effort of
   considering or even generating all legal moves from a position.
A generalization of the killer heuristic is the history heuristic. The
   history heuristic can be implemented as a table that is indexed by
   some characteristic of the move, for example "from" and "to"
   squares or piece moving and the "to" square. When there is a
   cutoff, the appropriate entry in the table is incremented, such as by
   adding d² or 2d where d is the current search depth. This
   information is used when ordering moves.
current position is so good for the side to move that best play by the
   other side would have avoided it. The faster the program produces
   cutoffs, the faster the search runs. The null-move heuristic is
   designed to guess cutoffs with less effort than would otherwise be
   required, whilst retaining a reasonable level of accuracy.
The null-move heuristic is based on the fact that most reasonable
  chess moves improve the position for the side that played them.
  So, if the player whose turn it is to move can forfeit the right to
  move (or make a "null move" - an illegal action in chess) and still
  have a position strong enough to produce a cutoff, then the current
  position would almost certainly produce a cutoff if the current
  player actually moved.
• Material-balance scoring,
• evaluation flitihty-pruning decision,
• Pawn-structure scoring (H),
• Pawn-related King scoring (H),
• race scoring of passed Pawns,
• PST piece-placement scoring,
• positional futility-pruning decision,
• flirt her positional scoring (H).

  For all steps marked with an H, the evaluation infrastructure
  automatically hashes the computed scores.
https://github.com/yangboz/godpaper
 Thank   you!

Contenu connexe

Tendances

Tim harding two knights defence part ii
Tim harding two knights defence part iiTim harding two knights defence part ii
Tim harding two knights defence part iiLeo Nilson
 
kumpulan partai catur terbaik
kumpulan partai catur terbaikkumpulan partai catur terbaik
kumpulan partai catur terbaikknyaz1000
 
Chess Engine Programming
Chess Engine ProgrammingChess Engine Programming
Chess Engine ProgrammingArno Huetter
 
Hadoop hands on madison
Hadoop hands on madisonHadoop hands on madison
Hadoop hands on madisonRyan Bosshart
 
The simpsons
The simpsonsThe simpsons
The simpsonsVicky
 
Tim harding two knights defence part i
Tim harding two knights defence part iTim harding two knights defence part i
Tim harding two knights defence part iLeo Nilson
 
GD - 3rd - Game Genres Study Case [Part 1]
GD - 3rd - Game Genres Study Case [Part 1]GD - 3rd - Game Genres Study Case [Part 1]
GD - 3rd - Game Genres Study Case [Part 1]Hadziq Fabroyir
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gamemanika kumari
 

Tendances (11)

Chess superb
Chess  superbChess  superb
Chess superb
 
Tim harding two knights defence part ii
Tim harding two knights defence part iiTim harding two knights defence part ii
Tim harding two knights defence part ii
 
How computers play chess
How computers play chessHow computers play chess
How computers play chess
 
kumpulan partai catur terbaik
kumpulan partai catur terbaikkumpulan partai catur terbaik
kumpulan partai catur terbaik
 
Chess Engine Programming
Chess Engine ProgrammingChess Engine Programming
Chess Engine Programming
 
Hadoop hands on madison
Hadoop hands on madisonHadoop hands on madison
Hadoop hands on madison
 
Games.4
Games.4Games.4
Games.4
 
The simpsons
The simpsonsThe simpsons
The simpsons
 
Tim harding two knights defence part i
Tim harding two knights defence part iTim harding two knights defence part i
Tim harding two knights defence part i
 
GD - 3rd - Game Genres Study Case [Part 1]
GD - 3rd - Game Genres Study Case [Part 1]GD - 3rd - Game Genres Study Case [Part 1]
GD - 3rd - Game Genres Study Case [Part 1]
 
Artificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe gameArtificial Intelligence- TicTacToe game
Artificial Intelligence- TicTacToe game
 

En vedette

En vedette (15)

Zachary elise and jarett
Zachary elise and jarettZachary elise and jarett
Zachary elise and jarett
 
Agroforesterie : ameliorer durable la production
Agroforesterie : ameliorer durable la productionAgroforesterie : ameliorer durable la production
Agroforesterie : ameliorer durable la production
 
Présentation1
Présentation1Présentation1
Présentation1
 
Breaking down the Wall
Breaking down the WallBreaking down the Wall
Breaking down the Wall
 
5 new
5 new5 new
5 new
 
Quality presentation
Quality presentationQuality presentation
Quality presentation
 
Semana 1[1]
Semana 1[1]Semana 1[1]
Semana 1[1]
 
Innovation insights
Innovation insightsInnovation insights
Innovation insights
 
Php&redis presentation
Php&redis presentationPhp&redis presentation
Php&redis presentation
 
Budget town hall meeting
Budget town hall meetingBudget town hall meeting
Budget town hall meeting
 
Bab i.pptx kelas xi ipa
Bab i.pptx kelas xi ipaBab i.pptx kelas xi ipa
Bab i.pptx kelas xi ipa
 
Hoezo gratis? Mythes en misverstanden over open source software
Hoezo gratis? Mythes en misverstanden over open source softwareHoezo gratis? Mythes en misverstanden over open source software
Hoezo gratis? Mythes en misverstanden over open source software
 
An Easy Way To Collect Debt & Recover Credit In Toronto
An Easy Way To Collect Debt & Recover Credit In TorontoAn Easy Way To Collect Debt & Recover Credit In Toronto
An Easy Way To Collect Debt & Recover Credit In Toronto
 
Pensons aux autres
Pensons aux autresPensons aux autres
Pensons aux autres
 
3. basics business development
3. basics   business development3. basics   business development
3. basics business development
 

Similaire à Introducing ofcomputerchess

计算机棋盘游戏历史及现代应用
计算机棋盘游戏历史及现代应用计算机棋盘游戏历史及现代应用
计算机棋盘游戏历史及现代应用yangbo zhou
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptSabrinaShanta2
 
International journal of engineering issues vol 2015 - no 2 - paper1
International journal of engineering issues   vol 2015 - no 2 - paper1International journal of engineering issues   vol 2015 - no 2 - paper1
International journal of engineering issues vol 2015 - no 2 - paper1sophiabelthome
 
Artificial Intelligence Introduction Chapter 1, AIMA
Artificial Intelligence Introduction Chapter 1, AIMAArtificial Intelligence Introduction Chapter 1, AIMA
Artificial Intelligence Introduction Chapter 1, AIMAbutest
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.pptVihaanN2
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchpramod naik
 
The History Of Video Games
The History Of Video GamesThe History Of Video Games
The History Of Video Gameschris dejong
 
Recursion - Computer Algorithms
Recursion - Computer AlgorithmsRecursion - Computer Algorithms
Recursion - Computer AlgorithmsAlaa Al-Makhzoomy
 
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...Karel Ha
 
AUTHOR SIAFA B. NEAL 5 STARS (1)
AUTHOR SIAFA B. NEAL  5 STARS (1)AUTHOR SIAFA B. NEAL  5 STARS (1)
AUTHOR SIAFA B. NEAL 5 STARS (1)Siafa Neal
 
Artificial intelligence - python
Artificial intelligence - pythonArtificial intelligence - python
Artificial intelligence - pythonSunjid Hasan
 
A Development of Log-based Game AI using Deep Learning
A Development of Log-based Game AI using Deep LearningA Development of Log-based Game AI using Deep Learning
A Development of Log-based Game AI using Deep LearningSuntae Kim
 
Quiz of begginers 120 questions Chess
Quiz of begginers 120 questions ChessQuiz of begginers 120 questions Chess
Quiz of begginers 120 questions ChessAagamGupta3
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchDheerendra k
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)noorcon
 

Similaire à Introducing ofcomputerchess (20)

计算机棋盘游戏历史及现代应用
计算机棋盘游戏历史及现代应用计算机棋盘游戏历史及现代应用
计算机棋盘游戏历史及现代应用
 
Topic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).pptTopic - 6 (Game Playing).ppt
Topic - 6 (Game Playing).ppt
 
International journal of engineering issues vol 2015 - no 2 - paper1
International journal of engineering issues   vol 2015 - no 2 - paper1International journal of engineering issues   vol 2015 - no 2 - paper1
International journal of engineering issues vol 2015 - no 2 - paper1
 
Artificial Intelligence Introduction Chapter 1, AIMA
Artificial Intelligence Introduction Chapter 1, AIMAArtificial Intelligence Introduction Chapter 1, AIMA
Artificial Intelligence Introduction Chapter 1, AIMA
 
GamePlaying.ppt
GamePlaying.pptGamePlaying.ppt
GamePlaying.ppt
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
cai
caicai
cai
 
chess-180927202627.pdf
chess-180927202627.pdfchess-180927202627.pdf
chess-180927202627.pdf
 
The History Of Video Games
The History Of Video GamesThe History Of Video Games
The History Of Video Games
 
Recursion - Computer Algorithms
Recursion - Computer AlgorithmsRecursion - Computer Algorithms
Recursion - Computer Algorithms
 
AI Lecture 5 (game playing)
AI Lecture 5 (game playing)AI Lecture 5 (game playing)
AI Lecture 5 (game playing)
 
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...
AI Supremacy in Games: Deep Blue, Watson, Cepheus, AlphaGo, DeepStack and Ten...
 
M6 game
M6 gameM6 game
M6 game
 
Games
GamesGames
Games
 
AUTHOR SIAFA B. NEAL 5 STARS (1)
AUTHOR SIAFA B. NEAL  5 STARS (1)AUTHOR SIAFA B. NEAL  5 STARS (1)
AUTHOR SIAFA B. NEAL 5 STARS (1)
 
Artificial intelligence - python
Artificial intelligence - pythonArtificial intelligence - python
Artificial intelligence - python
 
A Development of Log-based Game AI using Deep Learning
A Development of Log-based Game AI using Deep LearningA Development of Log-based Game AI using Deep Learning
A Development of Log-based Game AI using Deep Learning
 
Quiz of begginers 120 questions Chess
Quiz of begginers 120 questions ChessQuiz of begginers 120 questions Chess
Quiz of begginers 120 questions Chess
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)
Introduction to Game Programming: Using C# and Unity 3D - Chapter 6 (Preview)
 

Introducing ofcomputerchess

  • 1. o History o Implementation
  • 2. 1) Claude E. Shannon (1949) Programming a Computer for Playing Chess. In: Philosophical Magazine, Ser.7, Vol. 41, No. 314 - March 1950. 2) T.A. Marsland (1992) Computer Chess and Search. Encyclopedia of Artificial Intelligence, S.C. Shapiro (ed), pp. 224r- 241, Wiley & Sons, 2nd ed. 1992, ISBN 0471-50305-3. 3) Ernst A. Heinz (1997) How DarkThought Plays Chess, ICC A Journal 20(3), pp. 166-176, Sept. 1997. 4) John L. Jerz (2009) A Proposed Heuristic for a Computer Chess Program 5) Computer History Museum, Mastering the Game – A History of Computer Chess, http://www.computerhistory.org/chess/ 6) Wikipedia, accessed November 2009
  • 4. In 1769 the Hungarian engineer Baron Wolfgang von Kempelen built a chess playing machine for the amusement of the Austrian Queen Maria Theresia. It was a purely mechanical device, shaped like a Turk. Naturally its outstanding playing strength was supplied by a chess master cleverly hidden inside the device. The machine was a fake.
  • 5.
  • 6. In 1914 Torres y Quevedo constructed a device which played an end game of king and rook against king (Vigneron, 1914). The machine played the side with king and rook and would force checkmate in few moves however its human opponent played. Since an explicit set of rules can be given for making satisfactory moves in such an end game, the problem is relatively simple, but the idea was quite advanced for that period.
  • 7. Gonzales Torres y Quevedo demonstrating the chess automaton to Norbert Wiener in 1951
  • 8. In 1947, Turing designed the first program to play chess and tested it with paper and pencil using himself as the computer
  • 9. “Although perhaps of no practical importance, the question is of theoretical interest, and it is hoped that a satisfactory solution of this problem will act as a wedge in attacking other problems of a similar nature and of greater significance..” „Programming a Computer for Playing Chess”
  • 10. Dr. Dietrich Prinz in England wrote the first limited chess program in 1951. Alex Bernstein, an experienced chess player and a programmer at IBM, wrote a program in 1958 that could play a full chess game (although it could be defeated by novice players).
  • 11. ●W 1968 roku David Levy założył się o 1,250 funtów, że w ciągu 10 lat żaden komputer nie będzie w stanie go pokonać. W 1978 wygrał ten zakład pokonując najszybszy w tym czasie program Chess 4.7
  • 12. 1983 US Master rating in - $5000 goes to Ken Thompson and Joe Condon, when their Belle ● $10,000 for the first program to achieve a USCF 2500 rating (players who attain this rating may reasonably aspire to becoming Grandmasters) was awarded to Deep Thought in August 1989 ● $100,000 for attaining world-champion status remains unclaimed.
  • 13. In 1977 at Bell Laboratories, Ken Thompson and Joe Condon took the brute force approach one step further by developing a custom chess-playing computer called Belle. By 1980 it included highly specialized circuitry that contained a “move generator” and “board evaluator,” allowing the computer to examine 160,000 positions per second. This approach was so effective that in 1982 at the North American Computer Chess Championships (NACCC), this $17000 chess machine beat the Cray Blitz program running on a million supercomputer.
  • 14. W 1989 programy były wciąż za słabe aby pokonać mistrzów świata. Garry Kasparov bez ● problemu pokonuje wszystkie. W 1996 Deep Blue pokonuje Kasparova (1 z 6 gier) ● „The Association for Computing Machinery (ACM), the first society in computing, announces a six game match between World Chess Champion Garry Kasparov and the top-rated chess program DEEP BLUE. A $500,000 prize fund has been established for the match to be held in Philadelphia, Pa., USA, Feb. 10- 17, 1996, as part of ACM's year long 50th Anniversary Celebration which begins with the ACM Computing Week '96 conference. The winner will receive $400,000 with the remaining $100,000 going to the loser.”
  • 15.
  • 16.
  • 17.
  • 19. Evaluating Function: 1) The relative values of queen, rook, bishop, knight and pawn are about 9, 5, 3, 3, 1, respectively. 2) Rooks should be placed on open files. This is part of a more general principle that the side with the greater mobility, other things equal, has the better game. 3) Backward, isolated and doubled pawns are weak. 4) An exposed king is a weakness (until the end game). f(P) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + (P-P') – 0.5(D-D'+S-S'+I-I') + 0.1(M-M') + ... K,Q,R,B,B,P are the number of White kings, queens, rooks, bishops, knights and pawns on the board. D,S,I are doubled, backward and isolated White pawns. Weakness – ie. exchange of queens
  • 20. ”Type A” strategy considered all possible moves to a fixed depth. A world champion can construct (at best) combinations say, 15 or 20 moves deep. Some variations given by Alekhine ("My Best Games of Chess 1924-1937") are of this length. Let M_1, M_2, M_3, ..., M_s be the moves that can be made in position P and let M_1P, M_2P, etc. denote symbolically the resulting positions when M_1, M_2, etc. are applied to P. Then one chooses the M_m which maximizes f(M_mP). A deeper strategy would consider the opponent's replies which are minimized...
  • 21. “Type B” strategy used chess knowledge to explore the more promising lines to a greater depth. 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. A crude definition might be: ● 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 Using this function, variations could be explored until g(P)=0, always, however, going at least two moves and never more, say, 10.
  • 22. (...) the machine once designed would always make the same move in the same position. If the opponent made the same moves this would always lead to the same game. (...) the opening is another place where statistical variation can be introduced. It would seem desirable to have a number of the standard openings stored in a slow-sped memory in the machine. Perhaps a few hundred would be satisfactory. (...) program based on "type position" could not be constructed. (...). Although there are various books analysing combination play and the middle game, they are written for human consumption, not for computing machines. (...)To program such a strategy we might suppose that any position in the machine is accompanied by a rather elaborate analysis of the tactical structure of the position suitably encoded. This analytical data will state that, for example, the Black knight at f6 is pinned by a bishop, that the White rook at e1 cannot leave the back rank because of a threatened mate on c1, that a White knight at a4 has no move, etc.; - These data would be supplied by a program and would be continually changed and kept up-to-date as the game progressed.
  • 23. 1) Board description and move generation 2) Tree searching/pruning 3) Position evaluation
  • 25. Opening Books: a listing of known good move sequences that can be used at the beginning of a chess game. Endgame Databases: a catalog of previously analyzed board configurations near the end of a chess game that allows the program to play the remaining moves of the game flawlessly.
  • 26. A way to quickly check a catalog of positions already examined, which cuts down the number of positions that must be searched. 12 different piece types {K,Q,R,B,N,P,–K ... –P} on a 64-square board. Thus a set of 12*64 unique integers (plus a few more for en passant and castling privileges), {Ri }, may be used to represent all the possible piece/square combinations. Zobrist (1970) Pawn hash table - similar technique can be used to store an evaluation of the pawn structures in a position. Since the number of pawn positions examined is generally much smaller than the total number of positions searched, the pawn hash table has a very high hit rate, allowing a program to spend more time on sophisticated pawn evaluations because they are reused many times.
  • 27. A model chess program has three phases to its search: 1) Typically, from the root node an exhaustive examination of layers of moves occurs, 2) This is followed by a phase of selective searches up to a limiting depth (the horizon). 3) An evaluation function is applied at the frontier nodes to assess the material balance and the structural properties of the position (e.g., relative placement of pawns). To aid in this assessment a third phase is used, a variable depth quiescence search of those moves that are not dead (i.e., cannot be accurately assessed).
  • 28.
  • 29. (..., Pb2; Bxb2, Pc3; Bxc3, Pd4; Bxd4, Pe5; Bxe5)
  • 30. Alpha-Beta searcher with enhancements like: ● aggressive futility pruning [19, 31], ● internal iterative deepening [3, 33], * ● dynamic move ordering (history+ killer heuristic) [2, 16, 30, 32, 35], * ● recursive null-move pruning [7, 15, 17], * ● selective extensions [3, 6], ● interior-node recognizers [18, 34], On average, all enhancements taken together reduce the effective branching factor of DARKTHOUGHT to 2-3 and its search-tree size to roughly 55% of that of the according minimal tree [21]. These observations are consistent with reports by other researchers [6, 38],
  • 31. Iterative Deepening: a technique that gradually increases the depth of the search tree (the number of moves and counter-moves) that is examined, rather than searching to a fixed depth. This allows the most efficient use of the limited time each player is given to choose a move.
  • 32.
  • 33. DarkThought implements a standard node-expansion procedure whose structure probably does not differ much from that of other chess programs: • extension decisions related to incoming move (U), • internal iterative deepening (U), * • transposition-table lookup (L/U), * • interior-node recognizer decision (L/U), • endgame database lookup (L/U), * • null-move search with deep extension decision (U), * • single-reply extension decision (U), • futility pruning decision (F/L), • static evaluation (F/L), • search of all outgoing moves (L/U). 1. hashed move from transposition table (L/U), * 2. capture moves in MVV/LVA order (L/U), (most valuable victim / least valuable aggressor) 3. killer moves (U), * 4. history moves (U), * 5. statically presorted remaining moves (U). F means "frontier" (depth = 1), L "lower part" (depth < 0), and U "upper part" (depth > 1)
  • 34. .. produce a cutoff by assuming that a move that produced a cutoff in another branch at the same depth is likely to produce a cutoff in the present position, that is to say that a move that was a very good move from a different (but possibly similar) position might also be a good move in the present position. By trying the killer move before other moves, a game playing program can often produce an early cutoff, saving itself the effort of considering or even generating all legal moves from a position. A generalization of the killer heuristic is the history heuristic. The history heuristic can be implemented as a table that is indexed by some characteristic of the move, for example "from" and "to" squares or piece moving and the "to" square. When there is a cutoff, the appropriate entry in the table is incremented, such as by adding d² or 2d where d is the current search depth. This information is used when ordering moves.
  • 35. current position is so good for the side to move that best play by the other side would have avoided it. The faster the program produces cutoffs, the faster the search runs. The null-move heuristic is designed to guess cutoffs with less effort than would otherwise be required, whilst retaining a reasonable level of accuracy. The null-move heuristic is based on the fact that most reasonable chess moves improve the position for the side that played them. So, if the player whose turn it is to move can forfeit the right to move (or make a "null move" - an illegal action in chess) and still have a position strong enough to produce a cutoff, then the current position would almost certainly produce a cutoff if the current player actually moved.
  • 36. • Material-balance scoring, • evaluation flitihty-pruning decision, • Pawn-structure scoring (H), • Pawn-related King scoring (H), • race scoring of passed Pawns, • PST piece-placement scoring, • positional futility-pruning decision, • flirt her positional scoring (H). For all steps marked with an H, the evaluation infrastructure automatically hashes the computed scores.
  • 37.
  • 39.
  • 40.  Thank you!