]> git.sesse.net Git - stockfish/log
stockfish
13 years agoStockfish 1.8 beta 2
Marco Costalba [Fri, 25 Jun 2010 17:56:42 +0000 (18:56 +0100)]
Stockfish 1.8 beta 2

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoHack to fix GCC/ICC rounding difference
Joona Kiiski [Fri, 25 Jun 2010 17:49:36 +0000 (20:49 +0300)]
Hack to fix GCC/ICC rounding difference

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoStockfish 1.8 beta 1
Marco Costalba [Thu, 24 Jun 2010 16:56:45 +0000 (17:56 +0100)]
Stockfish 1.8 beta 1

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRevert "Do IID also when we already have a ttMove"
Marco Costalba [Thu, 24 Jun 2010 17:00:03 +0000 (18:00 +0100)]
Revert "Do IID also when we already have a ttMove"

Joona's testing reports very bad results at 5s, 30s and
even 1 minute TC, so revert.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoCall apply_weight() for both colors in one go
Marco Costalba [Sat, 5 Jun 2010 17:05:29 +0000 (18:05 +0100)]
Call apply_weight() for both colors in one go

Due to rounding errors in apply_weight() where we divide
by 0x100 it is not possible to keep some functionality.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoTweak unstoppable pawns detection
Marco Costalba [Sun, 13 Jun 2010 10:05:04 +0000 (11:05 +0100)]
Tweak unstoppable pawns detection

A pawn is unstoppable also if enemy king can reach it
but path to queening is protected.

Original idea by Ralph Stoesser fixed by me.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMerge branch 'master' of free2.projectlocker.com:sf
Marco Costalba [Mon, 21 Jun 2010 19:50:20 +0000 (20:50 +0100)]
Merge branch 'master' of free2.projectlocker.com:sf

13 years agoMoved a misplaced #endif in misc.cpp, which broke compilation in
Tord Romstad [Mon, 21 Jun 2010 09:25:06 +0000 (11:25 +0200)]
Moved a misplaced #endif in misc.cpp, which broke compilation in
Mac OS X.

No functional change.

13 years agoTest killer for legality earlier
Marco Costalba [Sat, 19 Jun 2010 15:48:36 +0000 (16:48 +0100)]
Test killer for legality earlier

Many killers moves, around 40%, are not legal, so
skip earlier in this case.

Some Movepicker c'tor cleanup while there.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoOptimize for king moves in see_sign()
Marco Costalba [Sat, 19 Jun 2010 14:44:03 +0000 (15:44 +0100)]
Optimize for king moves in see_sign()

Because we only test legal moves, a king move
cannot have negative SEE.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMove prefetch() out of TT
Marco Costalba [Sat, 19 Jun 2010 10:10:54 +0000 (11:10 +0100)]
Move prefetch() out of TT

This code is platform specific and has nothing to
do with TT class, so move to misc.cpp

This patch is a prerequisite to use extend prefetch use
also to other hash tables apart from Transposition Table.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoExtend checks only if SEE is non-negative
Marco Costalba [Sat, 12 Jun 2010 13:47:30 +0000 (14:47 +0100)]
Extend checks only if SEE is non-negative

Idea from Dr. Hyatt

After 10k games at 5"+0 on my QUAD
Mod vs Orig +2750 =4601 -2649 +4 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRevert "Use ply counter in Position object"
Marco Costalba [Sun, 13 Jun 2010 01:26:43 +0000 (02:26 +0100)]
Revert "Use ply counter in Position object"

Search ply and game ply are rwo different things !

Revert bogus commit.

No functional change on bench, but it changes in real games
when engine sends all the moves up to current one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSet LSNTime to 100 ms
Marco Costalba [Sat, 12 Jun 2010 09:29:50 +0000 (10:29 +0100)]
Set LSNTime to 100 ms

This is a timeout compatible with very short TC of 5 sec/game.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRemove a wrong FIXME
Marco Costalba [Sat, 5 Jun 2010 17:04:58 +0000 (18:04 +0100)]
Remove a wrong FIXME

If we are there it means we already had that info stored in TT,
so we don't need to overwrite with the same content !

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAvoid a double copy when saving a TTEntry
Marco Costalba [Sat, 5 Jun 2010 09:50:24 +0000 (11:50 +0200)]
Avoid a double copy when saving a TTEntry

In statement:

*tte = TTEntry(posKey32, v, t, d, m, generation, statV, kingD);

We first create a TTEntry, then we copy the temporary entry to
its final destination in *tte then we discard the TTEntry.

Instead of this assign the fields directly to the destination TTEntry.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAvoid calling evaluate() while razoring
Marco Costalba [Sat, 5 Jun 2010 07:40:47 +0000 (09:40 +0200)]
Avoid calling evaluate() while razoring

Micro optimization that gives a 0.5% speed improvment

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoOffset pv[] always from 0
Marco Costalba [Fri, 4 Jun 2010 07:46:38 +0000 (09:46 +0200)]
Offset pv[] always from 0

We don't need to offset from current ply.

Also rewritten a bit update_pv()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoBig qsearch() cleanup
Marco Costalba [Thu, 3 Jun 2010 17:29:48 +0000 (18:29 +0100)]
Big qsearch() cleanup

It is more clear and should be a bit faster too.

Reverted also previous optimization patch because
seems do not increase actual speed.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoExtend intermediate LMR to root search
Marco Costalba [Wed, 2 Jun 2010 10:47:53 +0000 (11:47 +0100)]
Extend intermediate LMR to root search

Almost no change, but it is in sync with what we do in search
and in any case the ELO difference is very small (because the
events when the intermediate research triggers are very rare),
too small to be measured, we just verify we don't have any
unexpected regressions.

After 802 games at 1+0 full QUAD
Mod vs Orig +114 =581 -107 +3 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoShortcut futility pruning in qsearch
Marco Costalba [Thu, 3 Jun 2010 10:10:12 +0000 (12:10 +0200)]
Shortcut futility pruning in qsearch

If we have pruned one capture due to its final value
we can prune also following ones because captures are
MVV ordered.

Also avoid a compare when not in PV because in that
case is always false.

No functional change.

13 years agoDo not pass threadID as argument of search() and evaluate()
Marco Costalba [Wed, 2 Jun 2010 19:37:18 +0000 (20:37 +0100)]
Do not pass threadID as argument of search() and evaluate()

Get it from the position instead.

A good semplification of function calling and a speedup too.

No functional change also with faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSave threadID info in Position
Marco Costalba [Wed, 2 Jun 2010 19:13:51 +0000 (20:13 +0100)]
Save threadID info in Position

This is the best place because when we split we do a
copy of the position and also threadID, once set in a
given position, never changes anymore.

Forbid use of Position's default and copy c'tor to avoid
nasty bugs in case a position is created without explicitly
setting the threadID.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDon't initialize excludedMove and skipNullMove at each node
Marco Costalba [Wed, 2 Jun 2010 13:18:23 +0000 (14:18 +0100)]
Don't initialize excludedMove and skipNullMove at each node

Do it once at the beginning becuase they are always reset
after use in the calling place where are set.

No functional change also with faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoUse SearchStack to pass allowNullmove
Marco Costalba [Wed, 2 Jun 2010 12:32:31 +0000 (13:32 +0100)]
Use SearchStack to pass allowNullmove

Also renamed allowNullmove in skipNullMove to reverse
the logic so that the field is initialized to 0 (false)
instead of 1 (true).

No functional change also with faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoUse SearchStack to pass excludedMove
Marco Costalba [Wed, 2 Jun 2010 12:22:48 +0000 (13:22 +0100)]
Use SearchStack to pass excludedMove

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix white space breakage
Marco Costalba [Wed, 2 Jun 2010 10:25:02 +0000 (11:25 +0100)]
Fix white space breakage

No functional change with faked split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSync sp_search() with main search()
Marco Costalba [Wed, 2 Jun 2010 09:49:34 +0000 (10:49 +0100)]
Sync sp_search() with main search()

And fix qserahc() dispatch also there.

No functional change tested wit Faked Split.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRetire bitScanReverse32()
Marco Costalba [Tue, 1 Jun 2010 20:28:45 +0000 (21:28 +0100)]
Retire bitScanReverse32()

Use log() instead because we are not in speed
critical paths.

Also a bit of renaming and code shuffle while there.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRetire ok_to_do_nullmove()
Marco Costalba [Tue, 1 Jun 2010 18:49:46 +0000 (19:49 +0100)]
Retire ok_to_do_nullmove()

Has been remained the same from ages also with the FIXME.

Retire for now and rearrange the conditions order for
maximum performance.

Also a small touch at null zugzwang verification.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMove invariant of singular ext. check out of loop
Marco Costalba [Tue, 1 Jun 2010 14:31:24 +0000 (15:31 +0100)]
Move invariant of singular ext. check out of loop

It is almost always false.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRename ok_to_prune() in connected_threat()
Marco Costalba [Tue, 1 Jun 2010 14:02:14 +0000 (15:02 +0100)]
Rename ok_to_prune() in connected_threat()

It is more up to the point. Also small speedup
due to checking for threat move before calling
the function. This saves more then 90% of function calls.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAvoid double function dispatch
Marco Costalba [Tue, 1 Jun 2010 12:03:46 +0000 (13:03 +0100)]
Avoid double function dispatch

In 44% of cases we call search() just to call
qsearch() one moment later, avoid this double dispatch.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRetire init_node()
Marco Costalba [Tue, 1 Jun 2010 07:21:11 +0000 (08:21 +0100)]
Retire init_node()

Also don't poll in qsearch()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDon't init SplitPointStack[i][j].parent
Marco Costalba [Tue, 1 Jun 2010 06:36:30 +0000 (07:36 +0100)]
Don't init SplitPointStack[i][j].parent

It is already set to zero because is allocated in
the global storage area.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoUse ply counter in Position object
Marco Costalba [Mon, 31 May 2010 20:38:34 +0000 (21:38 +0100)]
Use ply counter in Position object

And avoid a redundant one passed as argument in
search calls.

Also renamed gamePly in ply to better clarify this
is used as search ply and is set to zero at the
beginning of the search.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix SearchStack and ply misalignment in RootMoveList
Marco Costalba [Mon, 31 May 2010 17:32:00 +0000 (18:32 +0100)]
Fix SearchStack and ply misalignment in RootMoveList

In RootMoveList c'tor we call qsearch() with
ply == 1 but SearchStack at 0.

We never noticed before because in qsearch we don't access
previous's ply SearchStack, otherwise we would have got
a nice crash ;-)

This bug is a fall down of previous patch.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoConvert SearchStack ss[] to SearchStack*
Marco Costalba [Sun, 30 May 2010 07:56:38 +0000 (08:56 +0100)]
Convert SearchStack ss[] to SearchStack*

Use a pointer to current SearchStack to avoid ss[ply]
address calculation.

Gives 1% speedup on Intel compiler

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAdd function to get ply from position
Marco Costalba [Mon, 31 May 2010 10:05:04 +0000 (12:05 +0200)]
Add function to get ply from position

It will be used by future patches.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMove gamePly among the StateInfo data
Marco Costalba [Mon, 31 May 2010 09:47:15 +0000 (11:47 +0200)]
Move gamePly among the StateInfo data

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMove promotion and ep under pawn handling
Marco Costalba [Mon, 31 May 2010 11:01:33 +0000 (12:01 +0100)]
Move promotion and ep under pawn handling

And remove from main do_move() flow. Just a small speedup
because we avoid two branches in the common case.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoThread::splitPoint is a volatile pointer
Marco Costalba [Mon, 31 May 2010 05:13:34 +0000 (06:13 +0100)]
Thread::splitPoint is a volatile pointer

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDo IID also when we already have a ttMove
Marco Costalba [Sat, 29 May 2010 09:01:25 +0000 (10:01 +0100)]
Do IID also when we already have a ttMove

In case tte->depth() is far lower the current depth
and we are in a PV node.

Almost 45% of researches give a different ttMove !

After 999 games at 1+0
Mod vs Orig +174 =694 -131 +15 ELO !!!!!!!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoIf LMR search fails high research at intemediate depth
Marco Costalba [Fri, 28 May 2010 22:31:05 +0000 (23:31 +0100)]
If LMR search fails high research at intemediate depth

Do not search immediately at full depth, but try a second
chance at lower depth. This is a feature that should scale
well because become important at high depths where we have
big reductions and also big savings in avoiding a costly
full depth search.

After 942 games at 1+0
Mod vs Orig +158 =645 -139  +7 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix IIDMargin description
Marco Costalba [Sat, 29 May 2010 08:43:18 +0000 (09:43 +0100)]
Fix IIDMargin description

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRetire zobMaterial[]
Marco Costalba [Sat, 29 May 2010 07:54:15 +0000 (08:54 +0100)]
Retire zobMaterial[]

Use zobrist[] array to compute material key.

Space save of 2KB in L1 cache.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoChange zobMaterial[] index 0 definition
Marco Costalba [Fri, 28 May 2010 11:21:03 +0000 (12:21 +0100)]
Change zobMaterial[] index 0 definition

The index at 0 was reserved for no-pieces
information. But we don't need that.

This is a prerequisite for next patch.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoUse Key type instead of Bitboard
Marco Costalba [Sat, 29 May 2010 07:11:36 +0000 (08:11 +0100)]
Use Key type instead of Bitboard

They are both 64 bits unsigned integer, but it
is correct to use the proper type.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRevert non-linear threats evaluation
Marco Costalba [Sun, 23 May 2010 13:51:15 +0000 (14:51 +0100)]
Revert non-linear threats evaluation

After 999 games at 1+0
Mod vs Orig +148 =712 -139 +3 ELO

The added complexity doesn't seems to pay off and could
even scale worst with longer TC. So revert.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRemove an useless assert in evaluate_passed_pawns()
Marco Costalba [Sat, 22 May 2010 18:14:19 +0000 (19:14 +0100)]
Remove an useless assert in evaluate_passed_pawns()

The tested square comes from a bitboard anded with
pos.pieces_of_color(Us), so assert is useless.

Another nitpick report by Marek Kwiatkowski  ;-)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAccount for double pawn push in evaluate_unstoppable_pawns()
Marco Costalba [Sat, 22 May 2010 17:38:45 +0000 (18:38 +0100)]
Account for double pawn push in evaluate_unstoppable_pawns()

One of the most nitpicking patches I have ever seen.

Of course almost no functional change, but added just
becasue we are very pedantic ;-)

Spotted by Marek Kwiatkowski

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix StormOpenFileBonus[] bug
Marco Costalba [Mon, 17 May 2010 05:08:47 +0000 (06:08 +0100)]
Fix StormOpenFileBonus[] bug

It was erroneusly reversed. Bug from Glaurung times.
Probably a full re-tuning is needed anyhow.

Spotted and fixed by Ralph Stoesser.

After 999 games almost no change, but modified anyway
for documentation reasons.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix a warning on array of size 0 under Windows
Marco Costalba [Sat, 22 May 2010 11:45:05 +0000 (12:45 +0100)]
Fix a warning on array of size 0 under Windows

And better document new reality.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDrop completely illogical ei.kingDanger == 0 requirement
Joona Kiiski [Sat, 22 May 2010 08:34:35 +0000 (11:34 +0300)]
Drop completely illogical ei.kingDanger == 0 requirement

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAlways save static value and kingDanger to TT
Joona Kiiski [Sat, 22 May 2010 08:56:46 +0000 (11:56 +0300)]
Always save static value and kingDanger to TT

Around 5% speed-up

No functional change

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDrop TTClusterSize from 5 to 4
Joona Kiiski [Sat, 22 May 2010 08:51:22 +0000 (11:51 +0300)]
Drop TTClusterSize from 5 to 4

Very small obvious functional change

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAdd non-linear threats evaluation
Marco Costalba [Sat, 22 May 2010 10:55:01 +0000 (11:55 +0100)]
Add non-linear threats evaluation

Increase threats score according to the number of
threats and to the side to move.

Constants have been balanced after ~34k iterations.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRevert "Simple implementation of strong YBWC"
Marco Costalba [Sat, 22 May 2010 10:35:15 +0000 (11:35 +0100)]
Revert "Simple implementation of strong YBWC"

It does not seem to increase anything even with a QUAD,
so revert.

After 1000 games with a QUAD
Mod - Orig: 500 - 497 (+1 elo)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAdd some automatic detection for Windows
Joona Kiiski [Fri, 21 May 2010 19:17:59 +0000 (22:17 +0300)]
Add some automatic detection for Windows

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDocumentation fix
Joona Kiiski [Fri, 21 May 2010 05:31:27 +0000 (08:31 +0300)]
Documentation fix

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoCorrect 'prefetch' handling for Makefile
Joona Kiiski [Fri, 21 May 2010 05:05:36 +0000 (08:05 +0300)]
Correct 'prefetch' handling for Makefile

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoLet prefetch to be enabled by default on Windows
Marco Costalba [Thu, 20 May 2010 20:37:37 +0000 (21:37 +0100)]
Let prefetch to be enabled by default on Windows

When compiling with MSVC we don't use the Makefile
so tweak a bit the Makefile to allow to let prefetch
in by default so that it works under Windows.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSmall tweaks to install gcc-profile-clean targets
Joona Kiiski [Thu, 20 May 2010 15:24:45 +0000 (18:24 +0300)]
Small tweaks to install gcc-profile-clean targets

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoModify source to follow new Makefile
Joona Kiiski [Wed, 19 May 2010 19:44:26 +0000 (22:44 +0300)]
Modify source to follow new Makefile

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRewrite Makefile
Joona Kiiski [Wed, 19 May 2010 17:37:56 +0000 (20:37 +0300)]
Rewrite Makefile

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSimple implementation of strong YBWC
Marco Costalba [Thu, 13 May 2010 08:06:27 +0000 (10:06 +0200)]
Simple implementation of strong YBWC

No gain in the worst case of 2 threads, but also no
loss and good potential for QUAD or OCTAL machines.

After 922 games at 1+0 with 2 threads

Mod vs Orig +143 =533 -143 +0 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRemove an assert in evaluate_passed_pawns()
Marco Costalba [Thu, 20 May 2010 16:48:19 +0000 (17:48 +0100)]
Remove an assert in evaluate_passed_pawns()

We already tested few lines before with:

assert(pos.pawn_is_passed(Us, s));

Spotted by Marek Kwiatkowski.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoIndentation fix in middle-game evaluation
Marco Costalba [Mon, 17 May 2010 06:04:24 +0000 (07:04 +0100)]
Indentation fix in middle-game evaluation

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoIntroduce init_attack_tables() in evaluate()
Marco Costalba [Sat, 15 May 2010 12:29:21 +0000 (13:29 +0100)]
Introduce init_attack_tables() in evaluate()

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDo not consider discovered checks in king safety
Marco Costalba [Sat, 15 May 2010 12:00:32 +0000 (13:00 +0100)]
Do not consider discovered checks in king safety

Does not help and it slows downs a bit because it
is not cheap to get the possible discovered checks
out of a position.

After 997 games at 1+0
Mod vs orig +153 =692 -152  +0 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix RootMove::operator<() description
Marco Costalba [Sun, 16 May 2010 07:56:58 +0000 (08:56 +0100)]
Fix RootMove::operator<() description

Reported by Melvin Sprague.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRemove an useless Max() in passed pawns evaluation
Marco Costalba [Sat, 15 May 2010 23:56:05 +0000 (00:56 +0100)]
Remove an useless Max() in passed pawns evaluation

There is no reason for that since tr cannot become negative.

Spotted by Ralph Stoesser.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoThreath tuning results
Marco Costalba [Sat, 15 May 2010 20:44:57 +0000 (21:44 +0100)]
Threath tuning results

Final values for threath tuning (after ~30k iterations)

Verified to be equivalent with tuning branch.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAdd support for gcc-profile
Marco Costalba [Fri, 14 May 2010 16:12:10 +0000 (17:12 +0100)]
Add support for gcc-profile

It's now possible to build PGO builds with GCC

Patch from Oystein Johansen

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRename OutpostMask[] in AttackSpanMask[]
Marco Costalba [Fri, 14 May 2010 13:11:32 +0000 (15:11 +0200)]
Rename OutpostMask[] in AttackSpanMask[]

This is a more standard naming (see chessprogramming wiki)
and is more stick to what table is and not what is used for.

Code in pawns.cpp is a bit more readable now, at least for me ;-)

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoMicro optimization in evaluate_pawns()
Marco Costalba [Fri, 14 May 2010 11:51:29 +0000 (12:51 +0100)]
Micro optimization in evaluate_pawns()

Avoid a double bitcount in test for candidate passed
pawn when we don't have any supporting pawn.

Also use outpost_mask() instead of build it up on
the fly.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoIntroduce evaluate_pawn_storm() to unify redundant code
Marco Costalba [Fri, 14 May 2010 08:42:53 +0000 (10:42 +0200)]
Introduce evaluate_pawn_storm() to unify redundant code

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoCode style tweaks to pawns.cpp
Marco Costalba [Fri, 14 May 2010 07:47:11 +0000 (09:47 +0200)]
Code style tweaks to pawns.cpp

Also a small speedup.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoChange color argument of square_is_weak()
Marco Costalba [Fri, 14 May 2010 09:53:33 +0000 (11:53 +0200)]
Change color argument of square_is_weak()

Pass the color for which the square is to be
considered weak, not the opposite.

It is more natural and intuitive in this way.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoSpace inflate marsenne
Marco Costalba [Thu, 13 May 2010 13:06:06 +0000 (15:06 +0200)]
Space inflate marsenne

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoAnother split() tweak session
Marco Costalba [Thu, 13 May 2010 08:56:11 +0000 (10:56 +0200)]
Another split() tweak session

Function split() doesn't need to return a value, also
remove useless 'master' field.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoDocument old test result
Joona Kiiski [Wed, 12 May 2010 11:46:54 +0000 (14:46 +0300)]
Document old test result

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRemove one hack caused by misunderstanding
Joona Kiiski [Wed, 12 May 2010 10:29:14 +0000 (13:29 +0300)]
Remove one hack caused by misunderstanding

No functional change

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoFix a possible out of range access in previous patch
Marco Costalba [Wed, 12 May 2010 11:30:00 +0000 (12:30 +0100)]
Fix a possible out of range access in previous patch

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoRetire splitPoint->cpus field
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>
13 years agoSyncing sp_search() and search()
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>
13 years agoSimplify init_safety()
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>
13 years agoGreatly simplify weight_option()
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>
13 years agoSmall evaluate_passed_pawns() cleanup
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>
13 years agoBetter integration of faked split
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>
13 years agoDisable fake-mode
Joona Kiiski [Sun, 9 May 2010 19:04:21 +0000 (22:04 +0300)]
Disable fake-mode

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
13 years agoUnite sp_search() and sp_search_pv()
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>
13 years agoIntroduce fake-mode for split
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>
13 years agoRevert to old prefetch detection logic
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>
13 years agoFix an off-by-one bug in ThreatBonus[] table
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>
13 years agoTemplatize qsearch
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>
13 years agoRetire mate threat detection from evaluation
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>
13 years agoAdd a comment and a FIXME
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>
13 years agoLookup TT for eval also in PV nodes
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>
13 years agoFix an obsoleted descrption comment
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>