Skip to content

Commit

Permalink
Reworked the evaluation function. Improved it's speed, certain eval f…
Browse files Browse the repository at this point in the history
…eatures and fixed some bugs.
  • Loading branch information
Dannyj1 committed Jan 9, 2023
1 parent 85189ee commit b679b2c
Show file tree
Hide file tree
Showing 21 changed files with 305 additions and 3,216 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ project(Zagreus)

set(CMAKE_CXX_STANDARD 20)
#set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -std=c++20 -Wno-error=unused-command-line-argument -Wall -Wextra -Wuninitialized -g -gcodeview -flto -Wl,--pdb=Zagreus.pdb")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -std=c++20 -Wno-error=unused-command-line-argument -Wall -Wextra -Wuninitialized -fuse-ld=lld -pthread -flto")
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -std=c++20 -fuse-ld=lld -pthread -flto")

#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -march=native -Wall -Wextra -g -gcodeview -ftrivial-auto-var-init=uninitialized -Wno-error=unused-command-line-argument -Wuninitialized -pthread -std=c++20 -Wl,--pdb=Zagreus.pdb")
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -march=x86-64 -mbmi -mlzcnt -Wall -Wextra -Wuninitialized -fuse-ld=lld -std=c++20 -pthread -flto")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -march=native -Wall -Wextra -Wuninitialized -fuse-ld=lld -std=c++20 -pthread -flto")
#set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og -march=native -Wall -Wextra -Wfatal-errors -g -gcodeview -ftrivial-auto-var-init=uninitialized -Wno-error=unused-command-line-argument -Wuninitialized -pthread -std=c++20 -Wl,--pdb=Zagreus.pdb")
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -march=x86-64 -mbmi -mlzcnt -Wall -Wextra -Wfatal-errors -Wuninitialized -fuse-ld=lld -std=c++20 -pthread -flto")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast -march=native -Wall -Wextra -Wuninitialized -Wfatal-errors -fuse-ld=lld -std=c++20 -pthread -flto")

file(GLOB inc_zagreus "*.h" "*.cpp")
file(GLOB inc_senjo "senjo/*.h" "senjo/*.cpp")
Expand Down
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,34 @@ Zagreus is a constantly changing engine with hopefully an increase in elo every

You can download binaries here: https://github.com/Dannyj1/ZagreusEngine/releases

This engine requires a GUI that supports the UCI (Universal Chess Interface) protocol to use it. I personally use [CuteChess](https://cutechess.com/).

# Features
- Bitboard board representation with Plain Magic Bitboards for sliding piece move generation
- Principal Variation Search with Alpha-Beta pruning
- Quiescence Search with delta pruning and SEE move ordering
- Move ordering using MVV/LVA, killer moves, history heuristic, countermove heuristic
- Transposition Table
- Evaluation consisting of material balance, mobility, connectivity, king safety, piece square tables and more
- Evaluation consisting of material balance, mobility, very simple connectivity, king safety, piece square tables and more
- Null Move Pruning
- Late Move Reduction
- And more! This list is constantly growing and changing, but it is difficult to keep track of all features and changes.

# Credits
Thanks to:
- zd3nik for the [Senjo UCI Adapter](https://github.com/zd3nik/SenjoUCIAdapter), which I slightly modified
- [zd3nik](https://github.com/zd3nik) for the [Senjo UCI Adapter](https://github.com/zd3nik/SenjoUCIAdapter), which I slightly modified
- The [Chessprogramming wiki](https://www.chessprogramming.org/Main_Page) contributors for all the information about chess programming


# License
This program is licensed under the GNU General Public License v3.0. For full details, please read the [LICENSE](https://github.com/Dannyj1/ZagreusEngine/blob/master/LICENSE) file.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

Please read the [LICENSE](https://github.com/Dannyj1/ZagreusEngine/blob/master/LICENSE) file for the full details.
3 changes: 1 addition & 2 deletions bitboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ namespace Zagreus {
bool Bitboard::isSemiOpenFileLenient(int square, PieceColor color) {
uint64_t fileMask =
rayAttacks[Direction::NORTH][square] | rayAttacks[Direction::SOUTH][square] | (1ULL << square);
uint64_t ownOccupied = getPieceBoard(
color == PieceColor::WHITE ? PieceType::WHITE_PAWN : PieceType::BLACK_PAWN);
uint64_t ownOccupied = getPieceBoard(PieceType::WHITE_PAWN + color);

return fileMask == (fileMask & ownOccupied);
}
Expand Down
4 changes: 2 additions & 2 deletions engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ namespace Zagreus {
}

std::string Engine::getEngineVersion() {
return "v0.4";
return "v0.5";
}

std::string Engine::getAuthorName() {
return "Dannyj1";
return "Danny Jelsma";
}

std::string Engine::getEmailAddress() {
Expand Down
100 changes: 0 additions & 100 deletions include/epd/100Brillante.epd

This file was deleted.

25 changes: 0 additions & 25 deletions include/epd/bk.epd

This file was deleted.

26 changes: 0 additions & 26 deletions include/epd/hour.epd

This file was deleted.

26 changes: 0 additions & 26 deletions include/epd/kaufman.epd

This file was deleted.

Loading

0 comments on commit b679b2c

Please sign in to comment.