-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aligned with Stockfish 17. Fixed mcts. Fixed persisted learning and added the experience book option and an utility for reset (to be done for old experience files) and display content given a fen. Extended livebook to LiChess in addition to ChessDB. Removed opening variety and replaced with variety which is now a combo with three values: -off the default -standard without loss of elo -psychological more risky because with elo loss, but not as significant, useful for inviting the engine to a game with psychological/human sacrifices, i.e., strictly speaking, incorrect, but almost impossible to refute.
- Loading branch information
Showing
168 changed files
with
33,884 additions
and
16,026 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
name: Brainlearn | ||
on: | ||
push: | ||
tags: | ||
- "*" | ||
branches: | ||
- master | ||
- tools | ||
- github_ci | ||
pull_request: | ||
branches: | ||
- master | ||
- tools | ||
jobs: | ||
Prerelease: | ||
if: github.repository == 'official-brainlearn/Brainlearn' && (github.ref == 'refs/heads/master' || (startsWith(github.ref_name, 'sf_') && github.ref_type == 'tag')) | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # For deleting/creating a prerelease | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
# returns null if no pre-release exists | ||
- name: Get Commit SHA of Latest Pre-release | ||
run: | | ||
# Install required packages | ||
sudo apt-get update | ||
sudo apt-get install -y curl jq | ||
echo "COMMIT_SHA_TAG=$(jq -r 'map(select(.prerelease)) | first | .tag_name' <<< $(curl -s https://api.github.com/repos/${{ github.repository_owner }}/Brainlearn/releases))" >> $GITHUB_ENV | ||
# delete old previous pre-release and tag | ||
- run: gh release delete ${{ env.COMMIT_SHA_TAG }} --cleanup-tag | ||
if: env.COMMIT_SHA_TAG != 'null' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# Make sure that an old ci that still runs on master doesn't recreate a prerelease | ||
- name: Check Pullable Commits | ||
id: check_commits | ||
run: | | ||
git fetch | ||
CHANGES=$(git rev-list HEAD..origin/master --count) | ||
echo "CHANGES=$CHANGES" >> $GITHUB_ENV | ||
- name: Get last commit SHA | ||
id: last_commit | ||
run: echo "COMMIT_SHA=$(git rev-parse HEAD | cut -c 1-8)" >> $GITHUB_ENV | ||
|
||
- name: Get commit date | ||
id: commit_date | ||
run: echo "COMMIT_DATE=$(git show -s --date=format:'%Y%m%d' --format=%cd HEAD)" >> $GITHUB_ENV | ||
|
||
# Create a new pre-release, the other upload_binaries.yml will upload the binaries | ||
# to this pre-release. | ||
- name: Create Prerelease | ||
if: github.ref_name == 'master' && env.CHANGES == '0' | ||
uses: softprops/action-gh-release@4634c16e79c963813287e889244c50009e7f0981 | ||
with: | ||
name: Brainlearn dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }} | ||
tag_name: brainlearn-dev-${{ env.COMMIT_DATE }}-${{ env.COMMIT_SHA }} | ||
prerelease: true | ||
|
||
Matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
arm_matrix: ${{ steps.set-arm-matrix.outputs.arm_matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
- id: set-matrix | ||
run: | | ||
TASKS=$(echo $(cat .github/ci/matrix.json) ) | ||
echo "MATRIX=$TASKS" >> $GITHUB_OUTPUT | ||
- id: set-arm-matrix | ||
run: | | ||
TASKS_ARM=$(echo $(cat .github/ci/arm_matrix.json) ) | ||
echo "ARM_MATRIX=$TASKS_ARM" >> $GITHUB_OUTPUT | ||
Compilation: | ||
needs: [Matrix] | ||
uses: ./.github/workflows/compilation.yml | ||
with: | ||
matrix: ${{ needs.Matrix.outputs.matrix }} | ||
ARMCompilation: | ||
needs: [Matrix] | ||
uses: ./.github/workflows/arm_compilation.yml | ||
with: | ||
matrix: ${{ needs.Matrix.outputs.arm_matrix }} | ||
IWYU: | ||
uses: ./.github/workflows/iwyu.yml | ||
Sanitizers: | ||
uses: ./.github/workflows/sanitizers.yml | ||
Tests: | ||
uses: ./.github/workflows/tests.yml | ||
Matetrack: | ||
uses: ./.github/workflows/matetrack.yml | ||
Games: | ||
uses: ./.github/workflows/games.yml | ||
Binaries: | ||
if: github.repository == 'official-brainlearn/Brainlearn' | ||
needs: [Matrix, Prerelease, Compilation] | ||
uses: ./.github/workflows/upload_binaries.yml | ||
with: | ||
matrix: ${{ needs.Matrix.outputs.matrix }} | ||
permissions: | ||
contents: write # For deleting/creating a (pre)release | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ARM_Binaries: | ||
if: github.repository == 'official-brainlearn/Brainlearn' | ||
needs: [Matrix, Prerelease, ARMCompilation] | ||
uses: ./.github/workflows/upload_binaries.yml | ||
with: | ||
matrix: ${{ needs.Matrix.outputs.arm_matrix }} | ||
permissions: | ||
contents: write # For deleting/creating a (pre)release | ||
secrets: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This workflow will play games with a debug enabled SF using the PR | ||
|
||
name: Games | ||
on: | ||
workflow_call: | ||
jobs: | ||
Matetrack: | ||
name: Games | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout SF repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
path: Brainlearn | ||
persist-credentials: false | ||
|
||
- name: build debug enabled version of SF | ||
working-directory: Brainlearn/src | ||
run: make -j build debug=yes | ||
|
||
- name: Checkout fast-chess repo | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: Disservin/fast-chess | ||
path: fast-chess | ||
ref: d54af1910d5479c669dc731f1f54f9108a251951 | ||
persist-credentials: false | ||
|
||
- name: fast-chess build | ||
working-directory: fast-chess | ||
run: make -j | ||
|
||
- name: Run games | ||
working-directory: fast-chess | ||
run: | | ||
./fast-chess -rounds 4 -games 2 -repeat -concurrency 4 -openings file=app/tests/data/openings.epd format=epd order=random -srand $RANDOM\ | ||
-engine name=sf1 cmd=/home/runner/work/Brainlearn/Brainlearn/Brainlearn/src/brainlearn\ | ||
-engine name=sf2 cmd=/home/runner/work/Brainlearn/Brainlearn/Brainlearn/src/brainlearn\ | ||
-ratinginterval 1 -report penta=true -each proto=uci tc=4+0.04 -log file=fast.log | tee fast.out | ||
cat fast.log | ||
! grep "Assertion" fast.log > /dev/null | ||
! grep "disconnect" fast.out > /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.