Appalachian State University
Browse

Chess Move Generation Using Bitboards

Download (2.01 MB)
thesis
posted on 2025-08-08, 15:27 authored by Sophie Elyse Columbia
Chess has been a subject of study in artificial intelligence for many decades, and chess agent programs have contributed to many theoretical ideas in the field. It was thought in the early 1960s that no computer would be able to play as well as a human. This idea was squashed when the computer program Deep Blue beat the world chess champion, Gary Kasparov, in 1997. Today, chess engines have surpassed all human abilities. Many readily available resources for those interested in building their own chess engines are difficult to follow. They tend to either present information in a maze-like fashion or do not provide intuitive explanations for complex functions. This thesis aims to provide an accessible guide to move generation – the first step in building a chess engine that is the basis for all search functions. To make move generation as efficient as possible, we use bitboards as our selected board representation. We capture the state of the board using multiple sequences of 64 bits, where each bit is mapped to a square on the chess board. Remarkably, bitwise operations on these bitboards can generate all possible moves for a given position quickly. This project also details a rigorous testing approach using crowdsourcing. To encourage interaction from chess experts, we create a user-friendly GUI that allows users to input moves in a game-like fashion. By explaining our approach to move generation and accuracy testing, we hope to provide a useful resource for those wishing to write their own chess engine.

History

AI-Assisted

  • No

Year Created

2023

College or School

  • The Honors College

Language

English

Access Rights

  • Open

Program of Study

Computer Science

Advisor

Raghuveer Mohan

Dissertation or Thesis Type

  • Undergraduate Honors Thesis

Usage metrics

    Dissertations & Theses

    Categories

    No categories selected

    Exports

    RefWorks
    BibTeX
    Ref. manager
    Endnote
    DataCite
    NLM
    DC