𝔖 Scriptorium
✦   LIBER   ✦

πŸ“

How to Write a Bitboard Chess Engine: How Chess Programs Work

✍ Scribed by FM Bill Jordan


Year
2020
Tongue
English
Category
Library

⬇  Acquire This Volume

No coin nor oath required. For personal study only.

✦ Synopsis


There are a number of reasons why you may be interested in how a chess program is written:

  • You are learning programming and interested in learning something different.
  • You are a programmer who is interesting in developing their programming experience.
  • You are a chess enthusiast and would like to improve your chess by learning how chess programs work.
  • You are interested in developing a chess program and playing against it.
  • You are interested in developing a chess program and having it play other engines.
  • You do need to be an expert programmer to understand this book. The code is written as simply as possible. The code is designed to be simple even for intermediate and even novice programmers.

If you are not a programmer, but interested in chess, this book may be of interest.

The book includes annotation of the source code for a complete chess engine the author has developed as a teaching tool. The complete source code is available at GitHub. The program can be compiled using a freely downloadable compiler. You can alter the code and see if you can make it stronger.

The program is a derivative of my program referred to in my earlier book How to Write a Chess Program, which did not use bitboards. The book explains how bitboards work and some of the many ways they can be useful in programming. The bitboard version runs considerably faster and is consequently stronger.

Alternatively you can simply download the exe file and run the program.

The engine is strong enough to beat most social players.

Features of the engine include:

  • The ability to load positions.
  • The ability to play in chess engine tournaments, with programs such as Arena.
  • Its very fast.
  • It displays the best line of play for both sides.
  • Detects checkmate.
  • Detects draws by repetition, 50 move rule, stalemate or reduction of material.

Evaluation
The engine evaluates elements of a position including:

  • Material.
  • Piece position.
  • King safety.
  • Pawn structure.
  • Passed pawns etc

Search
The engine uses a standard alpha-beta minimax search including:

  • Cut offs.
  • Move ordering.
  • History moves,
  • Hash tables.
  • Extensions.
  • Reductions.
  • Capture search.
    And much more…

My other books on computer chess are How to Write a Chess Program, The Joy of Chess Programming and Think Like a Computer.

✦ Subjects


chess


πŸ“œ SIMILAR VOLUMES


Chess for Educators: How to Organize and
✍ Karel van Delft πŸ“‚ Library πŸ“… 2021 πŸ› New in Chess 🌐 English

Chess has the rare quality that children love it despite the fact that it is good for them. Playing chess is just like life: you have to make plans, take decisions, be creative, deal with challenges, handle disappointments, interact with others and evaluate your actions. In this guide, psychologist

How to Choose a Chess Move (Batsford Che
✍ Andrew Soltis πŸ“‚ Library πŸ“… 2005 πŸ› Batsford 🌐 English

There are more than 30 moves to choose from in a typical chess position. Yet masters regularly manage to select the best one--and they do it faster, more confidently, and with less calculation than other players. The reason: masters know shortcuts that enable them to think more efficiently. Internat

How to Reassess Your Chess: Chess Master
✍ Jeremy Silman πŸ“‚ Library πŸ“… 2010 πŸ› Siles Press 🌐 English

How to Reassess Your Chess has long been considered a modern classic. This 4th edition takes Silman's groundbreaking concept of imbalances to a whole new level. Designed for players in the 1400 to 2100 rating range and for teachers looking for a ready-made chess curriculum, the author shares a mind-

How to Play Chess
✍ Dorling Kindersley πŸ“‚ Library πŸ“… 2016 πŸ› DK Publishing 🌐 English

<div><p>Suitable for beginning to intermediate players ages 8 and up, <em>How to Play Chess</em> uses computer-generated 3-D illustrations to bring the game to life, teaching kids everything from the strengths and weaknesses of individual pieces to more advanced strategies and techniques. </p><p>Au