]>
git.sesse.net Git - stockfish/log
Marco Costalba [Sun, 24 Oct 2010 08:51:49 +0000 (09:51 +0100)]
Revert previous patch
It seems we have a speed regression under Linux, anyhow
commit and revert to leave some documentation in case we
want to try again in the future.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 21 Oct 2010 06:46:38 +0000 (07:46 +0100)]
Allow split point master to sleep
Let to sleep even split point master, it will be waken up
by its slaves when they return from the search.
With this patch we get maximum HT speedup
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 23 Oct 2010 06:52:17 +0000 (07:52 +0100)]
Re-add "Pass evalMargin through SearchStack as eval"
It has more sense to treat the two evaluation metrics
in the same way.
As a side effect now we use the correct eval margin when
pruning in a SplitPoint node.
No functional change in single thread.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 23 Oct 2010 06:38:48 +0000 (07:38 +0100)]
Finally retire sp_search()
Fix the movcount updating bug and let search() to completely
subsititute sp_search().
No functional change even with fakes split.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 18 Oct 2010 02:29:58 +0000 (04:29 +0200)]
Temporary restore old sp_search()
There is a bug in the conversion that is triggered when testing
with faked split and that I missed somehow :-(
To allow proper testing on cluster restore old sp_search()
until I don't fiugre up what's happened.
Restored to be functional equivalent to old behaviour both in
single thread and in faked split.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 10:54:44 +0000 (11:54 +0100)]
Revert "Pass evalMargin through SearchStack as eval"
Restore full no functional change also in Faked Split mode.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 12:12:12 +0000 (13:12 +0100)]
Don't wake up /sleep threads in think() anymore
When entering and exiting from think() we don't need any special
wake up / sleeping code because we want available threads to keep
sleeping.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 10:23:59 +0000 (11:23 +0100)]
Enable sleeping of available threads
This simple patch has devastating consequences ;-)
Now an available thread goes to sleep and is waked up after
being allocated.
This patch allows Stockfish to dramatically increase performances
on HyperThreading systems.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 10:01:55 +0000 (11:01 +0100)]
Use fast SRWLOCK locks under Windows
They are fast and also have the same semantic of Linux ones.
This allow to simplify the code and especially to use
SleepConditionVariableSRW() to wait on a condition releaseing the lock,
this has the same semantic as pthread_cond_wait().
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 08:34:23 +0000 (09:34 +0100)]
Remove some ifdef from wake_sleeping_thread()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 08:03:39 +0000 (09:03 +0100)]
Retire put_threads_to_sleep()
Obsoleted by previous patches.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 07:57:20 +0000 (08:57 +0100)]
Retire THREAD_SLEEPING and use THREAD_AVAILABLE instead
This is a prerequisite for future work and anyhow removes
a state flag, so it is good anyhow.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 07:38:52 +0000 (08:38 +0100)]
Retire AllThreadsShouldSleep flag
It is redundant and complicates the already complicated
SMP code for no reason.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 07:16:46 +0000 (08:16 +0100)]
Destroy wait conditions before exiting
We already do this for locks. Also rename SitIdleEvent
in WaitCond to be uniform with Lunix naming.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 17 Oct 2010 06:55:57 +0000 (07:55 +0100)]
Change thread API to use one wait condition per thread
This is the native way done in Windows and we will use it
for future work, so change Linux to do the same.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 14:24:42 +0000 (15:24 +0100)]
Do not shadow SplitPoint struct with search() parameter
Also retire move_is_killer() is called only from one place.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 11:52:01 +0000 (13:52 +0200)]
Fixed some warnings when using -Weffc++ gcc option
Plus some other icc warnings popped up with new and strictier
compile options.
No functional and speed change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 11:19:44 +0000 (13:19 +0200)]
Fix a shadowed variable warning under icc
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 11:09:49 +0000 (12:09 +0100)]
Retire now obsoleted do_sp_search() trampoline code
We can call search() directly from idle_loop()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 10:54:44 +0000 (11:54 +0100)]
Pass evalMargin through SearchStack as eval
It has more sense to treat the two evaluation metrics
in the same way.
As a side effect now we use the correct eval margin when
pruning in a SplitPoint node.
No functional change in single thread.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 10:24:03 +0000 (11:24 +0100)]
Unify sp_search() and search() step 3
Remove old sp_search() code.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 16 Oct 2010 09:01:45 +0000 (10:01 +0100)]
Unify sp_search() and search() step 2
Modify search() to be able to handle split points
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 12 Oct 2010 08:28:25 +0000 (10:28 +0200)]
Unify sp_search() and search() step 1
Rewrite sp_search() to have same signature of search()
This is the first prerequistite step toward unification.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 12 Oct 2010 07:54:01 +0000 (09:54 +0200)]
Pass moveCount by value in split()
Actually it is an error to update back moveCount value after split()
because it is used in update_history() to access movesSearched[]
array. But becasue this vector is not updated in the split point
we end up with an access of stale data.
Bug has been hidden til now because we 'forgot' to update
moveCount before returning from split().
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 12 Oct 2010 08:14:40 +0000 (10:14 +0200)]
Sync sp_search() with search()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 12 Oct 2010 07:06:33 +0000 (09:06 +0200)]
Better document some threads functions
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 11 Oct 2010 18:56:07 +0000 (19:56 +0100)]
Document an assert in idle_loop()
Thanks to Bruno Causse for the clarification.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 10 Oct 2010 08:04:09 +0000 (09:04 +0100)]
Use VALUE_DRAW instead of VALUE_ZERO where better
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 10 Oct 2010 06:56:07 +0000 (08:56 +0200)]
Use do_move_bb() in move_attacks_square()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 10 Oct 2010 05:55:42 +0000 (07:55 +0200)]
Another cleanup in evaluate_pawns()
Suggested by Marek Kwiatkowski.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 9 Oct 2010 14:04:24 +0000 (15:04 +0100)]
Micro optimize open files calculation
Committed mostly because is also a cleanup...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 9 Oct 2010 12:20:49 +0000 (13:20 +0100)]
Rearrange pawn penalities arrays
A clean up that is also a prerequisite for next patches.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 9 Oct 2010 12:05:58 +0000 (13:05 +0100)]
Small codestyle touches
Mostly suggested by Justin (UncombedCoconut), the 0ULL -> 0 conversion
is mine.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 7 Oct 2010 02:55:08 +0000 (03:55 +0100)]
Properly set to zero stuff returned by 'new'
Language guarantees that c'tor is called, but without any c'tor
it happens to work by accident because OS zeroes out the freshly
allocated pages. The problem is that if I deallocate and allocate
again, the second time pages are no more newly come by the OS and
so could contain stale info.
A practical case could be if we change TT size or numbers of
threads on the fly while already running.
Bug spotted by Justin Blanchard.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 6 Oct 2010 07:11:27 +0000 (09:11 +0200)]
Retire updateKingTables[]
Suggested by Marek Kwiatkowski.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 5 Oct 2010 21:22:44 +0000 (22:22 +0100)]
Skip ei.kingZone[] initialization together with king safety
Another microptimization by Marek Kwiatkowski.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 5 Oct 2010 21:10:42 +0000 (22:10 +0100)]
Skip an useless compare in space evaluation
Spotted by Marek Kwiatkowski.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 5 Oct 2010 18:40:49 +0000 (19:40 +0100)]
Restore development version
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 5 Oct 2010 07:23:52 +0000 (09:23 +0200)]
Stockfish 1.9.1
Fix release to workaround chess960 on some GUIs
Signature is:
stockfish bench 128 1 12 default depth
Node counts:
10914593
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 5 Oct 2010 07:19:40 +0000 (09:19 +0200)]
Fix broken chess960 under Shredder GUI
We need to add a dummy option anyway to make GUIs happy.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 4 Oct 2010 09:45:04 +0000 (11:45 +0200)]
Rewrite bit counting functions
Get rid of macros and use templates instead,
this is safer and allows us fix the warning:
ISO C++ forbids braced-groups within expressions
That broke compilation with -pedantic flag under
gcc and POPCNT enabled.
No functional and no performance change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 3 Oct 2010 13:37:50 +0000 (14:37 +0100)]
Remove -pedantic option
Breaks current POPCNT code.
Perhaps we will readd with a proper fix...
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 3 Oct 2010 10:10:08 +0000 (11:10 +0100)]
Use special handling for promotions in move_is_legal()
Simplifies a bit the code and the common case too.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 2 Oct 2010 17:57:46 +0000 (18:57 +0100)]
Fix an obsoleted NO_PIECE_TYPE in a comment
Spotted by Ralph Stoesser.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 2 Oct 2010 13:36:43 +0000 (14:36 +0100)]
Restore development version
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 2 Oct 2010 09:46:18 +0000 (11:46 +0200)]
Increase warning level
Both under gcc and icc: sf compiles with no warnings !
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 2 Oct 2010 08:55:10 +0000 (09:55 +0100)]
Stockfish 1.9
Signature is:
stockfish bench 128 1 12 default depth
Node counts:
10914593
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 3 Jul 2010 21:38:49 +0000 (00:38 +0300)]
Less aggressive move count based futility pruning
This patch from Joona greatly reduces move count pruning,
below is the old and new move count limits starting from
ONE_PLY with half-play increment:
Old: 4,5,5,5, 7, 7,11,11,11,19,19,19,35,35
New: 4,5,7,9,12,15,19,23,28,33,39,45,52,59
Surprisingly results are even a bit better at a quite
fast time control.
After 5260 games at 30"+0.1
Mod - Orig: 864 - 806 - 3590 ELO +3 (+- 3.8)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 25 Sep 2010 10:21:24 +0000 (11:21 +0100)]
Fix handling of 50 move rule and remove a fixme
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 25 Sep 2010 10:12:55 +0000 (11:12 +0100)]
Shrink OutpostBonus[] definition
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 24 Sep 2010 08:33:16 +0000 (10:33 +0200)]
Simplify scale factors implementation
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 24 Sep 2010 07:43:48 +0000 (09:43 +0200)]
Rename no_mob_area in mobilityArea
It is the correct name.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 21 Sep 2010 12:40:10 +0000 (14:40 +0200)]
Small code style in qsearch
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 14 Sep 2010 08:39:12 +0000 (10:39 +0200)]
Do not update killers in qsearch
It seems totally unuseful because killers are not
used to order the moves in qsearch. Although there
is some functionality change, probably just a small
side effect.
After 5656 games on rc
Mod vs Orig: 1007 - 980 - 3669 ELO +1 (+- 3.7)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 19 Sep 2010 12:52:01 +0000 (13:52 +0100)]
A king move can never have negative SEE
So there is no need to explicitly check for king moves
when detecting prunable evasions.
Perhaps teoretically a very bit slower (I didn't test),
but it is more clear now what evasions we consider prunable.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 19 Sep 2010 12:41:01 +0000 (13:41 +0100)]
Simplify SEE
Greatly cleanup SEE code and now it is also a bit
faster on gcc, about +0.6%.
Thanks to Mike Whiteley new SEE code that gave me
fresh ideas on how to cleanup this old stuff.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 12 Sep 2010 11:38:38 +0000 (12:38 +0100)]
Retire NullMoveMargin
A code semplification that could even be a slight increase,
anyhow is a reducing pruning patch, so it is good even
at equal strenght.
After 6342 games
Mod - Orig: 1040 - 974 - 4328 ELO +3 (+- 3.5)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 14 Sep 2010 08:57:48 +0000 (10:57 +0200)]
We need just one eval margin in search
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 12 Sep 2010 10:39:38 +0000 (11:39 +0100)]
Reintroduce rook contact checks
Were removed when merged from Glaurung 2.2, but without
any test.
Note that weight has been increased from original 2 to 4 and
has been also fixed a bug where in the original version were
considered also diagonal sqaures for the rook, that are
contact squares but not checks.
After 4449 games at 30"+0.1
Mod - Orig: 717 - 649 - 3083 ELO +5 (+- 4.1)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 14 Sep 2010 02:24:04 +0000 (04:24 +0200)]
Fix a warning under icc
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 13 Sep 2010 07:49:49 +0000 (09:49 +0200)]
Retire badCaptures[] array in MovePicker
Use the tail of moves[] array to store bad captures.
No functional change but some move reorder. Verified with old perft.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 11 Sep 2010 21:33:01 +0000 (23:33 +0200)]
Increase QueenContactCheckBonus
And also other check bonuses.
After 4272 games on russian cluster at 30"+0.1
Mod - Orig: 711 - 612 - 2949 ELO +8 (+- 4.2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 12 Sep 2010 13:02:33 +0000 (14:02 +0100)]
Do not update king tables when we skip king safety
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Mon, 6 Sep 2010 07:53:10 +0000 (10:53 +0300)]
Retire pawn storm evaluation
More then 100 lines of almost useless evaluations. Prefer
code semplification to a very small and dubious advantage.
After 7457 games on russian cluster:
Mod - Orig: 1285 - 1334 - 4838 ELO -2 (+- 3.2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 4 Sep 2010 13:10:35 +0000 (14:10 +0100)]
Array FutilityMarginsMatrix stores Values
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 30 Aug 2010 08:15:51 +0000 (10:15 +0200)]
Remove get_* prefix from RootMoveList API
And small additional cleanup in RootMoveList.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 30 Aug 2010 07:58:52 +0000 (09:58 +0200)]
Use only cumulativeNodes in RootMoveList
And rename in nodes now that we have only one.
After the beta-cut off counters removing we can
get rid also of this one.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 20 Aug 2010 07:49:13 +0000 (09:49 +0200)]
Use evaluation margins also in main search
For now keep FutilityMarginsMatrix[] unchanged, in
future we are going to reduce to compensate for extra
margin.
At this moment it is enough we don't have regressions.
After 9694 games on russian cluster
Mod - Orig 1608 - 1578 - 6508 ELO +1 (+- 2.8)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 27 Aug 2010 10:15:07 +0000 (12:15 +0200)]
Split branches in generate_piece_moves()
Instead of one comparison in while() condition use two,
the first to check if the piece is exsistant and the second
to loop across pieces of that type.
This should help branch prediction in cases we have only
one piece of the same type, for instance for queens, the
first branch is always true and the second is almost always
false.
Increased speed of 0.3-0.5 % on Gcc pgo compiles.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 26 Aug 2010 10:13:07 +0000 (12:13 +0200)]
Speed up updateShelter()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 26 Aug 2010 06:27:57 +0000 (07:27 +0100)]
Assorted code style in evaluation.cpp
Renaming, cleanu up, etc.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 20:01:03 +0000 (21:01 +0100)]
Finally remove value from EvalInfo
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 19:32:25 +0000 (20:32 +0100)]
Remove dependency from ei.value in evaluate functions
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 19:16:27 +0000 (20:16 +0100)]
Remove margin[] from EvalInfo
Directly pass arguments to king evaluation.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 19:05:38 +0000 (20:05 +0100)]
Remove MaterialInfo* from EvalInfo
Use a local variable instead.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 18:56:01 +0000 (19:56 +0100)]
Change evaluate() signature
Hide EvalInfo and return just the score and the margin.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 13:28:08 +0000 (15:28 +0200)]
Retire attackedBy[] access functions
Currently are used by evaluation itself and the
whole EvalInfo will be removed from global visibility
by next patch, so no reason to use them.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 25 Aug 2010 12:13:05 +0000 (14:13 +0200)]
Decrypt some magics in bitboards definitions
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 24 Aug 2010 23:20:53 +0000 (00:20 +0100)]
We don't need EvalInfo c'tor anymore
We know always get complete info from TT, so this
code is obsolete.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 20 Aug 2010 07:47:07 +0000 (09:47 +0200)]
Rename ei.kingDanger in ei.margin
It will be more clear when we will go to add stuff
apart from king danger itself.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 20 Aug 2010 07:16:43 +0000 (09:16 +0200)]
Call apply_weight() only once in passed pawns evaluation
First accumulate the bonus for each pawn, then call the
not very fast apply_weight().
Should be no functional change apart from rounding issues.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 24 Aug 2010 13:59:24 +0000 (15:59 +0200)]
Don't need to memset() EvalInfo
Set manually to zero the few fields that are
optionally populated and that's enough.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 24 Aug 2010 13:35:13 +0000 (15:35 +0200)]
There is no need of storing mobility in EvalInfo
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 24 Aug 2010 12:48:40 +0000 (14:48 +0200)]
Refresh comments in evaluate.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 24 Aug 2010 10:29:44 +0000 (12:29 +0200)]
Unify single MobilityBonus[] tables in a big single one
Avoid one address lookup in a very critical time path.
Unified also outpost bonus tables for knights and bishops.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 22 Aug 2010 13:18:58 +0000 (14:18 +0100)]
Retire trapped bishop evaluation
Another 100 lines of dubious and ad-hoc code.
After 7644 games on russian cluster:
Mod - Orig 1285 - 1249 - 5110 ELO +1 (+- 3.2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 22 Aug 2010 13:55:52 +0000 (14:55 +0100)]
Retire UCI_Chess960 option
We don't need that !
We can infere from starting fen string if we are in
a Chess960 game or not. And note that this is a per-position
property, not an application wide one.
A nice trick is to use a custom manipulator (that is an
enum actually) to keep using the handy operator<<() on the
move when sending to std::cout, yes, I have indulged a
bit here ;-)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 21 Aug 2010 17:57:52 +0000 (19:57 +0200)]
Prefetch pawn hash key
Plus a bunch of other minor optimizations.
With this power pack we have an increase
of a whopping 1.4% :-)
...and it took 3 good hours of profiling + hacking to get it out !
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 20 Aug 2010 09:25:34 +0000 (11:25 +0200)]
Retire unstoppable pawns evaluation
One hundred lines of code should be compensated by an
important ELO increase, otherwise are candidate for removal...
...and is not the case. We are well within error margin, so
remove the code even if we lose a couple of elo points, but
semplification is huge.
After 6494 games on russian cluster
Orig vs Mod 1145 - 1107 - 4242 (-2 ELO)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 21 Aug 2010 16:18:56 +0000 (17:18 +0100)]
Remove my address from README
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 20 Aug 2010 17:16:20 +0000 (18:16 +0100)]
Retire beta counters stuff
Is now obsoleted by previous patch.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Thu, 19 Aug 2010 10:29:40 +0000 (13:29 +0300)]
Use MovePicker's move ordering also at root
After testing on our russian cluster: +3 elo after 4200 games
So keep it becuase it allows a good semplification.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 16:55:32 +0000 (17:55 +0100)]
Move StartPositionFEN out of the header
It is not needed to have global visibility.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 16:38:10 +0000 (17:38 +0100)]
Move piece values in piece.h / piece.cpp
Where they belong.
Note that array PieceValueMidgame[] and PieceValueEndgame[]
are now declared extern in the header and moved in piece.cpp
so to avoid allocate the array each time the header is
included !
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 16:25:08 +0000 (17:25 +0100)]
Retire is_upper_bound() and friend
Directly expand in the few places where is called.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 16:00:36 +0000 (17:00 +0100)]
Retire useless piece_value_midgame() overloads
Directly access the table in the few call places.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 15:36:18 +0000 (16:36 +0100)]
Introduce and use SCORE_ZERO
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 13:50:02 +0000 (14:50 +0100)]
Do not score PH_QCHECKS
They are picked unsorted anyway, so score is unuseful.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 19 Aug 2010 06:38:13 +0000 (07:38 +0100)]
Disable templetized operators by default
To avoid nasty bugs due to silently overriding of
common operator we enable the templates on a type
by type base using partial template specialization.
No functional change, zero overhead at runtime.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 18 Aug 2010 16:31:44 +0000 (17:31 +0100)]
Introduce enum VALUE_ZERO instead of Value(0)
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>