Skip to content

Commit 4af8162

Browse files
committed
version 2.3
1 parent 2c4c54b commit 4af8162

Some content is hidden

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

73 files changed

+11514
-10525
lines changed

README.md

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,51 @@
1-
2-
31
Cinnamon
42
==========
53
### UCI Chess Engine
64

7-
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], [Chess for Android][7] or any UCI-compatible GUI. Cinnamon is also a javascript library to play with [chessboardjs][8] or any js GUI.
5+
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

97
Version
108
----------
11-
2.2a
9+
2.3
1210

1311
News
1412
----------
15-
- Bug fixed using Gaviota Tablebases in Windows
16-
- Bugs fixed in Uci protocol
17-
- Improved eval function
18-
- Improved null moves
19-
13+
- Chess 960
14+
- Killer heuristics
15+
- Improved move ordering
16+
- Improved Gaviota Tablebase search
17+
- Syzygy Tablebases
18+
- BMI2 Instructions
19+
- Bug fix in enpassant
20+
- Bug fix parallel perft
2021
Features
2122
----------
2223

2324
- Available for both Unix, Windows, Mac, Android, ARM and Javascript
2425
- UCI protocol
2526
- GPL 3 License
27+
- Chess 960
2628
- C++11 source
29+
- PVS
2730
- Rotated bitboards
2831
- Null moves
2932
- Futility pruning
3033
- Delta pruning
3134
- Razoring
32-
- Interruptible multithread Perft test
35+
- Interruptible multithread Perft test [standard][9] [chess960][10]
3336
- 32/64 bit architectures
3437
- Iterative deeping
3538
- History heuristics
39+
- Killer heuristics
3640
- Lazy evaluation
37-
- Mvv/Lva
38-
- Transposition Table
41+
- MVV/LVA
42+
- Two-tier Transposition Table
3943
- Aspiration Windows
4044
- Late Move Reduction
4145
- Ponder
42-
- Available with Tarrasch GUI for Windows
4346
- Open Book (Polyglot)
4447
- Gaviota Tablebases
48+
- Syzygy Tablebases
4549
- [Elo ratings][3]
4650

4751
Binaries
@@ -53,16 +57,28 @@ All files are compiled statically, no further libraries are necessary.
5357
Command line tools
5458
----------
5559
#### Perft
56-
`cinnamon -perft [-d depth] [-c nCpu] [-h hash size (mb) [-F dump file]] [-f "fen position"] `
60+
`cinnamon -perft [-d depth] [-c nCpu] [-h hash size (mb) [-F dump file]] [-Chess960] [-f "fen position"] `
5761

58-
Setting dump file (-F) you can stop and start the perft process.
62+
Setting `-F` and `-h` you can stop (Ctrl-c) and restart the perft process.
5963

60-
#### Gaviota distance to mate
64+
#### Gaviota DTM (distance to mate)
6165

6266
`cinnamon -dtm-gtb -f "fen position" -p path`
6367

64-
#### EPD generation
65-
`cinnamon -puzzle_epd -t K..K..`
68+
#### Gaviota WDL (win/draw/loss)
69+
70+
`cinnamon -wdl-gtb -f "fen position" -p path`
71+
72+
#### SYZYFY DTZ (distance to zero)
73+
74+
`cinnamon -dtz-syzygy -f "fen position" -p path`
75+
76+
#### SYZYFY WDL (win/draw/loss)
77+
78+
`cinnamon -wdl-syzygy -f "fen position" -p path`
79+
80+
#### EPD generator
81+
`cinnamon -puzzle_epd -t K?K?`
6682
example: `cinnamon -puzzle_epd -t KRKP`
6783

6884
Compiling
@@ -72,9 +88,11 @@ Cinnamon requires C++11 or greater, use unique Makefile to compile for many arch
7288

7389
$ make
7490

75-
Makefile for cross-compile Linux/Windows/OSX/Raspberry
91+
92+
Makefile for cross-compile Linux/Windows/OSX/ARM/Javascript
7693

7794
make cinnamon64-modern-INTEL > 64-bit optimized for modern Intel cpu
95+
make cinnamon64-BMI2 > 64-bit optimized for Haswell Intel cpu
7896
make cinnamon64-modern-AMD > 64-bit optimized for modern Amd cpu
7997
make cinnamon64-modern > 64-bit with popcnt bsf sse3 support
8098
make cinnamon64-generic > Unspecified 64-bit
@@ -84,6 +102,13 @@ Cinnamon requires C++11 or greater, use unique Makefile to compile for many arch
84102
make cinnamon32-generic > Unspecified 32-bit
85103
make cinnamon32-ARM > Optimized for ARM cpu
86104

105+
make cinnamon-js > Javascript build
106+
107+
add:
108+
COMP=compiler > Use another compiler
109+
FULL_TEST=yes > Unit test (googletest)
110+
111+
87112
g++ is the default compiler, add COMP=yourcompiler to use another compiler
88113
example: make cinnamon64-modern-INTEL COMP=clang++
89114

@@ -103,5 +128,7 @@ Cinnamon was written by Giuseppe Cannella at gmail dot com.
103128
[4]: http://www.gnu.org/software/xboard
104129
[5]: http://www.playwitharena.com
105130
[6]: http://triplehappy.com
106-
[7]: https://play.google.com/store/apps/details?id=com.google.android.chess
107-
[8]: http://chessboardjs.com
131+
[7]: https://play.google.com/store/apps/details?hl=it&id=org.petero.droidfish
132+
[8]: http://chessboardjs.com
133+
[9]: http://cinnamonchess.altervista.org/perft.html
134+
[10]: https://www.chessprogramming.org/Chess960_Perft_Results

regression_test.html

Lines changed: 0 additions & 1223 deletions
This file was deleted.

src/CMakeLists.txt

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
11
cmake_minimum_required(VERSION 3.5)
2-
project(debug)
2+
project(cinnamon_debug)
33

4-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -pthread -pedantic -std=c++11 -DDLOG_LEVEL=_TRACE -DFULL_TEST -DDEBUG_MODE ")
4+
# 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 ")
56

6-
set(SOURCE_FILES
7+
# 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 ")
9+
10+
# 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 ")
12+
13+
set(SOURCE_FILES
714

815
lib/gtb-probe.h
9-
namespaces/board.h
16+
namespaces/constants.h
1017
namespaces/debug.h
11-
namespaces/def.h
18+
namespaces/bits.h
1219
namespaces/random.h
20+
namespaces/board.h
21+
namespaces/board.cpp
1322
perft/_TPerftRes.h
1423
perft/Perft.cpp
1524
perft/Perft.h
1625
db/OpenBook.cpp
1726
db/OpenBook.h
18-
db/GTB.h
19-
db/GTB.cpp
27+
db/syzygy/SYZYGY.h
28+
db/syzygy/SYZYGY.cpp
29+
db/syzygy/tbprobe.c
30+
db/gaviota/GTB.h
31+
db/gaviota/GTB.cpp
2032
perft/PerftThread.cpp
2133
perft/PerftThread.h
2234
test/test.cpp
@@ -28,15 +40,14 @@ set(SOURCE_FILES
2840
util/Bitboard.cpp
2941
util/Bitboard.h
3042
util/FileUtil.h
31-
util/GetOpt.h
43+
GetOpt.h
3244
util/IniFile.cpp
3345
util/IniFile.h
3446
util/logger.h
35-
util/Random.h
3647
util/Singleton.h
3748
util/String.cpp
3849
util/String.h
39-
util/Time.h
50+
util/bench/Time.h
4051
util/Timer.cpp
4152
util/Timer.h
4253
ChessBoard.cpp
@@ -55,10 +66,8 @@ set(SOURCE_FILES
5566
SearchManager.cpp
5667
SearchManager.h
5768
Uci.cpp
58-
Uci.h
59-
WrapperCinnamon.cpp
60-
WrapperCinnamon.h)
69+
Uci.h)
6170

62-
set(CMAKE_CXX_COMPILER "g++")
63-
add_executable(debug ${SOURCE_FILES})
64-
target_link_libraries(debug ${CMAKE_SOURCE_DIR}/lib/Linux/64/libgtb.a /usr/lib/x86_64-linux-gnu/libgtest.a)
71+
set(CMAKE_CXX_COMPILER "clang++")
72+
add_executable(cinnamon_debug ${SOURCE_FILES})
73+
target_link_libraries(cinnamon_debug ${CMAKE_SOURCE_DIR}/lib/Linux/64/libgtb.a /usr/lib/libgtest.a)

0 commit comments

Comments
 (0)