-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Small cleanup April 2022 #3973
Small cleanup April 2022 #3973
Conversation
Compiling with gcc and: `make build -j ARCH=x86-64-bmi2 debug=yes sanitize=undefined` shows a warning: `evaluate.cpp:1115:38: warning: ‘v’ may be used uninitialized [-Wmaybe-uninitialized]` The code seems to be safe (i.e. is impossible to evade both ifs) but the warning is annoying. This patch somehow mute the warning in `gcc`. I don't know how other compilers behave. No functional change
Use `true` instead. Thanks amchess No functional change
Correct indention for function |
thanks locutus2 No functional change
Stockfish/src/syzygy/tbprobe.cpp Line 1293 in e1f12aa
There are actually 462 combinations. Later, correctly: Stockfish/src/syzygy/tbprobe.cpp Lines 802 to 803 in e1f12aa
|
…2022 (Solve conflicts in evaluate.cpp) Bench: 7729968
thanks niklasf No functional change
src/evaluate.cpp
Outdated
bool useClassical = (pos.this_thread()->depth > 9 || pos.count<ALL_PIECES>() > 7) && | ||
abs(eg_value(pos.psq_score())) * 5 > (856 + pos.non_pawn_material() / 64) * (10 + pos.rule50_count()); | ||
|
||
// Deciding between classical and NNUE eval (~10 Elo): for high PSQ imbalance we use classical, | ||
// but we switch to NNUE during long shuffling or with high material on the board. | ||
if ( !useNNUE | ||
|| ((pos.this_thread()->depth > 9 || pos.count<ALL_PIECES>() > 7) && | ||
abs(eg_value(pos.psq_score())) * 5 > (856 + pos.non_pawn_material() / 64) * (10 + pos.rule50_count()))) | ||
|| useClassical) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this cleanup, makes code easier to read, but the comments describing the code should move with the code.
…2022 Bench: 6174823
Small CI leftover: diff --git a/README.md b/README.md
index 6e6e762e6..bc2b1b185 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,6 @@
## Overview
[![Build Status](https://github.com/official-stockfish/Stockfish/actions/workflows/stockfish.yml/badge.svg)](https://github.com/official-stockfish/Stockfish/actions)
-[![Build Status](https://ci.appveyor.com/api/projects/status/github/official-stockfish/Stockfish?branch=master&svg=true)](https://ci.appveyor.com/project/mcostalba/stockfish/branch/master)
[Stockfish](https://stockfishchess.org) is a free, powerful UCI chess engine
derived from Glaurung 2.1. Stockfish is not a complete chess program and requires a |
I'm not sure if this could be added to this PR but there is some inconsistent indentation in the nnue_feature_transformer.h and specially in the Makefile Stockfish/src/nnue/nnue_feature_transformer.h Lines 155 to 156 in 22b7909
Stockfish/src/nnue/nnue_feature_transformer.h Line 293 in 22b7909
Lines 825 to 829 in 22b7909
Also, it looks like the last commit added a seemingly unnecessary new line Lines 193 to 195 in 22b7909
|
…2022 Bench: 6407734
No functional change
Thanks vondele No functional change
remove extra line in evaluate.cpp fix indentation of inlines in `nnue_feature_trasformer.h` fix indentation of ifdefs in `Makefile` (using tabs) thanks dav1312 No functional change
|
For me the logic in probcut's TT condition is hard to follow:
Personally I would prefer this equivalent which corresponds more to human thinking
|
In either case, a grouped-together set of conditions should get more indentation for the operators within that group |
Stack->depth is simply not used. Might as well remove the field from the struct. |
|
I'll be merging this shortly, thanks for maintaining this PR. |
The comment in evaluate.cpp starting with "// Deciding between..." is now duplicated on lines 1086 and 1091 after this PR. |
that was a merge mistake... will fix. Probably a good reason to start a new cleanup PR ;-) |
closes official-stockfish#3973 No functional change
The purpose of this pr is to collect various small cleanups: feel free to leave a comment proposing a new cleanup or a different approach to an existing one!
Commit messages are self-explanatory (at least for the first two cleanups... :-) )