Skip to content

fmoeran/chess.cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

chess.cpp

A chess engine built in C++. Its current main strength is its speed in move generation.

Running main.cpp results in a game against the engine's bot:

image

Perft results

Running perft.cpp runs the engine on a number of perft tests. My computer gives these results:

0.071s 68,529,704 n/s PASSED
0.039s 104,759,051 n/s PASSED
0.169s 65,266,763 n/s PASSED
0.179s 88,454,145 n/s PASSED
0.879s 102,322,177 n/s PASSED

With a maximum of above 100 million nodes found per second.

Features

  • Compact 16 bit representation of moves.
  • 64 bit "bitboards" for pieces.
  • Magic bitboard algorithm for mvoe genetration.
  • Mini(Nega)max and quiescence search algorithms.
  • Alpha-beta pruning.
  • Zobrist board hashing.
  • Transposition table.
  • Move ordering.
  • Iterative deepening.

About

A fast chess engine built in C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published