Skip to content

Commit 87c8734

Browse files
committed
v2.4
1 parent 03711f7 commit 87c8734

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+23711
-5469
lines changed

README.md

Lines changed: 34 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,38 @@ Cinnamon
22
==========
33
### UCI Chess Engine
44

5-
- [Play on line](https://gekomad.github.io/Cinnamon/)
6-
75
Cinnamon is a chess program for Windows, Linux, Mac OS, Android and Raspberry Pi, is a console-based chess engine for use with [xboard][4], [Arena][5], [Tarrasch][6], [Droidfish][7] or any UCI-compatible GUI. Cinnamon is also a javascript library to play with [chessboardjs][8] or any js GUI.
86

7+
- [Play on line](https://gekomad.github.io/Cinnamon/)
8+
99
Version
1010
----------
11-
2.3.4
11+
2.4
1212

1313
News
1414
----------
15-
- Chess 960
16-
- Killer heuristics
17-
- Improved move ordering
18-
- Improved Gaviota Tablebase search
19-
- Syzygy Tablebases
20-
- BMI2 Instructions
21-
- Bug fix in enpassant
22-
- Bug fix parallel perft
15+
- Reverse Futility Pruning
16+
- Stalemate improvement
17+
- Trasposition Table improvement
18+
- Bug fix in castle
19+
- Bug fix in en passant
20+
- Speeded up Perft
21+
- Compilable with MS Visual Studio
2322

2423
Useful links
2524
----------
2625
- [Bitboard Calculator](https://gekomad.github.io/Cinnamon/BitboardCalculator/)
27-
- [C++ thread pool](https://github.com/gekomad/BlockingThreadPool)
2826
- [Auriga Distributed Perft](https://github.com/gekomad/Auriga)
2927
- [Web Eval debugger](https://github.com/gekomad/chess-engine-eval-debugger)
30-
- [Android App](https://play.google.com/store/apps/details?id=com.github.gekomad.cinnamonengine)
28+
- [Cinnamon on Android](https://play.google.com/store/apps/details?id=com.github.gekomad.cinnamonengine)
3129
- [Cinnamon on DGT Pi](https://www.digitalgametechnology.com/index.php/products/revelation-ii/533-dgt-pi-chess-computer-for-dgt-e-boards)
3230
- [Clion IDE](https://www.jetbrains.com/?from=CINNAMON_CHESS_ENGINE)
3331

3432

3533
Features
3634
----------
3735

36+
- [Elo ratings][3]
3837
- Available for both Unix, Windows, Mac, Android, ARM and Javascript
3938
- UCI protocol
4039
- GPL 3 License
@@ -44,6 +43,7 @@ Features
4443
- Rotated bitboards
4544
- Null moves
4645
- Futility pruning
46+
- Reverse Futility Pruning
4747
- Delta pruning
4848
- Razoring
4949
- Interruptible multithread Perft test [standard][9] and [chess960][10]
@@ -53,14 +53,12 @@ Features
5353
- Killer heuristics
5454
- Lazy evaluation
5555
- MVV/LVA
56-
- Two-tier Transposition Table
56+
- Transposition Table
5757
- Aspiration Windows
5858
- Late Move Reduction
5959
- Ponder
60-
- Open Book (Polyglot)
6160
- Gaviota Tablebases
6261
- Syzygy Tablebases
63-
- [Elo ratings][3]
6462

6563
Binaries
6664
----------
@@ -71,35 +69,45 @@ All files are compiled statically, no further libraries are necessary.
7169
Command line tools
7270
----------
7371
#### Perft
74-
`cinnamon -perft [-d depth] [-c nCpu] [-h hash size (mb) [-F dump file]] [-Chess960] [-f "fen position"] `
72+
`cinnamon.exe -perft [-d depth] [-c nCpu] [-h hash size (mb) [-F dump file]] [-Chess960] [-f "fen position"] `
7573

7674
Setting `-F` and `-h` you can stop (Ctrl-c) and restart the perft process.
7775

76+
7877
#### Gaviota DTM (distance to mate)
7978

80-
`cinnamon -dtm-gtb -f "fen position" -p path`
79+
`cinnamon.exe -dtm-gtb -f "fen position" -p path`
8180

8281
#### Gaviota WDL (win/draw/loss)
8382

84-
`cinnamon -wdl-gtb -f "fen position" -p path`
83+
`cinnamon.exe -wdl-gtb -f "fen position" -p path`
8584

8685
#### SYZYFY DTZ (distance to zero)
8786

88-
`cinnamon -dtz-syzygy -f "fen position" -p path`
87+
`cinnamon.exe -dtz-syzygy -f "fen position" -p path`
8988

9089
#### SYZYFY WDL (win/draw/loss)
9190

92-
`cinnamon -wdl-syzygy -f "fen position" -p path`
91+
`cinnamon.exe -wdl-syzygy -f "fen position" -p path`
9392

9493
#### EPD generator
95-
`cinnamon -puzzle_epd -t K?K?`
96-
example: `cinnamon -puzzle_epd -t KRKP`
94+
`cinnamon.exe -puzzle_epd -t K?K?`
95+
96+
example: `cinnamon.exe -puzzle_epd -t KRRKPN`
9797

9898
Compiling
9999
---------
100100

101-
Cinnamon requires C++11 or greater, use unique Makefile to compile for many architectures:
101+
Cinnamon requires C++11 or greater
102+
103+
- use MS Visual Studio (cinnamon.vcxproj)
102104

105+
- use cmake (CMakeLists.txt)
106+
107+
- use make - unique Makefile to compile for many architectures:
108+
109+
110+
```
103111
$ make
104112
105113
@@ -126,6 +134,7 @@ Cinnamon requires C++11 or greater, use unique Makefile to compile for many arch
126134
g++ is the default compiler, add COMP=yourcompiler to use another compiler
127135
example: make cinnamon64-modern-INTEL COMP=clang++
128136
137+
```
129138

130139
License
131140
-------
@@ -146,4 +155,4 @@ Cinnamon was written by Giuseppe Cannella at gmail dot com.
146155
[8]: https://chessboardjs.com
147156
[9]: https://gekomad.github.io/Cinnamon/perft.html
148157
[10]: https://www.chessprogramming.org/Chess960_Perft_Results
149-
[11]: https://gekomad.github.io/Cinnamon/
158+

src/CMakeLists.txt

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,70 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.17)
22
project(cinnamon_debug)
33

44
# debug
5-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -Wno-braced-scalar-init -mbmi2 -DUSE_BMI2 -DBENCH_MODE -fno-omit-frame-pointer -g -pthread -pedantic -std=c++11 -DDLOG_LEVEL=_TRACE -DDEBUG_MODE -fsigned-char -fno-exceptions -fno-rtti -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -DHAS_64BIT -m64 ")
5+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -fsanitize=address -mbmi2 -DUSE_BMI2 -g -DDEBUG_MODE -pthread -Wall -Wpedantic -W -std=c++11 -DDLOG_LEVEL=_TRACE -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -m64 ")
66

77
# bench
8-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -mbmi2 -DUSE_BMI2 -pthread -pedantic -DBENCH_MODE -std=c++11 -DDLOG_LEVEL=_FATAL -Wall -Ofast -DNDEBUG -fsigned-char -fno-exceptions -fno-rtti -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -DHAS_64BIT -m64 ")
8+
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -mbmi2 -DUSE_BMI2 -pthread -Wpedantic -W -DBENCH_MODE -std=c++11 -DDLOG_LEVEL=_FATAL -Wall -O3 -DNDEBUG -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -m64 ")
99

1010
# unit test
11-
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -fsanitize=address -fno-omit-frame-pointer -g -pthread -pedantic -std=c++11 -DDLOG_LEVEL=_TRACE -DFULL_TEST -DDEBUG_MODE -fsigned-char -fno-exceptions -fno-rtti -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -DHAS_64BIT -m64 ")
11+
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -fsanitize=address -g -pthread -Wall -Wpedantic -W -std=c++11 -DDLOG_LEVEL=_TRACE -DFULL_TEST -DDEBUG_MODE -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -m64 ")
1212

13-
set(SOURCE_FILES
13+
# tuning
14+
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-braced-scalar-init -mbmi2 -DUSE_BMI2 -O3 -pthread -Wall -Wpedantic -W -std=c++11 -DTUNING -DNDEBUG -DDLOG_LEVEL=_FATAL -funroll-loops -msse4.2 -DHAS_POPCNT -mpopcnt -msse3 -DHAS_BSF -m64 ")
1415

15-
lib/gtb-probe.h
16+
include_directories(db/gtb)
17+
include_directories(db/gtb/compression)
18+
include_directories(db/gtb/compression/lzma)
19+
include_directories(db/gtb/sysport)
20+
21+
set(SOURCE_FILES
1622
namespaces/constants.h
17-
namespaces/debug.h
1823
namespaces/bits.h
1924
namespaces/random.h
25+
namespaces/see.h
2026
namespaces/board.h
2127
namespaces/board.cpp
2228
perft/_TPerftRes.h
2329
perft/Perft.cpp
2430
perft/Perft.h
25-
db/OpenBook.cpp
26-
db/OpenBook.h
2731
db/syzygy/SYZYGY.h
2832
db/syzygy/SYZYGY.cpp
2933
db/syzygy/tbprobe.c
3034
db/gaviota/GTB.h
3135
db/gaviota/GTB.cpp
36+
db/gaviota/gtb/compression/lzma/Alloc.c
37+
db/gaviota/gtb/compression/lzma/Alloc.h
38+
db/gaviota/gtb/compression/lzma/Bra.h
39+
db/gaviota/gtb/compression/lzma/Bra86.c
40+
db/gaviota/gtb/compression/lzma/LzFind.c
41+
db/gaviota/gtb/compression/lzma/LzFind.h
42+
db/gaviota/gtb/compression/lzma/LzFindMt.h
43+
db/gaviota/gtb/compression/lzma/LzHash.h
44+
db/gaviota/gtb/compression/lzma/Lzma86Dec.c
45+
db/gaviota/gtb/compression/lzma/Lzma86Dec.h
46+
db/gaviota/gtb/compression/lzma/Lzma86Enc.c
47+
db/gaviota/gtb/compression/lzma/Lzma86Enc.h
48+
db/gaviota/gtb/compression/lzma/LzmaDec.c
49+
db/gaviota/gtb/compression/lzma/LzmaDec.h
50+
db/gaviota/gtb/compression/lzma/LzmaEnc.c
51+
db/gaviota/gtb/compression/lzma/LzmaEnc.h
52+
db/gaviota/gtb/compression/lzma/Types.h
53+
db/gaviota/gtb/compression/wrap.c
54+
db/gaviota/gtb/compression/wrap.h
55+
db/gaviota/gtb/sysport/sysport.c
56+
db/gaviota/gtb/sysport/sysport.h
57+
db/gaviota/gtb/gtb-att.c
58+
db/gaviota/gtb/gtb-att.h
59+
db/gaviota/gtb/gtb-dec.c
60+
db/gaviota/gtb/gtb-dec.h
61+
db/gaviota/gtb/gtb-probe.c
62+
db/gaviota/gtb/gtb-probe.h
63+
db/gaviota/gtb/gtb-types.h
64+
db/gaviota/gtb/version.h
3265
perft/PerftThread.cpp
3366
perft/PerftThread.h
3467
test/test.cpp
35-
threadPool/Mutex.h
3668
threadPool/ObserverThread.h
3769
threadPool/Spinlock.h
3870
threadPool/Thread.h
@@ -45,11 +77,10 @@ set(SOURCE_FILES
4577
util/IniFile.h
4678
util/logger.h
4779
util/Singleton.h
48-
util/String.cpp
49-
util/String.h
5080
util/bench/Time.h
5181
util/Timer.cpp
5282
util/Timer.h
83+
util/getopt.h
5384
ChessBoard.cpp
5485
ChessBoard.h
5586
Eval.cpp
@@ -66,9 +97,11 @@ set(SOURCE_FILES
6697
SearchManager.cpp
6798
SearchManager.h
6899
Uci.cpp
69-
Uci.h)
100+
Uci.h
101+
unistd.h
102+
)
70103

71104
set(CMAKE_CXX_COMPILER "clang++")
72105
add_executable(cinnamon_debug ${SOURCE_FILES})
73106
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_DEBUG")
74-
target_link_libraries(cinnamon_debug ${CMAKE_SOURCE_DIR}/lib/Linux/64/libgtb.a /usr/lib/libgtest.a)
107+
target_link_libraries(cinnamon_debug /usr/lib/libgtest.a)

0 commit comments

Comments
 (0)