Skip to content
/ surge Public
forked from nkarve/surge

A fast bitboard-based chess move generator in C++

License

Notifications You must be signed in to change notification settings

schubc/surge

This branch is up to date with nkarve/surge:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

184e59f · Jun 18, 2022

History

28 Commits
Jun 18, 2022
Feb 14, 2020
Feb 23, 2020
Feb 15, 2020

Repository files navigation

surge

A fast bitboard-based legal chess move generator, written in C++

Features:

  • Magic Bitboard sliding attacks and pre-generated attack tables
  • Make-Unmake position class
  • 16-bit Move representation
  • Extremely fast bulk-counted perft (over 180,000,000 NPS, single-threaded, without hashtable)
  • Simple design for use in any chess engine

perft(6) from starting position:

perft(6)

Getting Started:

#include "position.h"
#include "tables.h"
#include "types.h"

int main() {
    initialise_all_databases();
    zobrist::initialise_zobrist_keys();
	
    Position p;
    Position::set("rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq -", p);
    std::cout << p; 
  
    MoveList<WHITE> list(p)
  
    for(Move m : list) {
        std::cout << m << "\n";
    }
    
    return 0;
}

About

A fast bitboard-based chess move generator in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%