Cinnamon 2.3

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Graham Banks
Posts: 41419
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Cinnamon 2.3

Post by Graham Banks »

http://cinnamonchess.altervista.org/

Chess 960
Killer heuristics
Improved move ordering
Improved Gaviota Tablebase search
Syzygy Tablebases
BMI2 Instructions
Bug fix in enpassant
Bug fix parallel perft

Thanks to the engine author, Giuseppe Cannella. :)
gbanksnz at gmail.com
Gabor Szots
Posts: 1362
Joined: Sat Jul 21, 2018 7:43 am
Location: Szentendre, Hungary
Full name: Gabor Szots

Re: Cinnamon 2.3

Post by Gabor Szots »

Very good news, thanks for sharing.
Gabor Szots
CCRL testing group
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Cinnamon 2.3

Post by Gerd Isenberg »

Thanks! Some details on BMI2 instructions would be nice.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Cinnamon 2.3

Post by Gerd Isenberg »

Gerd Isenberg wrote: Mon Oct 19, 2020 1:45 pm Thanks! Some details on BMI2 instructions would be nice.
PEXT - for linewise (rank, files, diagonal, antidiagonal) sliding piece attacks, arrays indexed by square and 8-bit occupied index per line, thus the author can safe some memory space considering inner six squares only.

Code: Select all

//Bitboard.cpp
u64 Bitboard::BITBOARD_DIAGONAL[64][256];
u64 Bitboard::BITBOARD_ANTIDIAGONAL[64][256];
u64 Bitboard::BITBOARD_FILE[64][256];
u64 Bitboard::BITBOARD_RANK[64][256];

//Bitboard.h
BITBOARD_DIAGONAL[position][diagonalIdx(position, allpieces)] ...

#ifdef USE_BMI2
...
   static uchar diagonalIdx(const int position, const u64 allpieces) {
        return _pext_u64(allpieces, DIAGONAL[position]);
    }
#endif
User avatar
CMCanavessi
Posts: 1142
Joined: Thu Dec 28, 2017 4:06 pm
Location: Argentina

Re: Cinnamon 2.3

Post by CMCanavessi »

Any idea of improvement in terms of elo?
Follow my tournament and some Leela gauntlets live at http://twitch.tv/ccls
geko
Posts: 36
Joined: Fri Sep 06, 2013 11:20 am
Location: Italy
Full name: Giuseppe Cannella

Re: Cinnamon 2.3

Post by geko »

Hi all I'm the author, the gain in terms of elo is almost zero at least for Cinnamon, the advantage is that the code is shorter.
Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Cinnamon 2.3

Post by Gerd Isenberg »

geko wrote: Mon Oct 19, 2020 5:41 pm Hi all I'm the author, the gain in terms of elo is almost zero at least for Cinnamon, the advantage is that the code is shorter.
Yep, and/mul/shr is not so much slower than pext. However, you may divide the table space by 4 using only 128 Kib lookup rather than 512 without more computation. Because of the outer squares are not relevant for the attack set.

Code: Select all

u64 Bitboard::BITBOARD_DIAGONAL[64][64 /* rather than 256 */];
In terms of Elo it might be almost zero as well, but sometimes using less memory pays off.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Cinnamon 2.3

Post by Roland Chastain »

Graham Banks wrote: Mon Oct 19, 2020 11:38 am Chess 960
Good new! Glad to know that there is one more engine playing FRC.

I have made a quick test, a tournament with CuteChess. It seems that there are things to fix. When you switch to FRC, there are always things to fix. :)

I didn't have time to investigate, just copied the games in a PGN file. Hope this can help.

games.zip
Qui trop embrasse mal étreint.
User avatar
Roland Chastain
Posts: 640
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: Cinnamon 2.3

Post by Roland Chastain »

I made another test, running CuteChess with -debug option.

Here is a command on which Cinnamon disconnects:

Code: Select all

25689 >Cinnamon 2.3(0): position fen qnrnbkrb/pppppppp/8/8/8/8/PPPPPPPP/QNRNBKRB w GCgc - 0 1 moves g2g3 f8g8 d1e3 e7e6 d2d4 f7f5 d4d5 b8a6 e1c3 c7c6 d5e6 d8e6 e3f5 f8f5
25689 >Cinnamon 2.3(0): isready
25689 <Cinnamon 2.3(0): fenStr: f8f5 from: 58
25689 <Cinnamon 2.3(0): Tue Oct 20 07:19:32 2020 ********************************** assert error in GenMoves.cpp:539  **********************************
Terminating process of engine Cinnamon 2.3(0)
Here is the PGN file:
cinnamon23-disconnects-4.zip
Qui trop embrasse mal étreint.
geko
Posts: 36
Joined: Fri Sep 06, 2013 11:20 am
Location: Italy
Full name: Giuseppe Cannella

Re: Cinnamon 2.3

Post by geko »

ops there is a bug in chess960 :cry: I've moved the web page here http://cinnamonchess.altervista.org/index_2.3.php until the fix.
Gerd I'll check into 'The Outer Squares'

thanks
Giuseppe