]>
git.sesse.net Git - stockfish/log
Marco Costalba [Wed, 12 May 2010 08:35:10 +0000 (10:35 +0200)]
Retire splitPoint->cpus field
It is redundant with splitPoint->slaves[].
Also move slaves[MAX_THREADS] among the shared data in
SplitPoint definition as it should have been already.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 11 May 2010 13:29:54 +0000 (15:29 +0200)]
Syncing sp_search() and search()
Small twekas to make the two searches as similar as
possible.
Also removed an useless setting of mateKiller in sp_search()
No functional change (tested with FakeSplit)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 11 May 2010 08:40:14 +0000 (10:40 +0200)]
Simplify init_safety()
In this for is also ready to be tuned....to be continued ;-)
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 11 May 2010 08:07:17 +0000 (10:07 +0200)]
Greatly simplify weight_option()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 10 May 2010 10:27:33 +0000 (12:27 +0200)]
Small evaluate_passed_pawns() cleanup
Mainly renamed local variables with sensible names.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 May 2010 22:31:43 +0000 (23:31 +0100)]
Better integration of faked split
We don't need to comment/uncomment code, just
set FakeSplit bool to true to enable faked split.
Also reintroduced some asserts and cleaned up a bit.
Tested that with FakeSplit = true we have reproducible
finger printing even in SMP.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 9 May 2010 19:04:21 +0000 (22:04 +0300)]
Disable fake-mode
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 9 May 2010 18:59:39 +0000 (21:59 +0300)]
Unite sp_search() and sp_search_pv()
Also introduce a new rule:
In sp_search() always must hold: sp->alpha < sp->beta
Should fix some rear but very nasty races
To keep everything in sync, search() is also modified to
obey this rule. Because this affects only PV-nodes, should
have zero meaning to speed.
No functional change in fake mode
Regression test after 854 games
Mod vs Orig 433 - 421, no crashes.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 9 May 2010 10:20:55 +0000 (13:20 +0300)]
Introduce fake-mode for split
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 May 2010 12:03:58 +0000 (13:03 +0100)]
Revert to old prefetch detection logic
It was broken on Windows 64bit with MSVC and possibly
on other platforms, so revert to old proven one.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 May 2010 09:30:50 +0000 (11:30 +0200)]
Fix an off-by-one bug in ThreatBonus[] table
We need a retuning anyhow.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 8 May 2010 13:59:00 +0000 (16:59 +0300)]
Templatize qsearch
No functional change and 2% speed-up on GCC.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 7 May 2010 07:39:28 +0000 (09:39 +0200)]
Retire mate threat detection from evaluation
Remove a lot of complex, obscure and useless code.
After 999 games at 1+0
Mod vs Orig +162 =673 -164 -1 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 12:30:34 +0000 (13:30 +0100)]
Add a comment and a FIXME
And fix indentation too.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 12:12:46 +0000 (13:12 +0100)]
Lookup TT for eval also in PV nodes
We don't need to evaluate the position if it
is already cached in TT. We already do this
in non-PV case.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 12:06:55 +0000 (13:06 +0100)]
Fix an obsoleted descrption comment
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 11:58:10 +0000 (12:58 +0100)]
Unify Internal iterative deepening
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 11:39:52 +0000 (12:39 +0100)]
Templetize extension() function
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 11:26:34 +0000 (12:26 +0100)]
Templetize reduction() functions
No functional or speed change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 May 2010 10:47:00 +0000 (11:47 +0100)]
Use enum NodeType instead of opaque true/false
Increase readibility.
No functional and speed change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 8 May 2010 08:54:51 +0000 (11:54 +0300)]
Unite search_pv() and search()
A lot of redundant code removed: -182 lines of code
No functional and speed change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 7 May 2010 09:36:25 +0000 (11:36 +0200)]
Rename AttackWeight[] in KingAttackWeights[]
Also simplify a bit the code removing useless
named constants.
No functional change.
Marco Costalba [Fri, 7 May 2010 09:17:26 +0000 (11:17 +0200)]
Array ThreatBonus[] is initialized at zero by compiler
We don't need to do the job.
No functional change.
Marco Costalba [Thu, 6 May 2010 18:10:04 +0000 (19:10 +0100)]
Properly indent evaluate_king()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 6 May 2010 12:22:53 +0000 (14:22 +0200)]
Rename futilityMargin in kingDanger in EvalInfo
This is what actually is.
A standard naming convention suggests to name a variable
with someting resembling _what_ the variable is and not
_how_ the variable is used. This normally results
in easier to read code.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 6 May 2010 09:13:07 +0000 (11:13 +0200)]
Simplify some obsolete code in king safety
Now that QueenCheckBonus and friends are always > 0
we can remove a bunch of useless 'if' statements.
No functional change.
Marco Costalba [Thu, 6 May 2010 08:36:01 +0000 (10:36 +0200)]
Rename king "safety" to king "danger"
A bigger "safety" value is actually a bigger
threat for the king, so it is a bigger "danger"
With this renaming "Cowardice" and "Aggressiveness"
UCI parameters become easier to understand.
It is also easier to understand why the once "safety"
value (that is a "danger") is subtracted from evaluation
instead of being added.
No functional change.
Marco Costalba [Thu, 6 May 2010 07:58:04 +0000 (09:58 +0200)]
Evaluation weights cleanup
Use a Weights[] array instead of named variables to
store evaluation weights.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 6 May 2010 02:23:41 +0000 (03:23 +0100)]
Set Mate Threat Extension to OnePly
For both PV and non-PV nodes.
After 981 games at 1+0
Mod vs Orig +153 =686 -142 +4 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 1 May 2010 04:41:25 +0000 (05:41 +0100)]
Avoid a call to apply_weight() in evaluate_king()
Precompute scores in SafetyTable[] instead of calculate
them on the fly.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 18 Apr 2010 16:12:47 +0000 (19:12 +0300)]
Further push the LMR pedal
More aggressive LMR reductions.
Tested at different time controls:
- Tested with 1CPU 1+0, after 3000 games, result was +12 ELO
- Tested this with 4CPU 1+0 and got sth around 5-10 ELO increase
- Last one at long time control,after ~1000 games with 10+0 result is:
Orig - Mod: 491 - 520 (+10 elo)
A testing marathon by Joona for this important change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 2 May 2010 12:39:47 +0000 (13:39 +0100)]
A promotion piece cannot be a king or a pawn
Or any other garbage value bigger then QUEEN.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 2 May 2010 11:02:41 +0000 (12:02 +0100)]
Do not return from idle_loop() with lock held
Master thread returns from idle_loop() when sp->cpus == 0,
but cpus is decremented by slave threads under sp->lock,
so it could happen that we return in split(), where we release
the split point, with sp->lock still held.
This patch guarantees that sp->lock is released when returning
to split().
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 2 May 2010 08:28:37 +0000 (09:28 +0100)]
Reverse the logic used to detect prefetch
Explicitly search for x86 architecture instead of
excluding the others.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 1 May 2010 09:34:28 +0000 (10:34 +0100)]
Allow a static evaluation to overwrite an exsisting entry
The idea here is that if we cut-off after a stand pat the
already exsisting TT entry was not usable with current
beta, so overwrite anyway.
After 999 games at 1+0
Mod vs Orig +173 =665 -161 + 4 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 1 May 2010 05:12:04 +0000 (06:12 +0100)]
Do not refresh TT in qsearch
Almost no change and simplifies a bit the code.
After 961 games at 1+0
Mod vs Orig +156 =650 -146 +4 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 29 Apr 2010 17:21:48 +0000 (18:21 +0100)]
Refresh TT entry after a cut-off to avoid aging
Re-save the same TT entry if value is usable and allow
us to cut-off, it means that entry is valuable and
we want to keep it fresh updating the 'generation'
parameter up to the current value.
Patch suggested by J. Wesley Cleveland and better
clarified by Miguel A. Ballicora.
After 999 games at 1+0 64MB hash size
Mod vs Orig +167 =677 -155 +4 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Mon, 26 Apr 2010 08:51:03 +0000 (11:51 +0300)]
Fix compile error on GCC
Add missing prototype.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 27 Apr 2010 05:17:32 +0000 (06:17 +0100)]
Endgame's apply() method can be 'const'
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 27 Apr 2010 04:00:45 +0000 (05:00 +0100)]
Remove an obsolete comment
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 26 Apr 2010 12:43:03 +0000 (14:43 +0200)]
Another small material tweak
In this case we avoid to name the 'black' version of the
endgame function but use a vector indexed by color instead.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 26 Apr 2010 09:42:46 +0000 (11:42 +0200)]
Cleanup material distribution detectors
No functional change (verified each function)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 25 Apr 2010 09:31:48 +0000 (10:31 +0100)]
Do not call exit_threads() in Application d'tor
Because exit_threads() references the global object TM, we
need to call the function when still inside main(), otherwise,
due to undefined global object initialization and destruction
we could end up with referencing an already destroyed object.
Actually this should not happen because Application singleton
is initialized _only_ after all the other globals due to how
Application::initialize() is defined, but this is very tricky
C++ and not easy to follow, even for me ;-)
Also rearranged a bit main() code flow.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 25 Apr 2010 07:39:24 +0000 (08:39 +0100)]
Small passed pawns evaluation cleanup
Moved evaluation of unstoppable pawns out of
evauation of passed pawns because event frequency is
much lower. Added evaluate_unstoppable_pawns() that
is called very seldom and contains all the unstoppable
pawn logic.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 21 Apr 2010 19:42:34 +0000 (20:42 +0100)]
Simplify a bit futility marging formula
Should be a very minor change, but there is a small
functional change because futility_margin() is used in more
places then in the pruning formula.
After 999 games at 1+0
Mod vs Orig +167 =678 -154 +5 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 21 Apr 2010 19:35:47 +0000 (20:35 +0100)]
Revert scale factor in pawn evaluation
It simply doesn't seems to work both in direct matches
and in balance tuning.
So revert the idea.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 19 Apr 2010 07:06:34 +0000 (09:06 +0200)]
Introduce PawnsQtyTable[] to refine pawn's drawish calculation
Also fix dimension of UnpairedPawnsTable[] to accomodate the
case in which we have 8 unpaired pawns, i.e. only one side has
pawns, the other side has no pawns.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 19 Apr 2010 05:37:07 +0000 (06:37 +0100)]
First attempt at tweaking UnpairedPawnsTable[] values
Values by Joona.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 09:25:59 +0000 (10:25 +0100)]
Introduce scale factor in pawn evaluation
The idea is to reduce the score if we have many
pawns opposing an enemy pawn so that the draw
possibility increases.
Just introduced the logic, but no functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 09:09:12 +0000 (10:09 +0100)]
Fix candidate passed pawn definition
A pawn is candidate to be passed if doesn't have enemy pawns
in just front of him, not also behind !
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 08:58:57 +0000 (09:58 +0100)]
Retire Position::pawn_is_passed() and friends
Absolutely no useful at all, just code obfuscation so
use real definition instead.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 08:45:23 +0000 (09:45 +0100)]
Introduce table SquaresInFrontMask[2][64]
It will be used to lookup squares in front of
a given square. Same concept of PassedPawnMask[]
and OutpostMask[].
Also small tweaks in bitboard.h
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 08:18:49 +0000 (09:18 +0100)]
Better perft integration in benchmark
Now with:
stockfish bench 128 1 5 default perft
it is possible to get perft 5 results of each position and
the first 3 positions correspond to the well known test
position in:
http://chessprogramming.wikispaces.com/Perft+Results
This allow to quickly check for perft consistency running
the 'bench' command.
No functional change but signature has changed because
bench default positions 2 and 3 have changed.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 18 Apr 2010 06:57:34 +0000 (07:57 +0100)]
Space inflate bitboard.cpp
This file, somehow, avoided the "space inflate" treatment...until now ;-)
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 17 Apr 2010 10:24:25 +0000 (11:24 +0100)]
Convert polyglot.ini to use Linux line ending
Instead of Windows cr/lf
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 17 Apr 2010 10:22:40 +0000 (11:22 +0100)]
Teach polyglot the new "Best Book Move" UCI option
Also turn off log by default as is in UCI case.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 16 Apr 2010 05:19:33 +0000 (06:19 +0100)]
Revert saving of null search value in TT
Revert all the patches that introduced the change and
more or less fixed the zugzwang issue.
There is a gain against last current version and we
can remove a lot of code.
After 979 games at 1+0 on my QUAD
Mod vs Orig +152 =688 -139 +5 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 14 Apr 2010 05:13:24 +0000 (06:13 +0100)]
Don't overwrite exsisting TT with null search value
Real search is considered of higher quality then null
search one.
This allows to fix the zugzwang issue with a minimal
impact on ELO.
Zugzwang verified on position:
8/7P/8/8/K2b4/p7/1k6/1B6 b - -
After 999 games at 1+0 on my QUAD
Mod vs Orig(
94bb196 ) +168 =657 -174 -2 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 11 Apr 2010 17:27:34 +0000 (20:27 +0300)]
Prevent the use of nullmove TT value only at verification search
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 11 Apr 2010 17:21:26 +0000 (20:21 +0300)]
Introduce NullStatus enum
No functional change
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 11 Apr 2010 15:04:39 +0000 (18:04 +0300)]
Revert "Introduce "Zugzwang detection" temporary hack for 1.7.1"
This reverts commit
f9d3b48ad0ed62732bb07d4811f4fd17cf088cfe .
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 15 Apr 2010 13:54:44 +0000 (15:54 +0200)]
Add "Best Book Move" UCI option
Is a boolean option that when set allows Stockfish
to select the best book move across the possible ones.
Feature requested by Salvo Spitaleri.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Wed, 14 Apr 2010 18:14:16 +0000 (21:14 +0300)]
Fix overflow in init_safety
Also write the code in more clean way
No functional change
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Tue, 13 Apr 2010 15:25:50 +0000 (18:25 +0300)]
Fix evasion pruning condition
Avoid incorrect mate scores in positions like
BK5/1R4b1/2k1Np2/3p3b/2p3pq/p1rB4/n2n1p2/8 w - -
Thanks for Jouni Uski for reporting the problem
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 11 Apr 2010 16:03:03 +0000 (17:03 +0100)]
Fix some warnings under +w1 HP-UX compile
This is the world's fussiest compiler with +w1
Warnings reported by Richard Lloyd.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 19:42:31 +0000 (20:42 +0100)]
Restore development version
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 19:41:10 +0000 (20:41 +0100)]
Update polyglot.ini
Remove obsolete options and add a few ones.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 15:48:25 +0000 (16:48 +0100)]
Stockfish 1.7.1
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 15:40:03 +0000 (16:40 +0100)]
Introduce "Zugzwang detection" temporary hack for 1.7.1
Add an UCI option "Zugzwang detection" OFF by default that
enables correct detection of zugzwang.
This is just to let 1.7.1 be 100% compatible with 1.7 and
should be removed after release.
Verified 100% functional equivalent to 1.7
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 10:35:30 +0000 (11:35 +0100)]
Revert HT detection
Fall back on 1.6.3 behaviour.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 10:15:16 +0000 (11:15 +0100)]
Revert last patch
It fails in test position:
8/7P/8/8/K2b4/p7/1k6/1B6 b - -
Not clear why but we revert because it fixes the issue.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 09:48:08 +0000 (10:48 +0100)]
Relax TT condition for zugzwang verified null values
In this case use a normal VALUE_TYPE_LOWER TT type instead of
VALUE_TYPE_NS_LO. This allow us to TT cut-off in a bit more nodes.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 09:32:17 +0000 (10:32 +0100)]
Avoid TT cutoffs at root of null zugzwang verification
This patch fixes an issue with zugzwang well explained by Tord:
"Assume that a zugzwang position occurs at iteration N,
at a search depth d, with d < 6*OnePly. The null move search
fails high, and no verification search is done, because the
depth is too small. The position gets stored in the transposition
table with a good score and a depth of d.
Now, consider what happens when the same position occurs at iteration
N+1, this time with a depth of d+OnePly (i.e. one ply deeper than at
the previous iteration). Once again, the null move search fails
high. The point is that the verification search will also fail high,
because of an instant transposition table cutoff caused by the value
stored in the TT during the previous iteration."
With this patch we simply do not allow TT cutoffs at the root node
of a null move verification search if the TT value was found by a
null search.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 10 Apr 2010 08:53:08 +0000 (09:53 +0100)]
Use a flag in TT to track null search values
Add VALUE_TYPE_NS_LO to enum ValueType and use it when
saving in TT a value from a null search.
Currently no action is performed, the next patch will enable
the new type.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 9 Apr 2010 06:05:32 +0000 (07:05 +0100)]
Fix a warning under HP-UX ANSI C++
Reported warning is:
warning #2514-D: pointless comparison of unsigned
integer with a negative constant
Spotted by Richard Lloyd.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 7 Apr 2010 11:08:50 +0000 (13:08 +0200)]
Stockfish 1.7
Signatures are:
./stockfish bench 128 1 12 default depth
8299338
./stockfish bench 128 1 13 default depth
15694903
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Tord Romstad [Tue, 6 Apr 2010 08:19:09 +0000 (10:19 +0200)]
Fix PowerPC and ARM compatibility.
Tord Romstad [Mon, 5 Apr 2010 19:47:28 +0000 (21:47 +0200)]
Add -mdynamic-no-pic to CFLAGS when compiling with GCC under OS X.
Without this flag, the __cpuid() function doesn't compile correctly
in 32-bit mode.
Marco Costalba [Mon, 5 Apr 2010 19:08:01 +0000 (20:08 +0100)]
Fix one gcc 4.4 warning
Properly fix previous warning. Patch from Joona.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 5 Apr 2010 14:36:06 +0000 (15:36 +0100)]
Fix a warning in HT_enabled()
Under gcc we have:
warning: dereferencing type-punned pointer will break
strict-aliasing rules
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 3 Apr 2010 07:54:21 +0000 (08:54 +0100)]
Store score in TT when null search fails high
Use full depth, not reduced one. This allows
to avoid to do a null search when in the same
position and at the same or bigger depth the
null search failed high.
A very small increase, if any.
After 963 games at 1+0
Mod vs Orig: +158 =657 -147 +4 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 2 Apr 2010 09:48:12 +0000 (11:48 +0200)]
Cleanup pawn storm code
In this form it is even more evident we have some
issue there to be fixed sooner then later....
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 31 Mar 2010 07:57:48 +0000 (09:57 +0200)]
Fix a comment in evaluate.cpp
Function name is wrong.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 31 Mar 2010 05:43:12 +0000 (06:43 +0100)]
Change poll() signature
After previous patch we don't need any more the call parameters.
This fixes a couple of warnings under MSVC.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Tord Romstad [Tue, 30 Mar 2010 13:15:01 +0000 (15:15 +0200)]
Remove several unnecessary UCI options: All king safety options
except "Aggressiveness" and "Cowardice", and "UCI_ShowCurrLine".
No functional change compared to the previous version with the
default settings.
Marco Costalba [Sun, 28 Mar 2010 11:04:41 +0000 (12:04 +0100)]
Revert LMR reduction based on thinking time
After 500 games at 5+0 on my QUAD (3 days) there
is no difference with old version, so probably it
is a feature that doesn't scale with search depth.
So revert for now, perhaps we should readd under a
different form.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 24 Mar 2010 09:15:00 +0000 (10:15 +0100)]
Small comments tweaks in search.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 22 Mar 2010 07:52:04 +0000 (08:52 +0100)]
Sync static null conditions with real one
Almost no functional change, but it seems more
in line with the meaning of static null pruning.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 23 Mar 2010 22:34:21 +0000 (23:34 +0100)]
Silence a couple of warnings
MSVC complains about an implicit conversion from double to int.
Also small comments tweaks.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 21 Mar 2010 20:44:56 +0000 (22:44 +0200)]
Vary reduction aggressiveness as a function of thinking time
In the beginning use milder reduction and at the end be
more aggressive.
After 1500 games on Joona's QUAD
Mod - Orig: 791 - 720 +16 elo
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 21 Mar 2010 20:34:30 +0000 (22:34 +0200)]
Base work for different reduction schemes
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 21 Mar 2010 21:41:50 +0000 (23:41 +0200)]
Do not return unproven mate scores from null move search
Causes very small functional change which is not observable with
our usual set of test positions.
However change is observable fx. with following position:
4k3/3r4/5Q2/6K1/8/8/8/8 w - - 0 1
go depth 24
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 20 Mar 2010 11:42:23 +0000 (12:42 +0100)]
Use fail soft in null search
If null search fails high return null value instead of beta.
With TT hash there may be a small advantage for fail-soft since
storing slightly better bounds may cause slightly more hash hits.
After 990 games at 1+0
Mod vs Orig +171 =665 -154 +6 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 20 Mar 2010 10:59:22 +0000 (11:59 +0100)]
Remove castleRightsMask[] hack
Array castleRightsMask[] is not static because it can
be different for different positions, so let it be
a Position member data. This allows to remove tricky
hacks to take in account that although it was defined
static it could change.
Theoretically now copying a position is a bit slower because
we need to copy also an array of 64 integers, but because in
split() we don't copy the position anymore, but just keep the
pointer, the added burden is not mesurable even in MP case.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 20 Mar 2010 10:45:04 +0000 (11:45 +0100)]
Retire Position::fast_copy()
It is never used and could be tricky, so remove it.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 20 Mar 2010 10:27:07 +0000 (11:27 +0100)]
Updated copyright year to 2010
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 17 Mar 2010 17:09:37 +0000 (18:09 +0100)]
Fix POPCNT detection gcc compile error
Also don't use __cpuid() intrinsic for Intel under
Linux because gives wrong results when detecting HT,
use the gcc version instead. Finally clean up the code.
Error was due to changed __cpuid() signature for
gcc compiler.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 17 Mar 2010 12:22:28 +0000 (13:22 +0100)]
Fix __cpuid() compile error with gcc
Use same __cpuid() signature used under Windows.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 14 Mar 2010 11:14:09 +0000 (12:14 +0100)]
Add hyper-threading detection
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 14 Mar 2010 10:16:25 +0000 (11:16 +0100)]
Move __cpuid() definition for gcc in types.h
This will allow to use the function also for other
purposes then detecting POPCNT.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>