Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplification of partial_insertion_sort formula.
Passed STC: https://tests.stockfishchess.org/tests/view/6590110879aa8af82b9562e9 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 134880 W: 34468 L: 34355 D: 66057 Ptnml(0-2): 476, 16060, 34220, 16243, 441 Passed LTC: https://tests.stockfishchess.org/tests/view/659156ca79aa8af82b957f07 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 60780 W: 15179 L: 14996 D: 30605 Ptnml(0-2): 27, 6847, 16464, 7020, 32 closes #4955 Bench: 1338331
- Loading branch information
5546bc0
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.
@FauziAkram and @Disservin, the result of
-1960 - 3130
is-3130
and not-3330
. Please fix this.5546bc0
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.
explain
5546bc0
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.
@PedanticHacker There's nothing to fix here. The patch just removed the subtraction from the equation?
See the corresponding test on fishtest https://tests.stockfishchess.org/tests/view/659156ca79aa8af82b957f07,
which shows that
-1960 - 3130 * depth
can simply be replaced by-3330 * depth
without being a regression.5546bc0
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.
My calculator is an asshole. Please excuse the nag.
5546bc0
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.
The correct result is
-5090
.5546bc0
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.
Nice, but it still doesnt matter.
5546bc0
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.
5546bc0
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 totally missed the operator precedence.
It would be nice if calculations such as
-1960 - 3130 * depth
include the parenthesis, to be explicit which operation has precedence, just to avoid confusion. I think that seeing a calculation written as-1960 - (3130 * depth)
is more explicit.It now doesn't make sense for
-3330 * depth
, but for other calculations such as-1960 - 3130 * depth
was.5546bc0
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.
@PedanticHacker Operator precedence is primary school stuff....