top of page
Chess
My process making a chess engine with bitboards
Creating a Chess AI Part 3: Move Ordering
Here you can learn how to improve the efficience of alpha-beta pruning
Sam Lench
Jun 2


Creating a Chess AI Part 2: Searching
NegaMax At the center of every chess engine is a search algorithm. This is the bit that actually looks ahead at future positions and decides which move is the best. One of the simplest, and most commonly used algorithms for this is NegaMax. This is just a cleaner way of writing MiniMax, which you may have already heard of. What is NegaMax? NegaMax is a varient of MiniMax. Instead of using a min player and a max player, it just flips the score for the opposing player using a n
Sam Lench
May 15


Creating a Chess AI Part 1: Evaluation
Learn an efficient solution to one of the most important part of a chess engine.
Sam Lench
May 14


Piece Movement Part 4: Special Moves
Now that we are using A Better Way to Represent Chess Moves, with 16-bits, lets use this to generate the special moves. Using that way of move encode is essential to the way I do things as we will use the MoveFlags to help us here. Castling Castling is a unique move because is means moving two pieces, the king and the rook, at the same time. To do this, we only need to store the kings MoveFlag as castling and then account for moving the rook aswell inside of the engines move
Sam Lench
Feb 26


A Better Way to Represent Chess Moves
A more efficient way to represent chess moves.
Sam Lench
Feb 26


Piece Movement Part 3: Pseudo-Legal Move Generation
Finally learn how to move pieces!
Sam Lench
Jan 12


Piece Movement Part 2: Magic Bitboards
This post goes over how to efficiently move the Rook, Bishop, and the Queen.
Sam Lench
Dec 23, 2025


Piece Movement Part 1: Lookup Tables
Learn how to move pieces efficiently using chess bitboards and lookup tables.
Sam Lench
Dec 22, 2025


Representing a Chess Board Using Bitboards
Learn what a bitboard is, why they are useful, and how to use one with this detailed tutorial.
Sam Lench
Dec 22, 2025


bottom of page