1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00
Commit graph

3509 commits

Author SHA1 Message Date
Marco Costalba
20d6a8e57f Delay checking for duplicated killer moves
Follow the usual approach to delay computation
as far as possible, in case an earlier killer
cut-offs we avoid to do useless work.

This also greatly simplifies the code.

No functional change.
2015-02-01 13:17:42 +01:00
Marco Costalba
0dc6f16992 Small tweaks in movepick.cpp
No functional change.
2015-02-01 12:01:35 +01:00
Marco Costalba
21120288a3 Silence a warning under MSVC
warning C4100: 'ci' : unreferenced formal parameter

It is a silly and wrong one, but just silent it.

No functional change.
2015-02-01 10:40:22 +01:00
Marco Costalba
519b2fe849 More readable score<CAPTURES>()
No functional change.
2015-01-31 20:13:38 +01:00
Marco Costalba
f3189bdc9a Use C++11 loops in MovePicker
No functional change.
2015-01-31 20:02:08 +01:00
Marco Costalba
65f46794af Implicit conversion from ExtMove to Move
Verified with perft there is no speed regression,
and code is simpler. It is also conceptually correct
becuase an extended move is just a move that happens
to have also a score.

No functional change.
2015-01-31 19:22:07 +01:00
Marco Costalba
81d6c4a0d6 Another small tweak to skills
No functional change.
2015-01-31 18:24:39 +01:00
Marco Costalba
60c121f3b1 Sync with master
bench: 7374604
2015-01-31 13:05:51 +01:00
Marco Costalba
45eac9507c Use C++ loops in insert_pv_in_tt
Also small tweak to extract_ponder_from_tt

No functional change.
2015-01-31 12:57:52 +01:00
Marco Costalba
bfd0f95f06 Move uci_pv under UCI namespace
That's the correct place.

No functional change.
2015-01-31 12:18:24 +01:00
Marco Costalba
1b947aafbf Convert Reductions[] from int8_t to Depth
This is the type anyhow. Assorted cleanup while there.

No functional change.
2015-01-31 11:44:35 +01:00
Marco Costalba
a7592e69d7 Fix a MSVC warning
warning C4805: '|' : unsafe mix of type 'Bitboard' and type 'bool' in operation

No functional change.
2015-01-31 10:19:00 +01:00
Jean-Francois Romang
a3b4e9e23c Ressurrect hashfull patch
This is an old patch from Jean-Francois Romang to send
UCI hashfull info to the GUI:
https://github.com/mcostalba/Stockfish/pull/60/files

It was wrongly judged as a slowdown, but it takes much
less than 1 ms to run, indeed on my core i5 2.6Ghz it
takes about 2 microsecs to run!

Regression test is good:

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 7352 W: 1548 L: 1401 D: 4403

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 61432 W: 10307 L: 10251 D: 40874

I have set the name of the author to the original
one.

No functional change.
2015-01-30 18:07:20 +01:00
Marco Costalba
f6f1d24223 Sync with master
bench: 7374604
2015-01-30 17:58:18 +01:00
Marco Costalba
ce0a95c2c0 Simplify skill level and reduce ELO
This patch has two positive effects:

- Retire a hackish formula and leave
  just a natural, simple and plain one.

- Reduce strenght at very low level, but
  don't impact medium/high levels.

Actually even at level 0, SF is still too
strong for many beginners (this was reported
many times for instance on Droidfish user
comments on Google Play).

Test on fishtest shows that ELO drop is around
170 ELO at level 0 (good!), 130 ELO at level 1
and smoothly reduces (as expected) until level
10 where the drop is just of 8 ELO.

No functional change.
2015-01-29 22:35:24 +01:00
Alain SAVARD
8aa8608c2a Simplify backward pawn definition
Make use of 'lever' attribute

No functional change

Resolves #234
2015-01-28 21:29:04 +00:00
NicklasPersson
7837fb2aca King safety tuning with values obtained by SPSA.
Part I:

LTC:

LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 11529 W: 2075 L: 1882 D: 7572

Part II:

LTC:

ELO: 2.07 +-2.1 (95%) LOS: 97.3%
Total: 34859 W: 5967 L: 5759 D: 23133

Bench: 7374604

Resolves #228
2015-01-28 21:05:21 +00:00
Joona Kiiski
9f0d5241bf Restore development version
No functional change
2015-01-28 20:53:50 +00:00
Joona Kiiski
5b555525d2 Stockfish 6
Stockfish bench signature is: 8918745
2015-01-27 20:27:38 +00:00
Joona Kiiski
c4518e395e Stockfish 6 Release Candidate 3
- Fix a skill level problem: Don't allow move pruning at root node
- Revert "Fix profile build for gcc on Mac OSX". Results for a faster binary in x86-64.
- Fix a MSVC warning

Bench: 8918745
2015-01-25 22:03:57 +00:00
Stefan Geschwentner
d8b3ad2208 Fix a skill level problem: Don't allow move pruning at root node
Bench: 8918745

Resolves #231
2015-01-25 21:57:13 +00:00
Joona Kiiski
ec36b8dea9 Revert "Fix profile build for gcc on Mac OSX"
Seems to be a performance regression for standard build.

For SF6 people compiling on Mac OSX using profile-build option
just need to make necessary adjustments manually...

No functional change

Resolves #223
2015-01-25 21:51:09 +00:00
Marco Costalba
14f7d9a629 Re-arrange Skill struct
Instead of swapping sub-optimal move in Skill
d'tor, make it explicitly at the end of the search.

Also streamline and clarify relation with multiPV
and pass it directly instead of relying on the hacky
'candidates' member.

No functional change.
2015-01-25 11:16:54 +01:00
Marco Costalba
8ebf30d44a Fix a MSVC warning at W4
Warning is C4512 (assignment operator could not be generated)

Now, apart the foreign syzygy code, everything compiles
without warnings at warning level 4.

Backported from C++11 branch.

No functional change.
2015-01-25 09:36:05 +01:00
Joona Kiiski
5154ac9cff Stockfish 6 Release Candidate 2
- Fix a compilation issue related to BMI2 PEXT instruction
- Retrieve a ponder move from TT if PV is only one move long

Bench: 8080602

No functional change
2015-01-24 19:42:49 +00:00
Marco Costalba
54b5b528d9 Don't use _pext_u64() directly
This intrinsic to call BMI2 PEXT instruction is
defined in immintrin.h. This header should be
included only when USE_PEXT is defined, otherwise
we define _pext_u64 as 0 forcing a nop.

But under some mingw platforms, even if we don't
include the header, immintrin.h gets included
anyhow through an include chain that starts with
STL <algorithm> header. So we end up both defining
_pext_u64 function and at the same time defining
_pext_u64 as 0 leading to a compile error.

The correct solution is of not using _pext_u64 directly.

This patch fixes a compile error with some mingw64
package when compiling with x86-64.

No functional change.

Resolves #222
2015-01-24 19:38:06 +00:00
Marco Costalba
44643c2770 Try hard to retrieve a ponder move
In case we stop the search during a fail-high
it is possible we return to GUI without a ponder
move. This patch try harder to find a ponder move
retrieving it from TT. This is important in games
played with 'ponder on'.

bench: 8080602

Resolves #221
2015-01-24 19:35:31 +00:00
Marco Costalba
69407ae9b8 Additional work in bitbases
Verified the generated bitbases are unchanged.

No functional change.
2015-01-24 09:29:35 +01:00
Marco Costalba
18375e3bfb Rearrange bitbases C++11 way
No functional change.
2015-01-22 11:05:31 +01:00
Marco Costalba
6390a3da94 Document how to enable PEXT with MSVC
When not using Makefile, e.g. with MSVC, if hardware
supports BMI2 instructions, then USE_PEXT should be
added in project configuration to enable pext support.

No functional change.
2015-01-21 19:54:15 +01:00
Marco Costalba
36f8814aa6 Rearrange Endgames
Remove references to EndgameBase and use instead
Value and ScaleFactor as template parameters of
the endgames maps.

No functional change.
2015-01-21 17:35:53 +01:00
Marco Costalba
96e36a7897 Explicitly defaulted and deleted members
Better than a bit obscure implicit ones.

No functional change.
2015-01-21 13:18:19 +01:00
Marco Costalba
2ca2c3f35b Fun with lambdas
Use lambda functions instead of has_positive_value()
and toggle_case()

No functional change.
2015-01-21 11:33:53 +01:00
Marco Costalba
f54c44e6be Don't use _pext_u64() directly
This intrinsic to call BMI2 PEXT instruction is
defined in immintrin.h. This header should be
included only when USE_PEXT is defined, otherwise
we define _pext_u64 as 0 forcing a nop.

But under some mingw platforms, even if we don't
include the header, immintrin.h gets included
anyhow through an include chain that starts with
STL <algorithm> header. So we end up both defining
_pext_u64 function and at the same time defining
_pext_u64 as 0 leading to a compile error.

The correct solution is of not using _pext_u64 directly.

This patch fixes a compile error with some mingw64
package when compiling with x86-64.

No functional change.
2015-01-20 22:17:22 +01:00
Marco Costalba
ca3622f8e8 Fix a MSVC warning at W4
Warning is C4512 (assignment operator could not be generated)

Now, apart the foreign syzygy code, everything compiles
without warnings at warning level 4.

No functional change.
2015-01-19 08:11:43 +01:00
Joona Kiiski
97a034ad3e Stockfish 6 Release Candidate 1
Bench: 8080602

No functional change

Resolves #218
2015-01-18 14:53:11 +00:00
Joona Kiiski
1b62b47b62 Fix profile build for gcc on Mac OSX
Switch back to using -fprofile-generate and
-fprofile-use flags

No functional change

Resolves #219
Resolves #210
2015-01-18 14:42:30 +00:00
Joona Kiiski
7f51610103 Don't print fail-high or fail-lows in MultiPV mode
Supposed to give a better user experience when using MultiPV mode

No functional change

Resolves #217
2015-01-18 14:38:46 +00:00
Marco Costalba
712bbb052e Fix compile error with MSVC 2013
Without this std::min chokes with windows 'min' macro.

No functional change.
2015-01-18 15:14:05 +01:00
Marco Costalba
fe4fda474f Fun with initializer lists in UCI::square
No functional change.
2015-01-18 11:04:51 +01:00
Marco Costalba
f7d8ea3866 Fix a coverity scan warning
Coverity scan warns about uninitialized 'sf' argument when
calling probe(). Actually it is a false positive because
argument is passed by reference and assigned inside
probe(). Nevertheless it is a hint that fucntion signature
is a bit tricky, so rewrite it in a more conventional way,
assigning 'sf' from probe() return value.

No functional change.
2015-01-18 10:41:56 +01:00
Marco Costalba
f53aea45e3 Add syzygy support
bench: 8080602
2015-01-18 08:27:46 +01:00
Marco Costalba
3c07603dac Import C++11 branch
Import C++11 branch from:

https://github.com/mcostalba/Stockfish/tree/c++11

The version imported is teh last one as of today:
6670e93e50

Branch is fully equivalent with master but syzygy
tablebases that are missing (but will be added with
next commit).

bench: 8080602
2015-01-18 08:00:50 +01:00
Marco Costalba
c73f33f37e Fix syzygy warnings with Intel compiler
Quick hack, a better job would require to
first move all syzygy code up to SF standard.

No functional change.
2015-01-18 07:29:51 +01:00
Marco Costalba
05cb58f4fc Fix some missing rename from previous patch
No functional change.
2015-01-17 22:15:15 +01:00
Marco Costalba
595fc342cf Fix a possible overflow in TT resize
On platforms where size_t is 32 bit, we
can have an overflow in this expression:

(mbSize * 1024 * 1024)

Fix it setting max hash size of 2GB on platforms
where size_t is 32 bit.

A small rename while there: now struct Cluster
is definied inside class TranspositionTable so
we should drop the redundant TT prefix.

No functional change.
2015-01-17 21:42:47 +01:00
mstembera
58fdb84b0d Simplify and optimize value extractors
Speed up results by Joona:

gcc-4.7 (1.5%)
gcc-4.8 (0.5%)
gcc-4.9 (1.0%)

Speed up results by mstembera:

gcc 474
p-value: 0.719

gcc 482
p-value: 1

gcc 492
p-value: 0.859

No functional change

Resolves #211
2015-01-16 19:03:49 +00:00
lucasart
ab276357d7 Enable futility pruning for PV nodes in qsearch
STC:

LLR: 4.20 (-2.94,2.94) [-3.00,1.00]
Total: 85573 W: 17195 L: 17125 D: 51253

LTC:

LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 43385 W: 7298 L: 7214 D: 28873

Bench: 8080602

Resolves #206
2015-01-14 20:21:54 +00:00
Stefan Geschwentner
4abe333e1f Enable Futility pruning in PV nodes
STC:

LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21553 W: 4342 L: 4221 D: 12990

LTC:

LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 7675 W: 1351 L: 1209 D: 5115

Bench: 8668014

Resolves #205
2015-01-14 20:13:48 +00:00
hxim
7b20bb6e1a Use VALUE_ZERO instead of 0 when comparing with Value
This is the correct practice.

No functional change

Resolves #208
2015-01-13 21:07:18 +00:00