Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zagreus 6.0 - Rewrite from Scratch #82

Draft
wants to merge 46 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4b7f54b
Remove all code so we can start the rewrite
Dannyj1 May 4, 2024
68416c2
Started implementing UCI
Dannyj1 May 23, 2024
bb32362
Push old changes that weren't pushed yet
Dannyj1 Aug 22, 2024
73aedd8
Changed board implementation
Dannyj1 Sep 17, 2024
6b789c8
Don't copy MoveList to move_gen, use reference instead
Dannyj1 Oct 1, 2024
425d82e
Implement very basic pawn move generation
Dannyj1 Oct 1, 2024
c7cec56
Implement knight move generation
Dannyj1 Oct 4, 2024
83739e2
Attempts at fixing CI
Dannyj1 Oct 4, 2024
bfebd6d
Apply suggestions from code review
Dannyj1 Oct 5, 2024
e2c7a3e
Addressed several code review points, improved structuring of certain…
Dannyj1 Oct 5, 2024
25c544d
Fix to_underlying import
Dannyj1 Oct 5, 2024
3da939a
Fixed bitscanReverse
Dannyj1 Oct 5, 2024
5bc36db
uci-specification.txt was not supposed to be pushed to git
Dannyj1 Oct 5, 2024
89e2e4f
Implement bishop move generation, fix moves being generated that woul…
Dannyj1 Oct 5, 2024
c8e4834
Implement basic move generation for the remaining pieces.
Dannyj1 Oct 6, 2024
06bda65
Fix imports, integrate include what you use with CMake when using the…
Dannyj1 Oct 6, 2024
4a05b0a
Implement lookup tables, added function that gets all attackers of a …
Dannyj1 Oct 6, 2024
dec48d5
Fix wrong import that breaks CI
Dannyj1 Oct 6, 2024
2db260c
Implemented check to see if a position is legal/valid, added setPiece…
Dannyj1 Oct 8, 2024
02e9609
Implemented makeMove and unmakeMove, started perft implementation
Dannyj1 Oct 8, 2024
0b98f79
Implemented setting board from FEN, implemented perft. Move generatio…
Dannyj1 Oct 9, 2024
f257129
Fixed many move generation issues, perft accurate up until depth 4
Dannyj1 Oct 9, 2024
14f567a
Implemented en passant, perft accurate up until depth 5. Depth 6 is i…
Dannyj1 Oct 9, 2024
0a70888
Remove some TODO comments
Dannyj1 Oct 9, 2024
bf3790a
Implemented position command, fixed some movegen bugs. Perft depth 6 …
Dannyj1 Oct 10, 2024
515cc55
Fixed en passant bug. Startpos perft accurate until depth 6.
Dannyj1 Oct 10, 2024
41e4cde
Performance improvements
Dannyj1 Oct 10, 2024
f03dc9a
Implemented castling, startpos perft accurate up until depth 7 (didn'…
Dannyj1 Oct 12, 2024
5e72925
Fixed castling bugs
Dannyj1 Oct 13, 2024
abb88e5
Implemented promotions, fix more castling bugs. Move gen seems to be …
Dannyj1 Oct 13, 2024
cd7b627
Slight performance improvements
Dannyj1 Oct 13, 2024
6bead70
Create doxygen.yml
Dannyj1 Oct 15, 2024
c888138
Update doxygen.yml
Dannyj1 Oct 15, 2024
2306222
Update doxygen.yml
Dannyj1 Oct 15, 2024
dc4ed04
Add Doxyfile
Dannyj1 Oct 15, 2024
35f7efc
Added a very basic material evaluation, commented some important func…
Dannyj1 Oct 19, 2024
3f27a7d
Added more documentation
Dannyj1 Oct 19, 2024
1385ded
Basic PV search implementation that isn't done yet.
Dannyj1 Oct 29, 2024
2f75aa1
Implement zobrist hashing
Dannyj1 Nov 3, 2024
2bedb00
Implement halfmove and fullmove clock
Dannyj1 Nov 5, 2024
bf81a54
Add devcontainer.json
Dannyj1 Nov 20, 2024
8a42f30
Install devcontainer llvm prerequisites
Dannyj1 Nov 20, 2024
4872019
Update devcontainer with newer clang and IWYU. Ran IWYU
Dannyj1 Dec 1, 2024
fde5463
Update license
Dannyj1 Jan 4, 2025
2037174
Merge remote-tracking branch 'origin/rewrite' into rewrite
Dannyj1 Jan 4, 2025
8a977fa
Implemented basic iterative deepening and a basic "go" command for uci.
Dannyj1 Jan 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ctest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
version: "18"
arch: "x64"

- name: Configure CMake & Build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-latest
build-name: Linux
artifact-extension: .tar.gz
config-command: cmake -DCMAKE_BUILD_TYPE=Release -DAPPEND_VERSION_USE_GIT=OFF .
Expand All @@ -39,9 +39,9 @@ jobs:

- name: Setup Clang (Linux)
if: runner.os == 'Linux'
uses: KyleMayes/install-llvm-action@v1
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
version: "18"

- name: Setup msys and install required packages
if: runner.os == 'Windows'
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:

create-release:
needs: build
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/valgrind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup Clang
uses: KyleMayes/install-llvm-action@v2
with:
version: "17"
version: "18"
arch: "x64"

- name: Install valgrind
Expand Down
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 21 additions & 21 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
# along with Zagreus. If not, see <https://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.25)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD 23)
project(Zagreus)
set(ZAGREUS_VERSION_MAJOR "5")
set(ZAGREUS_VERSION_MAJOR "6")
set(ZAGREUS_VERSION_MINOR "0")

# Default values
Expand Down Expand Up @@ -200,27 +200,27 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${BUILD_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${BUILD_FLAGS}")

file(GLOB inc_zagreus "src/*.h" "src/*.cpp")
file(GLOB inc_senjo "senjo/*.h" "senjo/*.cpp")

add_executable(Zagreus src/main.cpp ${inc_senjo} ${inc_zagreus})
add_executable(Zagreus src/main.cpp ${inc_zagreus})
Dannyj1 marked this conversation as resolved.
Show resolved Hide resolved

target_compile_definitions(Zagreus PRIVATE ZAGREUS_VERSION_MAJOR="${ZAGREUS_VERSION_MAJOR}")
target_compile_definitions(Zagreus PRIVATE ZAGREUS_VERSION_MINOR="${ZAGREUS_VERSION_MINOR}")

if (ENABLE_TESTS)
file(GLOB tests_folder "tests/*.h" "tests/*.cpp")

# Remove main from inc_zagreus
list(REMOVE_ITEM inc_zagreus "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")

add_executable(zagreus-tests ${tests_folder} ${inc_senjo} ${inc_zagreus})
target_link_libraries(zagreus-tests PRIVATE Catch2::Catch2WithMain)

target_compile_definitions(zagreus-tests PRIVATE ZAGREUS_VERSION_MAJOR="${ZAGREUS_VERSION_MAJOR}")
target_compile_definitions(zagreus-tests PRIVATE ZAGREUS_VERSION_MINOR="${ZAGREUS_VERSION_MINOR}")

list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(CTest)
include(Catch)
catch_discover_tests(zagreus-tests)
endif ()
# TODO: re-enable
#if (ENABLE_TESTS)
# file(GLOB tests_folder "tests/*.h" "tests/*.cpp")
#
# # Remove main from inc_zagreus
# list(REMOVE_ITEM inc_zagreus "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
#
# add_executable(zagreus-tests ${tests_folder} ${inc_zagreus})
# target_link_libraries(zagreus-tests PRIVATE Catch2::Catch2WithMain)
#
# target_compile_definitions(zagreus-tests PRIVATE ZAGREUS_VERSION_MAJOR="${ZAGREUS_VERSION_MAJOR}")
# target_compile_definitions(zagreus-tests PRIVATE ZAGREUS_VERSION_MINOR="${ZAGREUS_VERSION_MINOR}")
#
# list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
# include(CTest)
# include(Catch)
# catch_discover_tests(zagreus-tests)
#endif ()
Dannyj1 marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,6 @@ cmake --build .

# Credits
Thanks to:

- [zd3nik](https://github.com/zd3nik) for the [Senjo UCI Adapter](https://github.com/zd3nik/SenjoUCIAdapter), which I
slightly modified
- [AndyGrant](https://github.com/AndyGrant) for the easy to use and open
source [OpenBench Testing Framework](https://github.com/AndyGrant/OpenBench), making testing my engine SO much easier
and allowing you to distribute test over multiple devices (I use a private instance of OpenBench)
Expand All @@ -107,6 +104,3 @@ GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with Zagreus. If not, see <https://www.gnu.org/licenses/>.

This project uses the [Senjo UCI Adapter](https://github.com/zd3nik/SenjoUCIAdapter) by zd3nik which is licensed under
the MIT license. All files from the Senjo UCI Adapter retain their original copyright and license notices.
Loading