]>
git.sesse.net Git - stockfish/log
Marco Costalba [Thu, 10 Mar 2011 07:07:07 +0000 (08:07 +0100)]
Revert previous patch due to miscompile under gcc
I need to understand what's going on, in the
meantime revert.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 8 Mar 2011 13:38:17 +0000 (14:38 +0100)]
Change initialization of some bitboards
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 20 Feb 2011 10:07:13 +0000 (11:07 +0100)]
Increase MAX_THREADS to 32
No speed regression after 8731 games:
Mod vs Orig 1394 - 1342 - 5995 ELO +2 (+- 4.1)
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 7 Mar 2011 17:13:02 +0000 (18:13 +0100)]
Introduce and use rot() in rkiss.h
Also fix indentation.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 1 Mar 2011 12:15:13 +0000 (13:15 +0100)]
Simplify aspirationDelta update rule
After 7522 games:
Mod vs Orig 1229 - 1148 - 5145 ELO +3 (+- 4.5) LOS 83%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 1 Mar 2011 12:32:19 +0000 (13:32 +0100)]
Be sure to read options before to call trace_evaluate()
Otherwise in case we change an option with setoption and
then ask for "eval" command the evaluation is not updated.
Spotted by Justin Blanchard.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 28 Feb 2011 19:17:57 +0000 (20:17 +0100)]
Fix aspiration corner case
Fix a corner case where we start aspiration window and
suddendly we get a VALUE_KNOWN_WIN / MATE score, this makes
aspiration to blow up in a series of researches loops.
Exit aspiration loop in that case.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 28 Feb 2011 08:00:17 +0000 (09:00 +0100)]
Remove a FIXME in id_loop()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 26 Feb 2011 17:29:22 +0000 (18:29 +0100)]
Score root move list during first iteration
Use first iteration to get a proper startup score
and possibly detect an easy move.
After 5180 games:
Mod vs Orig 847 - 823 - 3510 ELO +1 (+- 5.5)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 27 Feb 2011 08:28:30 +0000 (09:28 +0100)]
Remove an useless condition in equal SEE pruning
Because we are never in check there and evaluation cannot
return a mated value the condition is useless.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 22 Feb 2011 22:23:45 +0000 (23:23 +0100)]
Prune moves with equal SEE in qsearch
After 5166 games:
Mod vs Orig 890 - 762 - 3514 ELO +8 (+- 5.5) LOS 96%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 26 Feb 2011 13:09:58 +0000 (14:09 +0100)]
Add evaluation tracing code
This patch is based on Justin Blanchard's original
work and allows to breakdown evaluation in its sub terms and
show to the user.
Tracing code has zero speed impact when not used.
Note that tracing code is not thread-safe, but this
should not be a problem given the typical usage scenario.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 21 Feb 2011 11:45:51 +0000 (12:45 +0100)]
Correctly round evaluation to grain size
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 17 Feb 2011 07:24:35 +0000 (08:24 +0100)]
Depth dependant singular extension margin
After 7965 games:
Mod vs Orig 1324 - 1249 - 5392 ELO +3 (+- 4.4) LOS 81%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 20:27:22 +0000 (21:27 +0100)]
Move all enum types definitions to types.h
Cleanup headers while there.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 13:34:00 +0000 (14:34 +0100)]
Retire color.h
Move contents to piece.h and square.h
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 13:25:46 +0000 (14:25 +0100)]
Rename piece_of_color_and_type() to make_piece()
To be aligned with make_square()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 13:17:18 +0000 (14:17 +0100)]
Retire piece_type_from_char()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 11:23:16 +0000 (12:23 +0100)]
Triviality in main.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 09:03:30 +0000 (10:03 +0100)]
Retire enum SquareDelta
Use Square instead. At the end is the same because we were
anyway foreseen operators on mixed terms (Square, SquareDelta).
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 23 Feb 2011 08:43:47 +0000 (09:43 +0100)]
Small simplifications in square.h
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 19 Feb 2011 11:22:23 +0000 (12:22 +0100)]
Introduce and use speed_to_uci()
And retire nps()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 18 Feb 2011 16:02:25 +0000 (17:02 +0100)]
Rename SplitPoint parentSstack
Now that we don't have anymore a search stack array in
SplitPoint we can rename this data member to somthing more
usual.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 18 Feb 2011 14:44:02 +0000 (15:44 +0100)]
Retire SearchStack sstack[] from SplitPoint
Use a local variable instead. To make it work we need to
correctly init next ply search stack at the beginning of the
search because now that ss is allocated on the stack instead
of on the global storage it contains garbage.
As a side effect we can peform a fast search stack
init in id_loop().
With this patch size of SplitPoint goes from 71944 to 136 bytes,
and consequently size of Thread goes from 575568 to 1104 bytes.
Finally the size of ThreadsManager that contains all the thread
info goes from
9209248 to just 17824 bytes !!
No functional change also in faked split.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 17 Feb 2011 07:55:56 +0000 (08:55 +0100)]
Sync Root new depth to what we do in search()
This allow us to restore the old depth 12 benchmark
and fixes one and for all the depth mess.
Test confirms no regression:
After 5658 games 892 - 924 - 3842 ELO -1 (+- 5.2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 17 Feb 2011 08:24:55 +0000 (09:24 +0100)]
Unify best move update logic
Try to rewrite the Root case using as most as common
code as possible.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 17 Feb 2011 08:08:27 +0000 (09:08 +0100)]
Do not special case reductions for MultiPV case
Note that this introduces an asymmetry in which best move
is searched deeper then others also in MultiPV, but this is
not an error per se.
No functional change when MultiPV = 1
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 16 Feb 2011 07:56:24 +0000 (08:56 +0100)]
Avoid permanent PV entries in TT
This patch removes a condition that allows a PV entry to remain
in TT across games for an unlimited time.
Although this produces a nice ELO boost in the long term it
is an artifact that affects tests results bewteen version
with and without this feature.
So remove now and readd before to release because it actually
seems a strong feature.
As example a verification tournament against SF 2.0.1 starting around
+10 ELO after 4K games sligltly climbed to +21 ELO after 14K games !!!
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 13 Feb 2011 10:13:54 +0000 (11:13 +0100)]
Write the LogFile only at the end of an iteration
Skip writing fail high/low sequences. Note that we don't need
fail high/low markers anymore in pretty_pv().
No functional change but some do/undo move sequences.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 12 Feb 2011 18:04:27 +0000 (19:04 +0100)]
Spell checking fixes in search.cpp
Reported by Eelco on open-chess.org
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 12 Feb 2011 17:40:16 +0000 (18:40 +0100)]
Rename iteration in depth in id_loop()
And retire the redundant one.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 12 Feb 2011 17:09:08 +0000 (18:09 +0100)]
Start to count iterations from 1
First search should be done at iteration = 1, not 2. So offset
the variable by one.
As a nice side effect now search correctly stops at PLY_MAX
included, not after searching (PLY_MAX - 1) as before.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 12 Feb 2011 16:39:48 +0000 (17:39 +0100)]
Fix wrong reported depth
Interestingly this patch will make people complain search depth
is reduced against 2.0.1 ;-) but actually it is only an artifact.
Spotted by Joona.
No functional change apart from a different do / undo move
sequence due to teh fact that we don't call pv_info_to_uci()
anymore before entering id loop.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 11 Feb 2011 05:20:16 +0000 (06:20 +0100)]
Move sending of PV line to id_loop()
No functional change apart form move reordering because
pv_info_to_uci() performs a do / undo_move sequence.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 10 Feb 2011 20:09:20 +0000 (21:09 +0100)]
Maximum aspiration delta of 24
After 9080 games
1430 - 1342 - 6308 ELO +3 (+- 2.9)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 5 Feb 2011 18:24:42 +0000 (20:24 +0200)]
Maximum aspiration delta of 64
After 9242 games
Mod vs Orig: 1483 - 1373 - 6386 ELO +4 (+- 2.9)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 6 Feb 2011 11:36:59 +0000 (12:36 +0100)]
Simplify latest patches
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Wed, 2 Feb 2011 22:49:26 +0000 (00:49 +0200)]
Retire some conditions from ok_to_use_TT_pv
After 4844 games 768 - 747 - 3329 ELO +2
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 31 Jan 2011 12:05:01 +0000 (13:05 +0100)]
Use TT for pruning also in PV nodes
Biggest advantage is be able to analize positions
without "loss of memory" when goind back/forth in
a position.
Patch has proven to fix analysys problems and is even
worths some elo points.
After 5811 games Mod- Orig:
1037 - 902 - 3872 +8 ELO (+- 3.6) LOS 97%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 29 Jan 2011 13:10:05 +0000 (14:10 +0100)]
Silence silly MSVC warning c4146
Warning C4146: unary minus operator applied to
unsigned type, result still unsigned.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 29 Jan 2011 12:59:23 +0000 (13:59 +0100)]
Remove defined(IS_64BIT) in init_sliding_attacks()
No functional change bith in 32 and 64 bits.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 29 Jan 2011 12:14:01 +0000 (13:14 +0100)]
Do not use <algorithm> in to_fen()
Seems there are some problems on HP-UX compiler.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 29 Jan 2011 11:11:00 +0000 (12:11 +0100)]
Retire obsolete reentrancy check in pos.print()
We dont' call MovePicker from print() anymore, so that
reentrancy check in now not needed.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 24 Jan 2011 07:42:22 +0000 (08:42 +0100)]
Retire singleEvasion
This let us get rid of number_of_evasions()
After 5487 games
Mod- Orig: 851 - 852 - 3784 +0 ELO (+- 3.7)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 23 Jan 2011 21:59:05 +0000 (22:59 +0100)]
Add a MovePicker c'tor specialized for qsearch
This simple patch shows a speed increase of
more then 2% !
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 23 Jan 2011 09:19:30 +0000 (10:19 +0100)]
Introduce and use qsearch_scoring()
Move qsearch scoring functionality out of RootMoveList
initialization. Will be needed by future patches.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 23 Jan 2011 09:52:51 +0000 (10:52 +0100)]
Retire InitialDepth
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 23 Jan 2011 07:59:16 +0000 (08:59 +0100)]
Pass TT move instead of Rml[0].pv[0] to MovePicker
This is used for secondary scoring so it does not
changes the fact that Rml[0].pv[0] is always tried
as first anyhow.
It happens this is even a no functional change patch
becuase we reinsert PV in TT after a search so that
TT move is actually Rml[0].pv[0].
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 16 Jan 2011 23:29:44 +0000 (01:29 +0200)]
Different searchedMoves system
After 8751 games on russian cluster
Mod- Orig: 1426 - 1323 - 6002 ELO +4 (+- 2.9) LOS 86%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 23 Jan 2011 07:36:12 +0000 (08:36 +0100)]
Remove special Root cases
So to better spot where the differences really
count. Also add some more additional cleanup.
Harmless functional change and no regression.
After 5780 games
Mod- Orig: 931 - 955 - 3894 ELO -1 (+- 3.6)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 20 Jan 2011 08:05:52 +0000 (09:05 +0100)]
Retire init_ss_array()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 19 Jan 2011 16:48:05 +0000 (17:48 +0100)]
Small cleanup in init_sliding_attacks()
No functional change both in 32 and 64 bits.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 19 Jan 2011 16:00:48 +0000 (17:00 +0100)]
Numbers formatting in bitboard.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 19 Jan 2011 12:43:07 +0000 (13:43 +0100)]
Use opposite_color_squares() instead of same_color_squares()
It is almost alwasy the requested test and is a bit faster too.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 19 Jan 2011 11:20:06 +0000 (12:20 +0100)]
Retire RelativeRankBB[]
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 19 Jan 2011 09:53:47 +0000 (10:53 +0100)]
Retire some unused functions in bitboard.h
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 18 Jan 2011 17:35:20 +0000 (18:35 +0100)]
Fix some warnings under icc
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 18 Jan 2011 08:18:34 +0000 (09:18 +0100)]
Sort root moves moves in MovePickerExt
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 18 Jan 2011 06:34:36 +0000 (07:34 +0100)]
Fix a (bestValue == -VALUE_INFINITE) assert
In case of a Root node we can leave with bestValue set
to -VALUE_INFINITE if search is stopped by the GUI and
stopReques flag is raised.
This patch fixes the issue.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 17 Jan 2011 18:02:50 +0000 (19:02 +0100)]
Additional cleanup in id_loop()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 17 Jan 2011 17:41:26 +0000 (18:41 +0100)]
Use a global RootMoveList object instead of a pointer
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 17 Jan 2011 09:44:00 +0000 (10:44 +0100)]
Move globals to id_loop()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 16 Jan 2011 22:40:06 +0000 (23:40 +0100)]
Introduce and use MovePickerExt
A bit of template magic to restore a proper and readable moves
'while' loop that now is again 'similar' to the one that used
to be in search().
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 16 Jan 2011 12:41:57 +0000 (13:41 +0100)]
Unify root_search() step 3
Retire root_search()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 16 Jan 2011 12:38:05 +0000 (13:38 +0100)]
Unify root_search() step 2
Enable the change: now we use search() instead of root_search()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 16 Jan 2011 11:02:32 +0000 (12:02 +0100)]
Unify root_search() step 1
Teach search() to behave as a root node if requested.
Just added code, but still no functional change.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Mon, 17 Jan 2011 13:20:05 +0000 (15:20 +0200)]
Fix very theoretical History corner case
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 16 Jan 2011 11:34:47 +0000 (12:34 +0100)]
Sync root_search() with search()
This will let unification easier.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 11 Jan 2011 08:56:47 +0000 (09:56 +0100)]
Move fail loops out of root_search() to id_loop()
And sync root_search() with search()
After 9384 games Mod - Orig:
1532 - 1433 - 6419 ELO +3 (+- 2.8)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 13:58:25 +0000 (14:58 +0100)]
Last touches in history.h
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 11:05:31 +0000 (12:05 +0100)]
Fix a warning with __popcnt64() intrinsics
Returns an int64_t while we want a simple int.
This occurs only when compiling with MSVC on a 64 bit platform.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 10:21:00 +0000 (11:21 +0100)]
Partially restore HistoryMax
Should be not useful but better safe than sorry.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 09:47:11 +0000 (10:47 +0100)]
Move Min() and Max() macros to types.h
As usual a bit of cleanup while there...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 09:13:26 +0000 (10:13 +0100)]
Clarify we want Score and Value to be integers
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 08:49:03 +0000 (09:49 +0100)]
Retire history.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 15 Jan 2011 08:30:07 +0000 (09:30 +0100)]
Retire HistoryMax
Infact we don't use it anymore already.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sun, 9 Jan 2011 16:38:55 +0000 (18:38 +0200)]
Set HistoryMax infinitely high
Respin this old idea. Earlier we tried only
with < 1000 games and result was inconclusive.
After 5845 games
Mod vs Orig: 935 - 936 - 3974 ELO (+-3.6)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 14 Jan 2011 08:20:23 +0000 (09:20 +0100)]
Simplify from_fen()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Wed, 5 Jan 2011 09:08:25 +0000 (10:08 +0100)]
Initialize killers at ss+2 also in root_search()
After 4955 games:
Mod - Orig: 786 - 768 - 3401 +1 ELO
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Thu, 13 Jan 2011 18:25:42 +0000 (19:25 +0100)]
Fix an hang on 32 bits while allocating big TT table
If size_t is defined as a 32 bit quanitity then we have an
overflow in the left term of the while condition if mbSize
is bigger then 2048.
For instance if mbSize is 2049 then when newSize will reach
0x80000000 (2048MB) comparison is still true, 'while' loops
again and we have an overflow in the expression (2*newSize)
so that result is 0 and at that point 'while' keeps looping
forever hanging the application.
This patch fixes the bug and also makes operator new do not
throw an exception upon failure but return a NULL pointer
instead.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Tue, 11 Jan 2011 15:22:12 +0000 (16:22 +0100)]
Set unbuffered I/O also for C standard library
In input_available() we use function select(), so
we have to set as unbuffered also C library I/O
functions otherwise we can miss some input.
For instance in case GUI sends "go infinite\nstop\n" we
parse the "go infinite" but then input_available() under Linux
is unable to detect that we still have "stop" to be processed.
This is because "select" uses file descriptors instead of file
pointers. So it cannot know about the buffer associated to a file
pointer.
This patch, by BB+, should fix the problem.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 10 Jan 2011 08:41:26 +0000 (09:41 +0100)]
Big book.cpp cleanup
Better document PolyGlot formats and greatly
reduce line count.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Mon, 10 Jan 2011 08:40:32 +0000 (09:40 +0100)]
Compile fix in types.h
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 Jan 2011 14:57:18 +0000 (15:57 +0100)]
Small cleanup in execute_uci_command()
With a little fall out in siblings functions...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 Jan 2011 13:45:49 +0000 (14:45 +0100)]
Simplify set_option()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 8 Jan 2011 11:34:29 +0000 (13:34 +0200)]
TTEntry simplification
Now that move is fitted in 16 bits we can simplify TTEntry.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sun, 9 Jan 2011 10:22:59 +0000 (11:22 +0100)]
Don't copy Position in pretty_pv()
Also let do_setup_move() don't reuse same StateInfo so that
we can remove the check about different StateInfo objects
before memcpy() in do_move.
Functional change due to harmless additionals
do_move() / undo_move() steps.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 17:31:14 +0000 (18:31 +0100)]
Merge line_to_san() into pretty_pv()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 16:34:17 +0000 (17:34 +0100)]
Ressurect move.cpp
Actually it is san.cpp renamed. Because now has the move
conversions functions and doesn't have any more the bulky
move_from_san(), it is better to call it move.cpp
Remove san.h while there.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Sat, 8 Jan 2011 15:23:02 +0000 (17:23 +0200)]
Fix build failure under Linux
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 15:23:46 +0000 (16:23 +0100)]
Retire move_from_san()
It is unused and it is big.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 15:00:22 +0000 (16:00 +0100)]
Greatly simplify move_from_uci()
Use a reverse logic: among the list of generated legal moves
transformed in UCI coordinate notation find the one that
matches the given string.
It is a bit slower, but here is not performance critical and
is much more simplified then before.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 14:53:08 +0000 (15:53 +0100)]
Move uci move parsing under san.cpp
This partially reverts
1e7aaed8bc keeping the conversion
functions from/to move to uci string in the same file.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Fri, 7 Jan 2011 22:13:22 +0000 (00:13 +0200)]
Change Emergency time maximum from 60000 to 30000
I got report from Werner that Shredder Gui has problems with
UCI values which maximum value is greater than 30000.
Of course it's stupid to change engine to fix a GUI's bug,
but on the other hand 30000 ms as maximum value is clearly enough,
so why not to be merciful
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Joona Kiiski [Fri, 7 Jan 2011 22:12:26 +0000 (00:12 +0200)]
Fix Makefile's GPL-notice to be similar to other files
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 13:16:04 +0000 (14:16 +0100)]
Improve I/O responsivness
Added checking of (stdin->_cnt > 0) from Greko.
This seems to greatly improve responsivness when running
under console. Now while running a 'stockfish bench', any key
press immediately is detected by SF while before there was a
delay of some fraction of a second.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 12:06:51 +0000 (13:06 +0100)]
Fix reading a book under-promotion move
This is an old Glaurung bug that prevented a Polyglot
book move to be read correctly in case of underpromotion.
This patch fixes the bug restoring support for both
queen and underpromotions.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Sat, 8 Jan 2011 11:53:41 +0000 (12:53 +0100)]
Triviality in data_available()
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 7 Jan 2011 15:33:15 +0000 (16:33 +0100)]
Force inlining of move generation functions
MSVC (and possibly other compilers) does not inline
as requested, so force it to do so.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
Marco Costalba [Fri, 7 Jan 2011 14:17:28 +0000 (15:17 +0100)]
Small tweak to generate_castle_moves()
Move the castling condition test out of the
function. This avoids a function call most of
the times.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>