/Charon

This is Charon - A chess engine under construction... 👷

Primary LanguageC++

Charon Perft

version: 08.11.2021 with support for pext, popcnt, and lsb
speed: 191-410 mnps

Stuff worth mentioning :

  • Charon derives from many open-source chess engines, including Stockfish and Leela.

  • Charon uses techniques from the Chess Programming Wiki and Hacker's Delight.

  • Charon is vanilla bulk-counted perft. No hashing. Strictly legal move generation.

  • This move generator is functional, but unfinished. The engine will always be a work in progress. Feedback and advice is always appreciated!

These are Charon's initial-position perft results !!!

(single-threaded, 1.6 ghz i5, strictly-legal moves only.)
  
     @@@    @@
   @@   @@  @@
  @@        @@ @@@      @@@@    @@ @@@      @@@@    @@ @@@
  @@        @@@   @@  @@   @@@  @@@   @@  @@    @@  @@@   @@
  @@        @@    @@  @@    @@  @@        @@    @@  @@    @@
   @@   @@  @@    @@  @@   @@@  @@        @@    @@  @@    @@
     @@@    @@    @@   @@@@ @@  @@          @@@@    @@    @@

~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~.


        .~* Charon Perft *~.

        *. by Ellie Moore .*

        Starting Position:

            H   G   F   E   D   C   B   A
          +---+---+---+---+---+---+---+---+
        1 | R | N | B | K | Q | B | N | R | 1
          +---+---+---+---+---+---+---+---+
        2 | P | P | P | P | P | P | P | P | 2
          +---+---+---+---+---+---+---+---+
        3 |   |   |   |   |   |   |   |   | 3
          +---+---+---+---+---+---+---+---+
        4 |   |   |   |   |   |   |   |   | 4
          +---+---+---+---+---+---+---+---+
        5 |   |   |   |   |   |   |   |   | 5
          +---+---+---+---+---+---+---+---+
        6 |   |   |   |   |   |   |   |   | 6
          +---+---+---+---+---+---+---+---+
        7 | p | p | p | p | p | p | p | p | 7
          +---+---+---+---+---+---+---+---+
        8 | r | n | b | k | q | b | n | r | 8
          +---+---+---+---+---+---+---+---+
            H   G   F   E   D   C   B   A


        perft(1) -   0.000 seconds -          20 nodes visited.
        perft(2) -   0.000 seconds -         400 nodes visited.
        perft(3) -   0.000 seconds -        8902 nodes visited.
        perft(4) -   0.000 seconds -      197281 nodes visited.
        perft(5) -   0.016 seconds -     4865609 nodes visited.
        perft(6) -   0.344 seconds -   119060324 nodes visited.
        perft(7) -   9.047 seconds -  3195901860 nodes visited.
        perft(8) - 249.016 seconds - 84998978956 nodes visited.
        
~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~._.~^*^~.
 

For comparison, QPerft by H.G. Muller does this on my computer:

(single-threaded, 1.6 ghz i5, strictly-legal moves only.)
 
          - - - - - - - - - - - -
          - - - - - - - - - - - -
          - - r n b q k b n r - -
          - - p p p p p p p p - -
          - - . . . . . . . . - -
          - - . . . . . . . . - -
          - - . . . . . . . . - -
          - - . . . . . . . . - -
          - - P P P P P P P P - -
          - - R N B Q K B N R - -
          - - - - - - - - - - - -
          - - - - - - - - - - - -

         Quick Perft by H.G. Muller
         Perft mode: No hashing, bulk counting in horizon nodes

         perft( 1)=           20 ( 0.000 sec)
         perft( 2)=          400 ( 0.000 sec)
         perft( 3)=         8902 ( 0.000 sec)
         perft( 4)=       197281 ( 0.000 sec)
         perft( 5)=      4865609 ( 0.031 sec)
         perft( 6)=    119060324 ( 0.625 sec)
         perft( 7)=   3195901860 (16.576 sec)
         perft( 8)=  84998978956 (441.816 sec)
 

Extra results (for science) !

Position Depth Node Count Charon (seconds) QPerft (seconds) Charon (mnps) QPerft (mnps)
KiwiPete 6 8031647685 20.766 41.636 401.5 192.9
3 8 3009794393 15.703 28.467 191.7 105.7
4 6 706045033 1.953 5.406 361.5 130.6
5 5 89941194 0.234 0.635 384.3 141.6
6 6 6923051137 16.859 24.300 410.6 284.9