]>
git.sesse.net Git - stockfish/log
Marco Costalba [Wed, 18 Mar 2015 07:01:50 +0000 (08:01 +0100)]
Simplify nosleep logic
Avoid redundant 'while' conditions. It is enough to
check them in the outer loop.
Quick tested for no regression 10K games at 4 threads
ELO: -1.32 +-3.9 (95%) LOS: 25.6%
Total: 10000 W: 1653 L: 1691 D: 6656
No functional change.
Marco Costalba [Tue, 17 Mar 2015 06:31:45 +0000 (07:31 +0100)]
Fix a bogus use of mutex
Spinlock must be used instead.
Tested for no regression at 15+0.05 th 4:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 25928 W: 4303 L: 4190 D: 17435
No functional change.
Resolves #297
Marco Costalba [Sun, 15 Mar 2015 09:05:57 +0000 (10:05 +0100)]
Re-arrange history update code
Unify the quites moves loop for both cases,
the compiler optimizes away the
if (is_ok((ss-1)->currentMove))
inside loop, so that the result is same
speed as original.
No functional change.
Marco Costalba [Sun, 15 Mar 2015 06:39:10 +0000 (07:39 +0100)]
Use acquire() and release() for spinlocks
It is more idiomatick than lock() and unlock()
No functional change.
Vince Negri [Sat, 14 Mar 2015 14:14:37 +0000 (14:14 +0000)]
Fix dependency generation for MacOSX
No functional change
Resolves #290
Joona Kiiski [Sat, 14 Mar 2015 21:12:13 +0000 (21:12 +0000)]
Fix dependency generation for C++11
No functional change
Resolves #291
Joona Kiiski [Sun, 15 Mar 2015 19:45:30 +0000 (19:45 +0000)]
Do not sleep, but yield
During the search, do not block on condition variable, but instead use std::this_thread::yield().
Clear gain with 16 threads. Again results vary highly depending on hardware, but on average it's a clear gain.
ELO: 12.17 +-4.3 (95%) LOS: 100.0%
Total: 7998 W: 1407 L: 1127 D: 5464
There is no functional change in single thread mode
Resolves #294
joergoster [Sat, 14 Mar 2015 21:35:52 +0000 (21:35 +0000)]
New values for Mobility and Outposts.
Both are the result of a SPSA tuning session with a custom book, 50k iterations each.
After an additional tuning session of the mobility values, tuning the delta values, with following result.
40k games at 9+0.05:
ELO: 4.13 +-2.2 (95%) LOS: 100.0%
Total: 40000 W: 8581 L: 8106 D: 23313
and LTC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 36518 W: 6049 L: 5782 D: 24687
Bench:
8567402
Resolves #284
Marco Costalba [Sat, 14 Mar 2015 07:49:50 +0000 (08:49 +0100)]
Link with -static in mingw
Fixes reported startup error about missing libwinpthread-1.dll
when the dll is not in the path.
The current -static-xxxx flags, introduced with:
https://github.com/official-stockfish/Stockfish/commit/
373503f4a9a990054b5
Only take in account standard libraries, but not thread
library.
No functional change.
Resolves #289
Joona Kiiski [Thu, 12 Mar 2015 20:36:32 +0000 (20:36 +0000)]
Introduce yielding spin locks
Idea and original implementation by Stephane Nicolet
7 threads 15+0.05
ELO: 3.54 +-2.9 (95%) LOS: 99.2%
Total: 17971 W: 2976 L: 2793 D: 12202
There is no functional change in single thread mode
Joona Kiiski [Thu, 12 Mar 2015 22:05:18 +0000 (22:05 +0000)]
Remove check for gcc version from Makefile.
This check is obsolete.
very old gcc versions can't compile c++11 code.
No functional change
Resolves #285
mstembera [Thu, 12 Mar 2015 19:49:30 +0000 (19:49 +0000)]
New easy move implementation
Spend much less time in positions where one move is much better than all other alternatives.
We carry forward pv stability information from the previous search to identify such positions.
It's based on my old InstaMove idea but with two significant improvements.
1) Much better instability detection inside the search itself.
2) When it's time to make a FastMove we no longer make it instantly but still spend at least 10% of normal time verifying it.
Credit to Gull for the inspiration.
BIG thanks to Gary because this would not work without accurate PV!
20K
ELO: 8.22 +-3.0 (95%) LOS: 100.0%
Total: 20000 W: 4203 L: 3730 D: 12067
STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 23266 W: 4662 L: 4492 D: 14112
LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 12470 W: 2091 L: 1931 D: 8448
Resolves #283
Stefan Geschwentner [Thu, 12 Mar 2015 07:29:57 +0000 (07:29 +0000)]
Introduce Counter Move History tables
Introduce a counter move history table which additionally is indexed by the last move's piece and target square.
For quiet move ordering use now the sum of standard and counter move history table.
STC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 4747 W: 1005 L: 885 D: 2857
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 5726 W: 1001 L: 872 D: 3853
Because of reported low NPS on multi core test
STC (7 threads):
ELO: 7.26 +-3.3 (95%) LOS: 100.0%
Total: 14937 W: 2710 L: 2398 D: 9829
Bench:
7725341
Resolves #282
Joona Kiiski [Wed, 11 Mar 2015 21:50:41 +0000 (21:50 +0000)]
Use thread specific mutexes instead of a global one.
This is necessary to improve the scalability with high number of cores.
There is no functional change in a single thread mode.
Resolves #281
Marco Costalba [Tue, 10 Mar 2015 20:50:45 +0000 (21:50 +0100)]
Retire spinlocks
Use Mutex instead.
This is in preparaation for merging with master branch,
where we stilll don't have spinlocks.
Eventually spinlocks will be readded in some future
patch, once c++11 has been merged.
No functional change.
Marco Costalba [Tue, 10 Mar 2015 16:13:52 +0000 (17:13 +0100)]
Cleanup thread_win.h
No functional change.
Marco Costalba [Tue, 10 Mar 2015 11:47:49 +0000 (12:47 +0100)]
Disable spinlocks
To allow testing on fishtest.
No functional change.
Marco Costalba [Tue, 10 Mar 2015 11:42:40 +0000 (12:42 +0100)]
Add thread_win32.h header
Workaround slow std::thread implementation in mingw
and gcc for Windows with our own old low level thread
functions.
No functional change.
Marco Costalba [Sat, 7 Mar 2015 09:52:55 +0000 (10:52 +0100)]
Sync with master
bench:
8285241
Marco Costalba [Sat, 7 Mar 2015 09:41:07 +0000 (10:41 +0100)]
Sync with master
No functional change.
hxim [Sat, 7 Mar 2015 09:03:19 +0000 (09:03 +0000)]
Transform minKingPawnDistance into a local variable
minKingPawnDistance is used only as local variable in one place so we don't need it to be part of "Pawns::Entry" structure.
No functional change.
Resolves #277
Stéphane Nicolet [Mon, 2 Mar 2015 21:01:19 +0000 (22:01 +0100)]
Update Makefile for Mac OS X compilation
This change in the Makefile restores the possibility to compile
Stockfish on Mac OS X 10.9 and 10.10 after the C++11 has been merged.
To use the default (fastest) settings, compile with:
make build ARCH=x86-64-modern
To test the clang settings, compile with
make build ARCH=x86-64-modern COMP=clang
Beware that the clang settings may provide a slightly slower (6%)
executable.
Backported from master.
No functional change
Resolves #275
Marco Costalba [Sat, 7 Mar 2015 07:36:23 +0000 (08:36 +0100)]
Re-enable spinlocks
For branch C++11, that doe snot run on fishtest,
there is no need of this kludge, let only master
have it.
No functional change.
Joona Kiiski [Sat, 7 Mar 2015 07:38:22 +0000 (07:38 +0000)]
Revert C++11 merge
Restore the state of repo back to commit 'Simplify pawn code a bit' (
1e6d21dbb6 )
No functional change
Stéphane Nicolet [Mon, 2 Mar 2015 21:01:19 +0000 (22:01 +0100)]
Update Makefile for Mac OS X compilation
This change in the Makefile restores the possibility to compile
Stockfish on Mac OS X 10.9 and 10.10 after the C++11 has been merged.
To use the default (fastest) settings, compile with:
make build ARCH=x86-64-modern
To test the clang settings, compile with
make build ARCH=x86-64-modern COMP=clang
Beware that the clang settings may provide a slightly slower (6%)
executable.
No functional change
Resolves #275
Marco Costalba [Mon, 2 Mar 2015 07:11:39 +0000 (08:11 +0100)]
Disable spinlocks
Now that c++11 branch has been merged in master,
disable unconditionally the spinlocks and use mutex
instead. This will allow to run fishtest even on HT
machines withouth changes.
In the future we will reintorduce spinlocks, once
we will have took care of fishtest.
No functional change.
Marco Costalba [Sun, 1 Mar 2015 16:12:09 +0000 (17:12 +0100)]
Allow to disable spinlocks
And use mutex instead. You may never want to do this.
It is a workaround to run c++11 on fishtest where many
machiens have HTenabled and this can be a problem when
number of cores set is higher than number of physical cores.
To disable spinlocks, just compile with -DNO_SPINLOCK flag
No functional change.
Marco Costalba [Sun, 1 Mar 2015 11:13:14 +0000 (12:13 +0100)]
Rename available_to()
Change this API to be more natural and simple.
Inspired by a patch by Joona.
No functional change.
Marco Costalba [Sat, 28 Feb 2015 19:21:38 +0000 (20:21 +0100)]
Sync with master
bench:
8285241
Stéphane Nicolet [Sat, 28 Feb 2015 17:00:52 +0000 (01:00 +0800)]
Simplify pawn code a bit
Simplify a bit the number of bitwise operators used to calculate the
pawn evaluation in pawns.cpp
No functional change.
Resolves #269
Stéphane Nicolet [Sat, 28 Feb 2015 16:58:32 +0000 (00:58 +0800)]
Raise penalty for knight attacked by pawn
Raise a bit the penalty for knight attacked by pawn.
STC:
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 27744 W: 5563 L: 5380 D: 16801
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 87571 W: 14747 L: 14314 D: 58510
Bench:
8285241
Resolves #270
Marco Costalba [Fri, 27 Feb 2015 08:52:56 +0000 (09:52 +0100)]
Retire apply_weight()
Use the more natural operator*() instead.
No functional change.
Marco Costalba [Thu, 26 Feb 2015 19:49:41 +0000 (20:49 +0100)]
Sync with master
bench:
8069601
Marco Costalba [Thu, 26 Feb 2015 17:56:16 +0000 (01:56 +0800)]
Normalize twice supported pawns
Align codying style to current conventions and move
formula for twice supported pawns to Pawns::init()
where it should be.
No functional change.
Alain SAVARD [Thu, 26 Feb 2015 17:50:35 +0000 (01:50 +0800)]
Apex Pawns
Pawns which are supported already have a bonus. Apex are pawns which are
supported twice.
This patch gives an additional 50% bonus for them.
STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 6549 W: 1333 L: 1209 D: 4007
LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 18002 W: 3037 L: 2850 D: 12115
Bench:
8069601
Resolves #267
Marco Costalba [Tue, 24 Feb 2015 11:24:53 +0000 (12:24 +0100)]
Don't assume the type of Time::point
But instead use the proper definition. Also
rewrite chrono functions while there.
No functional change.
Marco Costalba [Tue, 24 Feb 2015 10:33:40 +0000 (11:33 +0100)]
Small tweaks in pawns.cpp
No functional change.
Marco Costalba [Mon, 23 Feb 2015 18:22:37 +0000 (19:22 +0100)]
Improve spinlock implementation
Calling lock.test_and_set() in a tight loop creates expensive
memory synchronizations among processors and penalize other
running threads. So syncronize only only once at the beginning
with fetch_sub() and then loop on a simple load() that puts much
less pressure on the system.
Reported about 2-3% speed up on various systems.
Patch by Ronald de Man.
No functional change.
Marco Costalba [Sun, 22 Feb 2015 13:59:55 +0000 (14:59 +0100)]
Use spinlock instead of mutex for Threads and SplitPoint
It is reported to be defenitly faster with increasing
number of threads, we go from a +3.5% with 4 threads
to a +15% with 16 threads.
The only drawback is that now when testing with more
threads than physical available cores, the speed slows
down to a crawl. This is expected and was similar at what
we had setting the old sleepingThreads to false.
No functional change.
Marco Costalba [Sun, 22 Feb 2015 13:40:46 +0000 (14:40 +0100)]
Introduce Spinlock class
Initialization is more complex than what I'd like due
to MSVC compatibility that for some reason does not like:
std::atomic_flag lock = ATOMIC_FLAG_INIT;
No functional change.
Marco Costalba [Mon, 23 Feb 2015 12:35:04 +0000 (13:35 +0100)]
Sync with master
bench:
8253813
Marco Costalba [Sun, 22 Feb 2015 15:30:53 +0000 (16:30 +0100)]
Fix build under OS X
Reported by Vince Negri
No functional change.
Marco Costalba [Sun, 22 Feb 2015 13:19:12 +0000 (14:19 +0100)]
Sync with master
bench:
8253813
Marco Costalba [Thu, 19 Feb 2015 13:14:20 +0000 (14:14 +0100)]
Use only 'level' as late join metric
It seems other metric are useless, this allow us
to simplify the code and to prune useless stuff.
STC 20K games 4 threads
ELO: -0.76 +-2.8 (95%) LOS: 29.9%
Total: 20000 W: 3477 L: 3521 D: 13002
STC 10K games 16 threads
ELO: 1.36 +-3.9 (95%) LOS: 75.0%
Total: 10000 W: 1690 L: 1651 D: 6659
bench:
8253813
Marco Costalba [Sat, 21 Feb 2015 10:33:03 +0000 (11:33 +0100)]
Further refine SMP code
Backported from C++11 branch:
https://github.com/official-stockfish/Stockfish/commit/
7ff965eebfbc17d2b
https://github.com/official-stockfish/Stockfish/commit/
e74c2df907d5336d3d2b
Fully verified it is equivalent to master (see log msg
of individual commits for details).
No functional change.
Marco Costalba [Sat, 21 Feb 2015 09:40:59 +0000 (10:40 +0100)]
Use sp->master instead of bestThread
Verified with:
dbg_hit_on(th != sp->master);
It is 100% equivalent on more than 200K hits.
No functional change.
Stéphane Nicolet [Thu, 19 Feb 2015 20:33:07 +0000 (21:33 +0100)]
Fix comment for kingAdjacentZoneAttacksCount
The comment for kingAdjacentZoneAttacksCount[] was bogus, using
reversed semantics for color.
No functional change
Resolves #262
snicolet [Fri, 20 Feb 2015 19:56:57 +0000 (19:56 +0000)]
Mobile phalanxes
Try to create mobile phalanxes
STC:
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 52393 W: 10912 L: 10656 D: 30825
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,6.00]
Total: 30398 W: 5315 L: 5063 D: 20020
Bench:
8253813
Resolves #261
Marco Costalba [Fri, 20 Feb 2015 11:13:09 +0000 (12:13 +0100)]
Improve comments in SMP code
No functional change.
Marco Costalba [Fri, 20 Feb 2015 09:49:51 +0000 (10:49 +0100)]
Use range-based-for in late join
No functional change.
Marco Costalba [Fri, 20 Feb 2015 09:36:45 +0000 (10:36 +0100)]
Sync with master
bench:
7911944
Marco Costalba [Thu, 19 Feb 2015 22:12:59 +0000 (23:12 +0100)]
Clarify we don't late join with only 2 threads
Thanks to Gary for pointing this out.
No functional change.
Marco Costalba [Thu, 19 Feb 2015 09:43:28 +0000 (10:43 +0100)]
Use size_t consistently across thread code
No functional change.
Marco Costalba [Thu, 19 Feb 2015 09:27:24 +0000 (10:27 +0100)]
Retire redundant sp->slavesCount field
It should be used slavesMask.count() instead.
Verified 100% equivalent when sp->allSlavesSearching:
dbg_hit_on(sp->allSlavesSearching, sp->slavesCount != sp->slavesMask.count());
No functional change.
Marco Costalba [Thu, 19 Feb 2015 09:18:24 +0000 (10:18 +0100)]
Fix a warning under MSVC
Assignment of size_t to int.
No functional change.
Marco Costalba [Thu, 19 Feb 2015 09:08:29 +0000 (10:08 +0100)]
Add a couple of asserts to late join
Document and clarify that we cannot rejoin on ourselves
and that we never late join if we are master and all
slaves have finished, inded in this case we exit idle_loop.
No functional change.
Marco Costalba [Thu, 19 Feb 2015 08:51:17 +0000 (09:51 +0100)]
Remove useless condition in late join
In case of Threads.size() == 2 we have that sp->allSlavesSearching
is always false (because we have finished our search), bestSp is
always NULL and we never late join, so there is no need to special
case here.
Tested with dbg_hit_on(sp && sp->allSlavesSearching) and
verified it never fires.
No functional change.
Marco Costalba [Tue, 17 Feb 2015 09:10:58 +0000 (10:10 +0100)]
Compute SplitPoint::spLevel on the fly
And retire a redundant field. This is important also
from a concept point of view becuase we want to keep
SMP structures as simple as possible with the only
strictly necessary data.
Verified with
dbg_hit_on(sp->spLevel != level)
that the values are 100% the same out of more 50K samples.
No functional change.
Marco Costalba [Tue, 17 Feb 2015 07:23:35 +0000 (08:23 +0100)]
Simplify attackUnits formula
Use '/ 8' instead of '* 31 / 256'
Passed STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 55077 W: 10999 L: 10940 D: 33138
And LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 14751 W: 2530 L: 2400 D: 9821
bench:
7911944
Joona Kiiski [Sat, 14 Feb 2015 20:46:00 +0000 (20:46 +0000)]
Improve smp performance for high number of threads
Balance threads between split points.
There are huge differences between different machines and autopurging makes it very difficult to measure the improvement in fishtest, but the following was recorded for 16 threads at 15+0.05:
For Bravone (1000 games): 0 ELO
For Glinscott (1000 games): +20 ELO
For bKingUs (1000 games): +50 ELO
For fastGM (1500 games): +50 ELO
The change was regression for no one, and a big improvement for some, so it should be fine to commit it.
Also for 8 threads at 15+0.05 we measured a statistically significant improvement:
ELO: 6.19 +-3.9 (95%) LOS: 99.9%
Total: 10325 W: 1824 L: 1640 D: 6861
Finally it was verified that there was no (significant) regression for
4 threads:
ELO: 0.09 +-2.8 (95%) LOS: 52.4%
Total: 19908 W: 3422 L: 3417 D: 13069
2 threads:
ELO: 0.38 +-3.0 (95%) LOS: 60.0%
Total: 19044 W: 3480 L: 3459 D: 12105
1 thread:
ELO: -1.27 +-2.1 (95%) LOS: 12.3%
Total: 40000 W: 7829 L: 7975 D: 24196
Resolves #258
lucasart [Mon, 16 Feb 2015 01:34:26 +0000 (09:34 +0800)]
Compute checkers from scratch
This micro-optimization only complicates the code and provides no benefit.
Removing it is even a speedup on my machine (i7-3770k, linux, gcc 4.9.1):
stat test master diff
mean 2,403,118 2,390,904 12,214
stdev 12,043 10,620 3,677
speedup 0.51%
P(speedup>0) 100.0%
No functional change.
Marco Costalba [Sun, 15 Feb 2015 11:20:47 +0000 (12:20 +0100)]
Retire one do_move() overload
After Lucas patch it is almost useless.
No functional change.
lucasart [Sun, 15 Feb 2015 07:49:20 +0000 (15:49 +0800)]
Compute checkers from scratch
This micro-optimization only complicates the code and provides no benefit.
Removing it is even a speedup on my machine (i7-3770k, linux, gcc 4.9.1):
stat test master diff
mean 2,403,118 2,390,904 12,214
stdev 12,043 10,620 3,677
speedup 0.51%
P(speedup>0) 100.0%
No functional change.
Marco Costalba [Sun, 15 Feb 2015 10:24:34 +0000 (11:24 +0100)]
Revert "Delayed killers checking"
It seems a slowdown when run with fishbench.
No functional change.
Marco Costalba [Sat, 14 Feb 2015 14:55:11 +0000 (15:55 +0100)]
Further simplify KingDanger init
And remove a tale whitespace while there.
No functional change.
Marco Costalba [Sat, 14 Feb 2015 14:55:11 +0000 (15:55 +0100)]
Further simplify KingDanger init
And remove a tale whitespace while there.
No functional change.
Marco Costalba [Sat, 14 Feb 2015 14:29:21 +0000 (15:29 +0100)]
Sync with master
Bench:
7369224
snicolet [Fri, 13 Feb 2015 21:33:00 +0000 (21:33 +0000)]
Small bonus for all safe pawn pushes
Pawn flexibility: add a small bonus for all safe pawn pushes
STC:
LLR: 2.70 (-2.94,2.94) [-1.50,4.50]
Total: 18233 W: 3705 L: 3557 D: 10971
LTC:
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 17684 W: 3042 L: 2854 D: 11788
Bench:
7369224
Resolves #253
Marco Costalba [Fri, 13 Feb 2015 10:54:46 +0000 (11:54 +0100)]
Reformat tracing functions
No functional change.
hxim [Mon, 9 Feb 2015 18:12:04 +0000 (19:12 +0100)]
Fix KingDanger[] array initialization
Use integer arithmetic instead of floating point arithmetic.
Floating point arithmetic was causing different results for some 32-bit compiles
No functional change
Resolves #249
Resolves #250
Marco Costalba [Sun, 8 Feb 2015 20:31:25 +0000 (21:31 +0100)]
Sync with master
bench:
7699138
Joona Kiiski [Sun, 8 Feb 2015 19:20:39 +0000 (19:20 +0000)]
Pawn Center Bind Bonus
Bonus for two pawns controlling the same central square
STC:
LLR: 3.14 (-2.94,2.94) [-1.50,4.50]
Total: 15974 W: 3291 L: 3133 D: 9550
LTC:
LLR: 3.24 (-2.94,2.94) [0.00,6.00]
Total: 10449 W: 1837 L: 1674 D: 6938
Idea from Lyudmil Tsvetkov.
Bench:
7699138
Resolves #248
Marco Costalba [Sun, 8 Feb 2015 12:21:50 +0000 (13:21 +0100)]
Shuffle put_piece() and friends signatures
It is more consistent with the others member functions.
No functional change.
Marco Costalba [Sat, 7 Feb 2015 18:34:24 +0000 (19:34 +0100)]
Small tweaks in do_move and friends
Also remove useless StateCopySize64 optimization:
compiler uses SSE movups instruction anyhow and
does not need this trick (verified with fishbench).
No functional change.
Marco Costalba [Sat, 7 Feb 2015 18:13:41 +0000 (19:13 +0100)]
Avoid casting to char* in prefetch()
Funny enough, gcc __builtin_prefetch() expects
already a void*, instead Windows's _mm_prefetch()
requires a char*.
The patch allows to remove ugly casts from caller
sites.
No functional change.
Marco Costalba [Sat, 7 Feb 2015 13:34:35 +0000 (14:34 +0100)]
Rewrite pos_is_ok()
No functional change.
Marco Costalba [Sat, 7 Feb 2015 11:07:43 +0000 (12:07 +0100)]
Micro-optimize SEE
Results for 10 tests for each version (gcc 4.8.3 on mingw):
Base Test Diff
Mean
1502447 1507917 -5470
StDev 3119 1364 4153
p-value: 0,906
speedup: 0,004
Results for 10 tests for each version (MSVC 2013):
Base Test Diff
Mean
1400899 1403713 -2814
StDev 1273 2804 2700
p-value: 0,851
speedup: 0,002
No functional change.
Marco Costalba [Sat, 7 Feb 2015 10:15:38 +0000 (11:15 +0100)]
Rename dbg_hit_on_c() to dbg_hit_on()
Use an overload instead of a new named function.
I have found this handier and easier when adding
some quick debug code.
No functional change.
Marco Costalba [Sat, 7 Feb 2015 10:15:38 +0000 (11:15 +0100)]
Rename dbg_hit_on_c() to dbg_hit_on()
Use an overload instead of a new named function.
I have found this handier and easier when adding
some quick debug code.
No functional change.
Marco Costalba [Sat, 7 Feb 2015 09:31:47 +0000 (10:31 +0100)]
Sync with master
bench:
7696257
lucasart [Sat, 7 Feb 2015 09:09:56 +0000 (09:09 +0000)]
Removes useless templates, some of which lead to code duplication: is_K*() functions.
No functional change
Resolves #245
Stefan Geschwentner [Tue, 3 Feb 2015 03:16:50 +0000 (11:16 +0800)]
Add bonus for pawn attack threats
Latent pawn attacks: Add a bonus to safe pawn pushes which attacks an
enemy piece. Based on an idea of Lyudmil Tsvetkov.
STC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 7925 W: 1666 L: 1537 D: 4722
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 40109 W: 6841 L: 6546 D: 26722
Bench:
7696257
Resolves #240
mstembera [Tue, 3 Feb 2015 03:09:37 +0000 (11:09 +0800)]
Profile build options
I went through all the individual compile options that differ between
-fprofile-generate/-fprofile-use and -fprofile-arcs/-fbranch-probabilities
and distilled the speed difference down to only turning off
-fno-peel-loops and -fno-tracer. Using this we still get the full speedup
(maybe a bit more because other optimizations stay on) and it's also much cleaner
because we can get rid of the "@rm -f ucioption.gc*" hack for all versions of gcc.
No functional change.
Resolves #237
NicklasPersson [Mon, 2 Feb 2015 20:00:52 +0000 (04:00 +0800)]
Improved King Safety values
From an SPSA-session on king safety.
STC:
ELO: 3.21 +-2.1 (95%) LOS: 99.8%
Total: 40000 W: 8181 L: 7812 D: 24007
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 47765 W: 8091 L: 7785 D: 31889
Bench:
8589262
Resolves #241
Marco Costalba [Sun, 1 Feb 2015 15:32:21 +0000 (16:32 +0100)]
Use move assignment in movegen.h
No functional change and same speed (tested with perft)
Marco Costalba [Sun, 1 Feb 2015 12:29:27 +0000 (13:29 +0100)]
Allow to assign a Move to an ExtMove
After defining ExtMove::operator Move(), this is a
natural extension.
No fnctional change.
Marco Costalba [Sun, 1 Feb 2015 12:08:14 +0000 (13:08 +0100)]
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.
Marco Costalba [Sun, 1 Feb 2015 09:59:01 +0000 (10:59 +0100)]
Small tweaks in movepick.cpp
No functional change.
Marco Costalba [Sun, 1 Feb 2015 09:40:22 +0000 (10:40 +0100)]
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.
Marco Costalba [Sat, 31 Jan 2015 19:13:38 +0000 (20:13 +0100)]
More readable score<CAPTURES>()
No functional change.
Marco Costalba [Sat, 31 Jan 2015 18:53:19 +0000 (19:53 +0100)]
Use C++11 loops in MovePicker
No functional change.
Marco Costalba [Sat, 31 Jan 2015 17:39:51 +0000 (18:39 +0100)]
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.
Marco Costalba [Sat, 31 Jan 2015 12:22:06 +0000 (13:22 +0100)]
Another small tweak to skills
No functional change.
Marco Costalba [Sat, 31 Jan 2015 12:04:15 +0000 (13:04 +0100)]
Sync with master
bench:
7374604
Marco Costalba [Sat, 31 Jan 2015 11:31:00 +0000 (12:31 +0100)]
Use C++ loops in insert_pv_in_tt
Also small tweak to extract_ponder_from_tt
No functional change.
Marco Costalba [Sat, 31 Jan 2015 10:54:25 +0000 (11:54 +0100)]
Move uci_pv under UCI namespace
That's the correct place.
No functional change.
Marco Costalba [Sat, 31 Jan 2015 09:43:47 +0000 (10:43 +0100)]
Convert Reductions[] from int8_t to Depth
This is the type anyhow. Assorted cleanup while there.
No functional change.
Marco Costalba [Sat, 31 Jan 2015 09:19:00 +0000 (10:19 +0100)]
Fix a MSVC warning
warning C4805: '|' : unsafe mix of type 'Bitboard' and type 'bool' in operation
No functional change.
Jean-Francois Romang [Sun, 25 Jan 2015 07:57:51 +0000 (08:57 +0100)]
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.
Marco Costalba [Fri, 30 Jan 2015 16:58:18 +0000 (17:58 +0100)]
Sync with master
bench:
7374604