Laser, a UCI-compliant chess engine.
C++ C Makefile
Latest commit 33827fd Jan 17, 2017 @jeffreyan11 Tune king-pawn tropism.
1410-1283-1307 in 4000 games at 3+0.02 (+11)
1302-1142-1556 in 4000 games at 15+0.05 (+14)
Permalink
Failed to load latest commit information.
syzygy Remove leftover debug output from TB probing code. Dec 24, 2016
.gitignore Added a gitignore file. Jun 20, 2016
COPYING Added GNU General Public License. Changed name to Laser. Increased ve… Aug 18, 2015
Makefile Probe Syzygy TBs in search. Bugfixes in probing code. Dec 24, 2016
README.md Update README. Dec 31, 2016
bbinit.cpp Move all constants in btables.h into either eval.h or bbinit.h. Sep 8, 2016
bbinit.h Begin adding Syzygy tablebase support. Dec 23, 2016
board.cpp Tune king-pawn tropism. Jan 17, 2017
board.h Minor SEE and related changes. Dec 25, 2016
common.cpp Use uint64_t rather than double to represent time in milliseconds. Sep 8, 2016
common.h Begin adding Syzygy tablebase support. Dec 23, 2016
eval.h Tune king-pawn tropism. Jan 17, 2017
evalhash.cpp Use power of 2 sizes for hashtable. Aug 12, 2016
evalhash.h Use helper functions to initialize hashtables. Aug 12, 2016
hash.cpp Revert previous commit. Aug 20, 2016
hash.h Revert previous commit. Aug 20, 2016
moveorder.cpp Add some pruning to PV nodes, reduce the amount of IID done at PV nodes. Jan 10, 2017
moveorder.h Remove unused isInCheck parameter from MoveOrder. Dec 27, 2016
search.cpp More aggressive NMR. Jan 11, 2017
search.h Use static eval improvement over 2 plies to make pruning decisions (i… Dec 27, 2016
searchparams.h Remove all trailing spaces Aug 20, 2016
uci.cpp Increase version to 1.4 beta. Jan 8, 2017
uci.h Add a boardToFEN function. Oct 22, 2016

README.md

Laser

Laser is a UCI-compliant chess engine written in C++11 by Jeffrey An and Michael An.

For the latest release and previous versions, check https://github.com/jeffreyan11/uci-chess-engine/releases. Compiled binaries for 64-bit Windows are included.

After being compiled, the executable can be run with any UCI chess GUI, such as Arena (http://www.playwitharena.com/) or Tarrasch (http://www.triplehappy.com/).

Thanks To:

  • The Chess Programming Wiki, which is a great resource for beginning chess programmers, and was consulted frequently for this project: https://chessprogramming.wikispaces.com
  • The authors of Stockfish, Crafty, EXChess, Rebel, Texel, and all other open-source engines for providing inspiration and great ideas to move Laser forward
  • The engine testers, for uncovering bugs, providing high quality games and ratings, and giving us motivation to improve
  • Cute Chess, the primary tool used for testing: (http://cutechess.com/)

To Dos

  • Enumerate or typedef basic values such as color, piece type, and scores
  • Chess960 support
  • Improved pruning rules
  • More efficient PERFT and eval

Engine Strength

CCRL 40/40

Laser 1.2: 57th, 2868 elo as of Oct 22, 2016

CCRL 40/4

Laser 1.2: 54th, 2873 elo as of Oct 22, 2016

CEGT Blitz - Best Single Versions

Laser 1.2: 59th, 2702 elo as of Oct 16, 2016

Implementation Details

  • Lazy SMP up to 128 threads
  • Fancy magic bitboards for a 4.5 sec PERFT 6 @2.2 GHz (no bulk counting).
  • Evaluation
    • Tuned with reinforcement learning, coordinate descent, and a variation of Texel's Tuning Method
    • Piece square tables
    • King safety, pawns shields and storms
    • Isolated/doubled/passed/backwards pawns
    • Mobility
    • Outposts
    • Basic threat detection and pressure on weak pieces
  • A two-bucket transposition table with Zobrist hashing, 16 MB default size
  • An evaluation cache
  • Syzygy tablebase support
  • Fail-soft principal variation search
    • Adaptive null move pruning, late move reduction
    • Futility pruning, razoring, move count based pruning (late move pruning)
    • Check and singular extensions
  • Quiescence search with captures, queen promotions, and checks on the first two plies
  • Move ordering
    • Internal iterative deepening when a hash move is not available
    • Static exchange evaluation (SEE) and Most Valuable Victim / Least Valuable Attacker (MVV/LVA) to order captures
    • Killer and history heuristics to order quiet moves

Notes

The code and Makefile support gcc on Linux and MinGW on Windows for Intel Nehalem (2008-2010) and later processors only (due to popcnt instruction support). For older or 32-bit systems, set the preprocessor flag USE_INLINE_ASM in common.h to false.