1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00
Commit graph

3194 commits

Author SHA1 Message Date
Marco Costalba
d99a95df29 Micro optimization in extension()
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-29 12:18:36 +01:00
Marco Costalba
0da1d6a846 Remove a gcc warning on an unused variable
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-29 12:18:23 +01:00
Marco Costalba
5d94305af3 Properly handle odd depths in razor formula
A little bit more aggressive, but should be more
in line with the depths logic.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-28 19:38:44 +01:00
Marco Costalba
e4fd9a2df7 Safer razoring formula
Add also the possibility to razor at ply one.
It is disable dby default but it seems stronger
against Stockfish itself. It is still not clear if
is stronger against other engines. By now leave
disabled.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-28 12:55:33 +01:00
Marco Costalba
aedc6c6f1f Don't silently accept an option name mismatch
With this we could have found earlier the futility
name option bug!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-28 12:37:13 +01:00
Marco Costalba
dae4e7df07 Tweak again futility margings
Lower margins near the leafs, higher at high depth.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-25 20:08:45 +01:00
Marco Costalba
96a32eec69 Expose new futility margin interface to UCI
Now futility margin it's actually a scale factor
to apply to the base ones.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-25 19:41:24 +01:00
Marco Costalba
e46d3670fd Tweak futility margins
Less prune at the bottom and at the middle, a bit more
at the top.

After 747 games: +215 =345 -187 +13 elo

Also introduced a vector of margins, now that start to be a lot
it is a more flexible solution.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-25 12:05:45 +01:00
Marco Costalba
8cd5cb930d Try razoring only for depth > OnePly
Because razoring verification after qsearch() cuts more
then 40% of candidates, do not waste a costly qsearch for
nodes at depth one that will be probably discarded anyway
by futility.

Also tight razoring conditions to keep dangerous false
negatives below 0,05%. Still not clear if it is enough.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-24 09:35:57 +01:00
Marco Costalba
2feb9d5100 Futility pruning till ply 6 included
Seems good:

After 796 games: +211 = 393 -192 +8 elo

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-24 09:34:09 +01:00
Marco Costalba
d11426c777 Fix a comment
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-23 12:02:10 +01:00
Marco Costalba
e96f56adfa Merge futility pruning from Glaurung 2.2
It seems much more powerful then previous one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-23 12:01:48 +01:00
Marco Costalba
e3b03f13b3 Passed pawns: consider enemy rooks or queens from behind
Merged from Glaurung 2.2

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-22 12:10:15 +01:00
Marco Costalba
54b7da120f King safety: retire rook contact check
Merged from Glaurung 2.2

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-22 12:07:00 +01:00
Marco Costalba
3fafc9768a Set the 'Problem' variable only at ply == 1
Bug fix merged from Glaurung 2.2 for search_pv()

Added the same fix also to sp_search_pv() where
was missing.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-22 11:44:00 +01:00
Marco Costalba
23490bd825 Retire EvaluatePawnStorms and UseEasyMove constants
Merged from Glaurung 2.2

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 20:10:20 +01:00
Marco Costalba
61c6a3d5a0 Merge cosmetics from Glaurung 2.2
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 17:02:34 +01:00
Marco Costalba
31d4f0b734 Merge space weigth evaluation fromGlaurung 2.2
Is a new evaluation rule that gives bonus in midgame
to the side that has more space behind pawns for its
minor pieces.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 16:26:36 +01:00
Marco Costalba
f178f0a291 Merged two new endgames from Glaurung 2.2
It is two bishop against a knight and two minor
pieces against one minor piece.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 15:38:10 +01:00
Marco Costalba
72ca727b38 SEE: add support for enpassant moves
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 10:44:41 +01:00
Marco Costalba
2d0146fe1d Call poll() before to check for stopped search
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 10:44:12 +01:00
Marco Costalba
96d0501735 Less aggressive razoring
Use a margin to compare with beta so that positions
that after the verifying qsearch have gained a lot of points
are not discarded just becasue not above beta.

Also remove the second condition on depth <= OnePly, it
was too risky and added only a 2% more of pruned nodes.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-21 10:42:39 +01:00
Marco Costalba
b58ad355ca Revert: "Do not razor when in check"
It is slightly weaker after 500 games. Keep the
check on mate values.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-18 22:01:56 +01:00
Marco Costalba
17000d1ea0 Trigger of PawnEndgameExtension if capture is not a pawn
Instead of a rook.

This gives an unexpected graeat increase!

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-17 19:36:51 +01:00
Marco Costalba
b09cbaebb9 search_pv: an enpassant move is a capture
Fix the logic in search_pv and sp_search_pv

An additional issue to consider is that a castle move
is not a capture but destination square is not empty.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-16 22:20:53 +01:00
Marco Costalba
725c504a5f qsearch: take in account enpassant in futility formula
Should not change anything at ELO level but it is
the correct thing to do.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-16 22:20:42 +01:00
Marco Costalba
bfbfc24d07 qsearch: do not call evaluate when in check
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-16 22:20:18 +01:00
Marco Costalba
a55b06d3c9 Restore development versioning and LSN filtering
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:23:03 +01:00
Marco Costalba
ecc19381b4 Do not razor while in check or value is mate
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:20:03 +01:00
Marco Costalba
dae2f600d6 Do not null search when beta is a mate value
Also do not return unproven mates in null search.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:19:25 +01:00
Marco Costalba
4c294932e7 Better document null move dynamic reduction
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:18:56 +01:00
Marco Costalba
c831b00544 Introduce beta counters to order moves at ply one
Instead of number of searched nodes use the number of
opponent beta-cutoff occurred under the move subtree.

After 570 games 1+0 we have: +150 =288 -132 (+11 ELO)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-15 22:13:42 +01:00
Marco Costalba
5b853c9be6 Debugging: move debug function definitions in misc.cpp
Also activate writing on log file.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-14 17:26:05 +01:00
Marco Costalba
5f8f83bc05 Debugging: print to file
Print debug info on log file, not only on std::cout

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-14 14:57:17 +01:00
Marco Costalba
8ee3124487 Fix two bugs in ok_to_prune() (2)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-12 22:27:43 +01:00
Marco Costalba
07b45151d2 Disable "Null driven IID" by default
Testing is not clear. Probably we need to test
at deeper depths to have some clear results.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-11 20:39:08 +01:00
Marco Costalba
9e3ab9099f Null move only for depth > OnePly
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-11 20:38:52 +01:00
Marco Costalba
f09884d72f Null driven IID: remove IIDMargin from see() condition
This seems to cut searched nodes also more.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 21:43:09 +01:00
Marco Costalba
ab29d8df67 Fix inflate pawns.cpp fallout
Catched counting the nodes searched at
fixed depth. A quick and reliable cross check,
expecially in inflate only patches.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 21:35:07 +01:00
Marco Costalba
389dc0e83b Add behind_bb() helper to simplify code logic
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 00:14:24 +01:00
Marco Costalba
67aac4889e Space inflate pawns.cpp
Hopefully no functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 00:14:15 +01:00
Marco Costalba
aaad48464b Add a see() function that take only destination square
In this case firstlocates the least valuable attacker, if any,
then proceed as usual.

This will be used by next patch.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-10 00:13:59 +01:00
Marco Costalba
235df6a887 Stockfish 1.1a
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-08 12:03:46 +01:00
Marco Costalba
8d86c87e1e Add "Null driven IID" UCI option (default true)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-08 10:57:40 +01:00
Marco Costalba
c172af1b61 Null move driven internal iterative deepening
When a null move fails low due to a capture, try
to detect if without the capture we are above beta,
in this case there is a good possibility this is
a cut-node and the capture is just a null move
artifact due to side to move change. So if we still
don't have a TT move it's a good time to start an IID.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-08 10:46:52 +01:00
Marco Costalba
b7c36d078b Stockfish 1.1
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 17:18:59 +01:00
Marco Costalba
db1b0bfa1d Revert see() shortcut for LxH and equal captures
It happens that more then 70% of cases are HxL, where
we call see() anyway. The mesured saving of calling
see is about 0,5% of total time, but considering the
added burden in score_captures() the saving is only
0,35% locally and due to more difficult inlining of
the function it ends up that we have no advantage at all,
possibly a small slow down!

So revert.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 12:32:23 +01:00
Marco Costalba
6f946f823c Fix two gcc warnings in san.cpp
One good, the other silly.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 12:32:11 +01:00
Marco Costalba
2de78ebc7b Fix an Intel warning in san.cpp
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 12:31:48 +01:00
Marco Costalba
32934c0c8d MovePicker: avoid calling see() for LxH and equal captures
No functional change but should speed-up the captures scoring.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2008-12-06 11:37:19 +01:00