Skip to content

A flexible and high-efficient C++ chessboard library for move generation, bitboard manipulation, and game state management.

Notifications You must be signed in to change notification settings

Omikrone/Chessboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chess Board - Optimized C++ Chess Game

Introduction

  • Current version: 1.4.0

This project is a simple chess game implementation in C++, optimized for performance with bitboards. It is intended to be the main library of the (chess game)[https://github.com/Omikrone/Chessgame], and the chess engine (Euphron)[https://github.com/Omikrone/Euphron]. It is designed to be as fast as possible, and has achieved the following performance metrics compared to a naive implementation (the old one):

  • Move generation and application: ~60 microseconds (naive: ~2000 microseconds)

Features

This chess game includes the following features:

  • Basic chess rules implemented.
  • Move generation and application using bitboards for efficiency.
  • FEN conversion for easy game state representation.
  • A public API for compatibility with other chess engines and interfaces.
  • Cancellation of moves for chess engine implementations.

Installation

This project is compatible with Windows and Linux, and requires CMake for building.

Prerequisites

Make sure you have the following dependencies installed:

Building the Project

  1. Clone the repository:
    git clone https://github.com/Omikrone/Chessboard.git
    cd Chessboard
  1. Build the Chessboard library using CMake:
    cmake -S . -B build
    cd build && cmake --build . --config Release

Adding the library to the chessgame project

Follow the steps described in the chessgame repository to integrate the Chessboard library.

Future Improvements

Future improvements for this project will include:

  • Fixing the issue of non-detection of stale mate.
  • Adding zobrist hashing for detecting threefold repetition and other advanced rules.
  • Optimizing the move generation further.

About

A flexible and high-efficient C++ chessboard library for move generation, bitboard manipulation, and game state management.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published