GithubHelp home page GithubHelp logo

rouhi1 / peacekeeper Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sazgr/peacekeeper

0.0 0.0 0.0 36.94 MB

Strong UCI Chess Engine written in C++17 (Not C, GitHub!!!)

License: GNU General Public License v3.0

C++ 38.81% C 61.11% Makefile 0.08%

peacekeeper's Introduction

Logo

Solitudinem faciunt, pacem appellant
They make a desert and call it peace
- Tacitus

Peacekeeper

A fairly strong and probably superhuman UCI Chess Engine, written in C++17.

Achieved top 100 in CCRL Blitz and CCRL 40/15 with hand crafted evaluation (HCE).

Engine Issues

Issues on github can be created for any bugs, other issues found, or questions.

Compilation

Peacekeeper can be compiled from source with GNU C++ or Clang with g++ -Ofast -DNDEBUG -march=native -o peacekeeper src/*.cpp MSVC intrinsics are supported as well as C++20 bit intrinsics, so the engine can in theory be compiled on a large range of compilers.

Windows (and formerly linux) executables are provided for each release in the Releases section.

Ratings

* denotes a version which has not been tested on that rating list and does not have a rating.

Ratings prefixed with ~ have large error margins because of few games played.

Note that ratings from different rating lists are not comparable to each other.

Version CCRL Blitz CCRL 40/15 CCRL FRC CEGT 40/4
v1.10 2385 2346 * *
v1.20 2510 2449 * *
v1.30 2600 2594 * *
v1.40 2697 2694 * *
v1.50 2789 2769 * *
v1.60 3043 3012 * 2871
v1.7x 3094 3049 2996 2930
v2.00 * 3276 3530 3195
v2.10 3393 3333 3600 *
v2.20 3470 3386 3687 *

Features

This is a list of features I have implemented so far in Peacekeeper. It may be incomplete or outdated at times.

  • Board Representation and Move Generation
    • Bitboard-based
    • Redundant Mailbox Board
    • Make-Unmake
    • Fixed-shift Fancy Magic Bitboards for slider move generation
    • Fully legal move generation
    • Supports Fischer Random Chess (FRC) and Double Fischer Random Chess (DFRC)
  • Search
    • Supports LazySMP, can use up to 256 threads in parallel
    • Negamax framework
    • Principal Variation Search (PVS)
    • Quiescence Search (QS)
      • QS SEE Pruning
    • Iterative Deepening
      • Aspiration Windows
    • Staged Move Generation
      • Hash move
      • Captures
      • Quiets
    • Time Management
      • Soft and Hard Bounds
      • More time for unstable bestmoves
    • Transposition Table
      • Incrementally updated Zobrist hash
      • Used in both QS and PVS
    • Selectivity
      • Check Extensions
      • Static Null Move Pruning/Reverse Futility Pruning (SNMP/RFP)
      • Null Move Pruning (NMP)
      • Late Move Reductions (LMR)
      • Late Move Pruning (LMP)
      • Futility Pruning
      • SEE Pruning
      • Internal Iterative Reductions (IIR)
    • Move Ordering
      • MVV-LVA for captures
      • Killer Heuristic
      • History Heuristic for quiet moves
      • Continuation and Countermoves History
  • Evaluation
    • Efficiently Updatable Neural Network (NNUE)
      • Used in version 2.00 and after
      • Tuned using modified version of Slender's Carbon trainer
      • 768->512x2->1 architecture
        • Clipped ReLU (CReLU) activation function
        • Perspective network
      • Trained on selfplay DFRC data
    • Hand-Crafted
      • Used in version 1.71 and before
      • Texel Tuned using Gradient Descent tuner
        • ADAM algorithm
      • King-Relative Piece Square Tables
      • Pawn structure
        • Passed Pawns
        • Free Passed Pawns
        • Doubled Pawns
        • Isolated Pawns
        • Supported Pawns
        • Pawn Phalanxes
      • Mobility
        • Regular mobility
        • Forward mobility
      • Bishop Pair
      • Open and Semi-Open Files
      • Tapered Eval
      • Tempo Bonus
        • Phase dependent
      • Contempt
        • Phase dependent

Credits & Thanks

In no particular order.

  • Pradu Kannan for magic multipliers
  • CPW (and Sungorus) for zobrist hash pseudorandom number generator
  • The Chess Programming Wiki for being a great resource for everything related to chess programming
  • The Talkchess forum and the people on it for answering my more specific questions
  • The Engine Programming Discord and the people on it
  • Slender (@rafid-dev) especially for coinhabiting an OpenBench instance, contributing hardware mutually, and sharing SSS test results
  • @Witek902 for tons of hardware and hosting an OpenBench instance, and @gab8192
  • Andrew Zhuo (@StackFish5) for constantly looking over my code
  • @albert-wastakentoomuch, @ccao25 for help in generating data
  • PeSTO for starter piece square tables
  • Chess cache (Dusan Stamenkovic) and Graham from CCRL for logos
  • Some engines which I got inspiration from (in alphabetical order) along with their authors:
  • Rating list testers for testing my engine

peacekeeper's People

Contributors

sazgr avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.