Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How Stockfish Thinks

iamjarret
June 24, 2015
250

How Stockfish Thinks

NM Alexander King and Jarret Petrillo detail Stockfish's heuristics and shortcomings for the enthusiastic chess player with an interest in computer analysis. Presented June 23rd, 2015 at the Marshall Chess Club.

iamjarret

June 24, 2015
Tweet

Transcript

  1. How Stockfish Thinks An Introduction to Computer Chess Programming June

    23rd, 2015 NM Alexander King and Jarret Petrillo
  2. Overview What is stockfish? an overview of the code base

    Heuristics and Mechanics What it does and how it does it The profound 1
  3. 7,800 lines of code Chess specific heuristics: 2,400 lines Position

    representation: 1,800 lines Search representation: 2,400 lines Other: 1,200 lines 2
  4. How it does it 64 bit computing processing Sparse position

    representation Transpositional tables 3
  5. Evaluating Material Different values in the (middlegame, endgame) Pawn: (1,

    1) Knight: (4.1, 3.3) Bishop: (4.2, 3.3) Rook: (6.4, 5) Queen: (12.7, 9.9) 5
  6. King Safety Is there a possible pawn storm? Are any

    pieces able to attack a safety square? Are any of these attacking squares only defended by the king? Can a rook or queen give check from one of these squares? Are there checks possible from outside this zone? 10
  7. Mobility Initially each piece is valued based on the number

    of squares it can attack Then specific adjustments are added/subtracted Rook in endgame has largest bonus if it's able to attack 9 or more squares 11
  8. Outposts Outpost score different for each outpost square Bonus if

    supported by pawn (+1/2 bonus) Bonus if opponent is not able to trade for the outpost piece (+1 bonus) 12
  9. Space A count of key safe squares is used to

    improve opening play. Count is weighted by a function of knight and bishop values. 15
  10. Pawns Double pawns on any file equal in the endgame

    Ine the middlegame doubled pawns on the 'a' and 'h' files are half as bad. 16