Skip to content

Commit f3a0237

Browse files
committed
Ctrl + C, Ctrl + V
1 parent 651abdf commit f3a0237

File tree

3,338 files changed

+633802
-0
lines changed

Some content is hidden

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

3,338 files changed

+633802
-0
lines changed
Binary file not shown.

Berserk-13_Linux_arm64/Berserk-13_Linux_arm64/LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
![AUR version](https://img.shields.io/aur/version/berserk)
2+
3+
# Berserk Chess Engine
4+
5+
<img src="resources/berserk.jpg" alt="Berserk" width="400" />
6+
7+
A UCI chess engine written in C. Feel free to challenge me on [Lichess](https://lichess.org/@/BerserkEngine)!
8+
9+
## Strength
10+
11+
### Rating Lists + Elo
12+
13+
Many websites use an [Elo rating system](https://en.wikipedia.org/wiki/Elo_rating_system) to present relative skill amongst engines.
14+
Below is a list of many chess engine lists throughout the web (*variance in Elo is due to different conditions for each list*)
15+
16+
* [CCRL 40/15](https://ccrl.chessdom.com/ccrl/4040/) - **3514 4CPU, 3480 1CPU**
17+
* [CCRL 40/2](https://ccrl.chessdom.com/ccrl/404/) - **3667 1CPU**
18+
* [IpMan Chess](https://ipmanchess.yolasite.com/r9-7945hx.php) - **3547 1CPU**
19+
* [CEGT](http://www.cegt.net/40_4_Ratinglist/40_4_single/rangliste.html) - **3598 1CPU**
20+
* [SPCC](https://www.sp-cc.de/) - **3733 1CPU**
21+
* ~~[FGRL](www.fastgm.de/60-0.60.html) - **3518 1CPU**~~
22+
* List no longer maintained
23+
24+
### Tournaments/Events with Berserk
25+
26+
- [TCEC](https://tcec-chess.com/)
27+
- [CCC](https://www.chess.com/computer-chess-championship)
28+
- [Graham's Broadcasts](https://ccrl.live/)
29+
30+
## Functional Details
31+
32+
### Board Representation and Move Generation
33+
34+
- [Bitboards](https://www.chessprogramming.org/Bitboards)
35+
- [Magic Bitboards](https://www.chessprogramming.org/Magic_Bitboards)
36+
- [Staged Move Gen](https://www.chessprogramming.org/Move_Generation#Staged_move_generation)
37+
38+
### Search
39+
40+
- [Negamax](https://www.chessprogramming.org/Negamax)
41+
- [PVS](https://www.chessprogramming.org/Principal_Variation_Search)
42+
- [Quiescence](https://www.chessprogramming.org/Quiescence_Search)
43+
- [Iterative Deepening](https://www.chessprogramming.org/Iterative_Deepening)
44+
- [Transposition Table](https://www.chessprogramming.org/Transposition_Table)
45+
- [Aspiration Windows](https://www.chessprogramming.org/Aspiration_Windows)
46+
- [Internal Iterative Reductions](https://www.talkchess.com/forum3/viewtopic.php?f=7&t=74769)
47+
- [Reverse Futility Pruning](https://www.chessprogramming.org/Reverse_Futility_Pruning)
48+
- [Razoring](https://www.chessprogramming.org/Razoring)
49+
- [Null Move Pruning](https://www.chessprogramming.org/Null_Move_Pruning)
50+
- [ProbCut](https://www.chessprogramming.org/ProbCut)
51+
- [FutilityPruning](https://www.chessprogramming.org/Futility_Pruning)
52+
- [LMP](https://www.chessprogramming.org/Futility_Pruning#MoveCountBasedPruning)
53+
- History Pruning
54+
- [SEE](https://www.chessprogramming.org/Static_Exchange_Evaluation)
55+
- Static Exchange Evaluation Pruning
56+
- [LMR](https://www.chessprogramming.org/Late_Move_Reductions)
57+
- [Killer Heuristic](https://www.chessprogramming.org/Killer_Heuristic)
58+
- [Countermove Heuristic](https://www.chessprogramming.org/Countermove_Heuristic)
59+
- [Extensions](https://www.chessprogramming.org/Extensions)
60+
- [Singular](https://www.chessprogramming.org/Singular_Extensions)
61+
62+
### Evaluation
63+
64+
- [NNUE](https://www.chessprogramming.org/NNUE)
65+
- Horizontally Mirrored 16 Buckets
66+
- 2x(12288 -> 512) -> 1
67+
- [Berserk FenGen](https://github.com/jhonnold/berserk/tree/fen-gen)
68+
- [Grapheus](https://github.com/Luecx/Grapheus)
69+
- ~~[Koivisto's CUDA Trainer](https://github.com/Luecx/CudAD)~~
70+
- This has been deprecated in favor of an even newer trainer written by Luecx, Grapheus.
71+
- ~~[Berserk Trainer](https://github.com/jhonnold/berserk-trainer)~~
72+
- This has been deprecated in favor of Koivisto's trainer, but trained all networks through Berserk 8.5.1+
73+
74+
## Building
75+
76+
```bash
77+
git clone https://github.com/jhonnold/berserk && \
78+
cd berserk/src && \
79+
make pgo CC=clang && \
80+
./berserk
81+
```
82+
83+
## Credit
84+
85+
This engine could not be written without some influence and they are...
86+
87+
### Engine Influences
88+
89+
- [Stockfish](https://github.com/official-stockfish/Stockfish)
90+
- [Ethereal](https://github.com/AndyGrant/Ethereal)
91+
- [Koivisto](https://github.com/Luecx/Koivisto)
92+
- [Weiss](https://github.com/TerjeKir/weiss)
93+
- [Chess22k](https://github.com/sandermvdb/chess22k)
94+
- [BBC](https://github.com/maksimKorzh/chess_programming)
95+
- [Cheng](https://www.chessprogramming.org/Cheng)
96+
97+
### Additional Resources
98+
99+
- [Grapheus](https://github.com/Luecx/Grapheus)
100+
- [Koivisto's CUDA Trainer](https://github.com/Luecx/CudAD)
101+
- [OpenBench](https://github.com/AndyGrant/OpenBench)
102+
- [TalkChess Forum](http://talkchess.com/forum3/viewforum.php?f=7)
103+
- [CCRL](https://kirill-kryukov.com/chess/discussion-board/viewforum.php?f=7)
104+
- [JCER](https://chessengines.blogspot.com/p/rating-jcer.html)
105+
- [Cute Chess](https://cutechess.com/)
106+
- [Arena](http://www.playwitharena.de/)
107+
- [CPW](https://www.chessprogramming.org/Main_Page)
108+
- Lars in Grahams Broadcast rooms
109+
111 KB
Loading
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[InternetShortcut]
2+
URL=https://www.chessengeria.eu/
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
BasedOnStyle: google
2+
3+
AlignAfterOpenBracket: Align
4+
AlignConsecutiveAssignments: Consecutive
5+
AlignConsecutiveBitFields: Consecutive
6+
AlignConsecutiveMacros: Consecutive
7+
AlignOperands: true
8+
AlignTrailingComments: true
9+
10+
AllowAllArgumentsOnNextLine: false
11+
AllowAllParametersOfDeclarationOnNextLine: false
12+
AllowShortBlocksOnASingleLine: false
13+
AllowShortCaseLabelsOnASingleLine: true
14+
AllowShortEnumsOnASingleLine: false
15+
AllowShortFunctionsOnASingleLine: false
16+
AllowShortIfStatementsOnASingleLine: false
17+
AllowShortLambdasOnASingleLine: true
18+
AllowShortLoopsOnASingleLine: false
19+
20+
AlwaysBreakAfterReturnType: None
21+
AlwaysBreakBeforeMultilineStrings: true
22+
AlwaysBreakTemplateDeclarations: Yes
23+
24+
BinPackArguments: false
25+
BinPackParameters: false
26+
BitFieldColonSpacing: Both
27+
28+
BreakBeforeBinaryOperators: None
29+
BreakBeforeBraces: Attach
30+
BreakBeforeTernaryOperators: false
31+
BreakConstructorInitializers: AfterColon
32+
BreakInheritanceList: AfterColon
33+
BreakStringLiterals: true
34+
35+
ColumnLimit: 120
36+
37+
CompactNamespaces: false
38+
39+
ContinuationIndentWidth: 2
40+
41+
EmptyLineAfterAccessModifier: Never
42+
EmptyLineBeforeAccessModifier: Always
43+
44+
FixNamespaceComments: false
45+
46+
IndentWidth: 2
47+
InsertTrailingCommas: Wrapped
48+
49+
KeepEmptyLinesAtTheStartOfBlocks: false
50+
51+
Language: Cpp
52+
53+
MaxEmptyLinesToKeep: 1
54+
55+
PointerAlignment: Left
56+
57+
ReflowComments: true
58+
59+
SortIncludes: CaseInsensitive
60+
61+
SpaceAfterCStyleCast: true
62+
SpaceAfterLogicalNot: false
63+
SpaceAfterTemplateKeyword: false
64+
SpaceBeforeAssignmentOperators: true
65+
SpaceBeforeCaseColon: false
66+
SpaceBeforeCpp11BracedList: true
67+
SpaceBeforeInheritanceColon: true
68+
SpaceBeforeParens: true
69+
SpaceBeforeRangeBasedForLoopColon: true
70+
SpaceBeforeSquareBrackets: false
71+
SpaceInEmptyBlock: false
72+
SpaceInEmptyParentheses: false
73+
SpacesBeforeTrailingComments: 1
74+
SpacesInAngles: false
75+
SpacesInCStyleCastParentheses: false
76+
SpacesInConditionalStatement: false
77+
SpacesInContainerLiterals: false
78+
SpacesInParentheses: false
79+
SpacesInSquareBrackets: false
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Berserk Validation
2+
on:
3+
push:
4+
workflow_dispatch:
5+
6+
jobs:
7+
engine:
8+
name: Berserk on ${{matrix.os}} with gcc-${{matrix.version}}
9+
runs-on: ${{matrix.os}}
10+
strategy:
11+
matrix:
12+
os: [ubuntu-20.04]
13+
version: [11]
14+
15+
steps:
16+
- name: Set up GCC ${{matrix.version}}
17+
uses: egor-tensin/setup-gcc@v1
18+
with:
19+
version: ${{matrix.version}}
20+
platform: x64
21+
22+
- name: Clone Berserk
23+
uses: actions/checkout@v2
24+
25+
- name: Compile
26+
run: cd src && make build ARCH=avx2
27+
28+
- name: Bench
29+
run: |
30+
bench=$(git show --summary | grep -Po '(?<=Bench: )[0-9]+?(?=$)')
31+
./src/berserk bench > output
32+
real=$(grep 'Results:' output | grep -Po '(?<=[\s]{5})[0-9]+?(?= nodes)')
33+
if [[ "$bench" != "$real" ]]; then echo "got $real, expected $bench" && exit 1; fi
34+
35+
- name: Install Expect
36+
run: sudo apt-get install -y expect
37+
38+
- name: Perft Test
39+
run: ./tests/perft.sh 1>/dev/null
40+
41+
clang-format-checking:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v2
45+
46+
- uses: RafikFarhad/[email protected]
47+
with:
48+
sources: 'src/*.c,src/*.h'
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Object files
5+
*.o
6+
*.ko
7+
*.obj
8+
*.elf
9+
10+
# Linker output
11+
*.ilk
12+
*.map
13+
*.exp
14+
15+
# Precompiled Headers
16+
*.gch
17+
*.pch
18+
19+
# Libraries
20+
*.lib
21+
*.a
22+
*.la
23+
*.lo
24+
25+
# Shared objects (inc. Windows DLLs)
26+
*.dll
27+
*.so
28+
*.so.*
29+
*.dylib
30+
31+
# Executables
32+
*.exe
33+
*.out
34+
*.app
35+
*.i*86
36+
*.x86_64
37+
*.hex
38+
39+
# Debug files
40+
*.dSYM/
41+
*.su
42+
*.idb
43+
*.pdb
44+
45+
# Kernel Module Compile Results
46+
*.mod*
47+
*.cmd
48+
.tmp_versions/
49+
modules.order
50+
Module.symvers
51+
Mkfile.old
52+
dkms.conf
53+
54+
berserk
55+
berserk-popcnt
56+
.vscode
57+
.idea
58+
dist
59+
60+
*.log
61+
*.nn

Berserk-13_Linux_arm64/Berserk-13_Linux_arm64/source/.gitmodules

Whitespace-only changes.

0 commit comments

Comments
 (0)