Marco Costalba
b1929960f9
Fix bug in evaluate_passed_pawns()
...
If blockSq is already on rank 8, blockSq + pawn_push(Us) is on rank 9,
outside of board. It does not make sense to measure king distance to
a field outside the board.
Bug spotted by Fruity:
http://open-chess.org/viewtopic.php?f=5&t=1156&start=10
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-03 12:10:53 +01:00
Marco Costalba
8447248705
Retire "Pawn Structure" UCI option
...
Almost useless for the user and now is in sync with
the material value that is already weighted.
A small speedup of 0,4% because we avoid an apply_weight()
call in a fast path.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-02 17:50:46 +01:00
Marco Costalba
a10487b074
Rename stuff in evaluate.cpp
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-02 17:50:37 +01:00
Marco Costalba
db31efb8a6
Additional tweaks in evaluate_unstoppable_pawns()
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-01 12:15:40 +01:00
Marco Costalba
75acd52415
Remove redundancy in evaluate_unstoppable_pawns()
...
Spotted by Fruity
http://open-chess.org/viewtopic.php?f=5&t=1156&start=20
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-01 10:31:27 +01:00
Marco Costalba
18c9b5ee86
Small reformat in evaluate_unstoppable_pawns()
...
Also simplify tracing because evaluate_unstoppable_pawns()
return always zero if both colors have non pawn material.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-01 09:58:45 +01:00
Marco Costalba
33bd67e052
Update polyglot.ini
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-05-01 07:49:40 +01:00
Marco Costalba
4dc7ba1619
Rename check related functions
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-29 18:56:48 +01:00
Marco Costalba
92d70fb667
Small renaming in thread.cpp
...
To better self document the code.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-29 13:08:35 +01:00
Marco Costalba
0bf475ec55
Rename Option in UCIOPtion
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-29 13:08:27 +01:00
Marco Costalba
bb7713c8e9
Limit history range to +-2000
...
Extensive test series on tweaking history limit and bonus
formula. At the end this was the best.
After 11959 games:
Mod vs Orig 2087 - 1934 - 7938 ELO +4 (+- 3.7) LOS 92%
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-28 08:00:34 +01:00
Marco Costalba
e656ddcf18
Perft counts leaf nodes not generated moves.
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-27 23:21:46 +01:00
Marco Costalba
1d0159075e
Use probe() as name for looking up into an hash table
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-27 07:31:51 +01:00
Marco Costalba
321320b081
Tidy up uci.cpp and siblings
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-26 13:23:47 +01:00
Marco Costalba
ca9d40c145
Move OpeningBook and RK where are actually used
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-26 13:23:39 +01:00
Marco Costalba
03f4d1e8d6
Fix a compile error with gcc
...
It seems gcc does not like an extra semicolon.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-25 22:59:56 +01:00
Marco Costalba
87f2b52ace
Move MovePickerExt specializations away from headings
...
This unclutters a bit the heading part of search.cpp
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-25 13:35:13 +01:00
Marco Costalba
09d01ee9dc
Tidy up benchmark.cpp
...
Node count is different just becuase now we don't log on
"bench.txt" file anymore so that we avoid some calls to
pretty_pv() that calls Position::do_move().
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-25 12:07:30 +01:00
Marco Costalba
05cfb00f26
Large API rename in ThreadsManager
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-25 10:30:39 +01:00
Marco Costalba
339e1b49f6
Don't allocate MAX_THREADS hash tables if not necessary
...
This prevent crashing on mobile devices with limited RAM,
currently with MAX_THREADS = 32 we would need 44MB that
could be too much for a poor cellphone.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-24 19:23:07 +01:00
Marco Costalba
fecefbb99c
Move pawn and material tables under Thread class
...
This change allows to remove some quite a bit of code
and seems the natural thing to do.
Introduced file thread.cpp to move away from search.cpp a lot
of threads related stuff.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-24 17:07:22 +01:00
Marco Costalba
c9d7e99de6
Rename MOVES_MAX in MAX_MOVES
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-24 08:54:36 +01:00
Marco Costalba
ccd5ccbcdb
Retire extensions as UCI option
...
There is no real need why an user should change these values.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-24 08:52:16 +01:00
Marco Costalba
633c83f648
Document why we use per-thread pawn and material tables
...
Arisen from a discussion on talkchess.
No fnctional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-24 08:18:39 +01:00
Marco Costalba
fe213d30fa
Fix some comments in early stop detection
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-23 15:52:51 +01:00
Marco Costalba
8b2adcf99e
Retire UseLogFile in search.cpp
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-23 15:00:44 +01:00
Marco Costalba
1d368bbbdc
Introduce and use SearchLimits
...
Pack a bit of global variables related to search limits in
a single struct.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-23 13:11:03 +01:00
Marco Costalba
bbfe452f85
Use move_is_special() in pawn endgame condition
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-22 12:30:51 +01:00
Marco Costalba
8bf9dc8254
Retire SearchStartTime global
...
Use a static variable inside current_search_time() instead.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-22 12:30:43 +01:00
Marco Costalba
f349143a6b
Reduce loops in init_threads() and exit_threads()
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-22 12:30:35 +01:00
Marco Costalba
79e50a2fbf
Move wake_sleeping_thread() to Thread class
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-20 12:05:07 +01:00
Marco Costalba
2c317d7b28
Correctly implementg selDepth feature
...
Send to GUI the deepest search depth apart from
qsearch of the PV line.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-20 12:04:59 +01:00
Marco Costalba
fdc9f8cbd7
Move sleepLock and sleepCond under Thread
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-20 12:04:52 +01:00
Marco Costalba
2e6839c9a0
Increase risk of blunders at low skill levels
...
According to Heinz's tests current setup is in fact too
strong for weak players. This seems the best according
to his tests.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-20 12:04:43 +01:00
Marco Costalba
67b0d0b1cc
Use only history to score non captures
...
It seems gain is practically unuseful, so remove.
After 13554 games:
Mod vs Orig 2252 - 2319 - 8983 ELO -1 (+- 3.4)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-17 22:32:12 +01:00
Marco Costalba
068561f86a
Small simplification in scale_by_game_phase()
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-17 10:31:26 +01:00
Marco Costalba
076b62310e
Move ply to SearchStack
...
Shrink search() signature for better readibility.
We get also a nice 1.3% speed increase.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-17 08:59:54 +01:00
Marco Costalba
5ba85ef441
Remove one indentation level in get_next_move()
...
Small renaming and fix some comments.
No functional and no speed change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-16 12:57:06 +01:00
Marco Costalba
c13b53a514
Code style in tt.cpp
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-16 10:49:35 +01:00
Marco Costalba
a860576493
Better self-document LMR reduction() formula
...
Suggested by Onno
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-16 10:49:27 +01:00
Marco Costalba
786564068b
Promote OptionsMap to a class
...
And add a bit of documentation too.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-16 10:49:20 +01:00
Marco Costalba
6056a43419
Fix a stale comment
...
Spotted by Onno
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-16 10:21:31 +01:00
Marco Costalba
f8e767388b
Remove src/COPYING file
...
It is enough the one in the base directory
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-14 07:06:56 +01:00
Marco Costalba
b41b590457
Remove "divide by zero" workaround
...
It is now useless because of the condition at the beginning.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-14 07:04:32 +01:00
Marco Costalba
7f367e6019
Cleanup debug counters
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-13 18:51:56 +01:00
Marco Costalba
54f1c383d3
Move move_is_legal() under Position class
...
It is a more logical place than in move generation file.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-13 13:18:19 +01:00
Marco Costalba
fe8f5b3497
Some more cleanup in endgame.cpp
...
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-13 13:17:21 +01:00
Marco Costalba
6608a16a6a
Fix some warnings and a compile error with icc
...
Unfortunatly icc does not understand that weakerSide and
strongerSide belongs to the base class :-(
So we have define them in the derived class.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-12 08:05:41 +01:00
Marco Costalba
b5d5646c84
Move EndgameFunctions to endgame.cpp
...
And cleanup code while there.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-11 21:25:24 +01:00
Marco Costalba
08c464c690
Increase MaterialTableSize 8 times
...
Now that we prefetch in material hash table we
can increase its size and gain something.
Hit rate is now of 98% from 92%
Speedup of 0.8%
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2011-04-11 18:15:40 +01:00