Gary Linscott
afafdf7b73
MSVC compiling fixes
...
No functional change.
Resolves #150
2014-12-11 13:03:44 -05:00
Gary Linscott
a87da2c4b3
Add some tablebase positions to bench
...
This makes it easier to check for regressions in the tablebase code.
Bench: 9489202
5-man bench: 8943906
Resolves #145
2014-12-08 07:58:05 +08:00
Gary Linscott
4509eb1342
Fix out-of-bound array access printing ponder move
...
It is possible that we won't have a ponder move if our PV
is too short. In that case, just don't print a ponder move.
No functional change
Resolves #130
2014-11-24 08:53:00 +08:00
Gary Linscott
7ad59d9ac9
Fix pondering
...
The UCI specification states that an engine can never exit the search
while pondering.
No functional change.
Resolves #118
2014-11-24 08:50:36 +08:00
Gary Linscott
bffe32f4fe
Fix fen output for castling rights
...
This is a regression from 428962a
We have to cast to char here, otherwise the compiler
interprets it as an integer, and writes a number.
No functional change
Resolves #122
2014-11-19 06:37:59 +08:00
Gary Linscott
4739037f96
100% accurate PV display
...
This gives SF accurate PVs, such that the evaluation of the leaf node in
the PV matches the score backed up to the root (99% of the time.
q-search will use the value stored in the hash table instead of the eval
value sometimes).
One drawback is that fail-high/low only get a minimal 2 move PV.
It doesn't add any additional overhead to the non-PV codepath except an
extra eight bytes to the SearchStack structure in multi-threaded
searches.
A core part of this is not pruning based on TT score in PV nodes. This
was measured as not being a regression at multiple TCs, except for one
exception, fast TC with huge hash, which is not realistic for longer
searches.
STC - 1 thread, 128 mb hash
ELO: 1.42 +-3.1 (95%) LOS: 81.9%
Total: 20000 W: 4078 L: 3996 D: 11926
STC - 3 thread, 128 mb hash
ELO: -3.60 +-2.9 (95%) LOS: 0.8%
Total: 20000 W: 3575 L: 3782 D: 12643
STC - 3 thread, 8 mb hash
ELO: 0.12 +-2.9 (95%) LOS: 53.3%
Total: 20000 W: 3654 L: 3647 D: 12699
LTC - 3 thread, 32mb hash
ELO: 2.29 +-2.0 (95%) LOS: 98.8%
Total: 35740 W: 5618 L: 5382 D: 24740
Bench: 6984058
Resolves #102
2014-11-12 16:16:33 -05:00
Gary Linscott
766fb9c67d
Fix spacing.
...
No functional change.
2014-09-22 01:27:34 +08:00
Gary Linscott
b9a88da4ab
Revert "Use compiler intrinsic instead of assembly for popcnt"
...
This reverts commit a69f1d7c20 .
2014-07-01 17:01:54 -04:00
Gary Linscott
7ff865b924
Merge pull request #9 from glinscott/pawnspan
...
Scale down endgames with pawns on one or two adjacent files
Passed STC
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 16081 W: 2745 L: 2604 D: 10732
Passed LTC
LLR: 2.95 (-2.94,2.94) [1.00,6.00]
Total: 123832 W: 17292 L: 16584 D: 89956
128k games to measure ELO at 15+0.05:
ELO: 2.07 +-1.1 (95%) LOS: 100.0%
Total: 128000 W: 21632 L: 20869 D: 85499
New bench: 8028792
2014-06-26 12:21:06 -07:00
Gary Linscott
ec627911f0
A bit more cleanup
2014-06-26 15:20:30 -04:00
Gary Linscott
22ffb588e5
Merge pull request #8 from glinscott/revert_ce1c260
...
Revert "Check for an available slave early on"
2014-06-26 08:20:45 -07:00
Gary Linscott
e6a8d03dd8
Revert "Check for an available slave early on"
...
This reverts commit ce1c260ea9 .
2014-06-26 11:16:36 -04:00
Gary Linscott
747e035c7d
Original version of shane's patch
2014-06-25 16:45:14 -04:00
Gary Linscott
ab580106fd
Merge pull request #5 from glinscott/authors
...
Add AUTHORS
2014-06-23 09:14:03 -07:00
Gary Linscott
58bb23d0c3
Remove some duplicates
2014-06-21 00:49:49 -04:00
Gary Linscott
bbacff5e01
Add AUTHORS
2014-06-20 21:35:09 -04:00
Gary Linscott and Marco Costalba
0510112f91
Move LowMobPenalty into psq/mobility tables
...
Tested in no-regression mode.
Passed both STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 36705 W: 6537 L: 6443 D: 23725
and LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 9358 W: 1495 L: 1358 D: 6505
bench: 6921356
2014-04-12 07:15:51 +02:00
Gary Linscott and Marco Costalba
4597324572
Reduce penalty for doubled pawns further away from each other
...
Passed both STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 38339 W: 6849 L: 6649 D: 24841
and LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 22693 W: 3455 L: 3256 D: 15982
bench: 7508468
2014-04-12 07:05:02 +02:00
Gary Linscott and Marco Costalba
8863afeb84
Add a penalty for low mobility pieces
...
Passed both STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 81857 W: 14652 L: 14342 D: 52863
and LTC
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 45400 W: 6999 L: 6697 D: 31704
bench: 7716978
2014-04-10 08:35:10 +02:00
Gary Linscott and Marco Costalba
5c75455c8e
Restrict queen mobility to safe squares
...
Passed both STC
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 16188 W: 3119 L: 2971 D: 10098
and LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 6336 W: 1010 L: 882 D: 4444
bench: 7533692
2014-04-08 22:25:54 +02:00
Gary Linscott and Marco Costalba
9b1d594456
Remove bishop pin bonus
...
Shows no regression at LTC after 20K games:
ELO: 0.03 +-2.7 (95%) LOS: 51.0%
Total: 20608 W: 3252 L: 3250 D: 14106
bench: 7516178
2013-12-31 15:27:52 +01:00
Gary Linscott and Marco Costalba
26689d8c2a
Faster and simplified threat eval
...
Add a bonus according if the attacking
pieces are minor or major.
Passed both short TC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 13142 W: 2625 L: 2483 D: 8034
And long TC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 18059 W: 3031 L: 2844 D: 12184
bench: 7425809
2013-12-19 18:52:34 +01:00
Gary Linscott and Marco Costalba
13d1f0ae43
Restrict mobility of pinned pieces
...
Passed both short TC:
LLR: 3.00 (-2.94,2.94) [-1.50,4.50]
Total: 54342 W: 10950 L: 10692 D: 32700
And long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 61976 W: 10654 L: 10251 D: 41071
This patch introduces a slowdown of 3.5 % !!!!!
bench: 7911558
2013-11-07 22:26:03 +01:00
Gary Linscott and Marco Costalba
5d90c149b5
Enable LMR for dangerous moves
...
Passed both short TC
LLR: 2.96 (-2.94,2.94)
Total: 5598 W: 1250 L: 1125 D: 3223
And long TC
LLR: 2.97 (-2.94,2.94)
Total: 16441 W: 3102 L: 2912 D: 10427
bench: 4620975
2013-08-29 23:02:18 +02:00
Gary Linscott and Marco Costalba
aecdbfc4a0
Add lsb() overload
...
Helper to find least significant bit relative to
the given color.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com >
2013-08-28 19:50:11 +02:00
Gary Linscott and Marco Costalba
049e5ca191
Minor bugfixes to refutation table
...
Don't update refutation table in case of
previous move is MOVE_NULL or MOVE_NONE
and don't try refutation if is already
a killer move.
Pass both short TC
LLR: 2.96 (-2.94,2.94)
Total: 4310 W: 953 L: 869 D: 2488
And long one
LLR: 2.95 (-2.94,2.94)
Total: 6707 W: 1254 L: 1184 D: 4269
bench: 4785954
2013-05-14 23:52:44 +02:00
Gary Linscott
11d30b6298
Fix rounding issue
2013-05-02 14:37:55 -04:00
Gary Linscott
3edb15d183
More aggressive move count pruning
2013-05-02 09:47:34 -04:00
Gary Linscott and Marco Costalba
52f3e717fa
Add KNPKB endgame
...
In a game vs Junior, SF had the option to trade into a winning
pawn endgame, and failed to do so. PGN at bottom.
This FEN was one key position: 8/2Nb1k2/6pp/4Pp2/5K1P/5PP1/8/8 w - - 5 62.
SF master chooses h5 here, with a fail high, which goes into the drawn KNPKB
ending. With the patch, SF correctly chooses Ke3, which maintains chances to win.
[Event "nTCEC - Stage 2a - Season 1"]
[Site "http://www.tcec-chess.net "]
[Date "2013.03.05"]
[Round "11.3"]
[White "Stockfish 210213"]
[Black "Junior 13.3"]
[Result "1/2-1/2"]
[Variant "normal"]
1. d4 f5 2. g3 Nf6 3. Bg2 e6 4. c4 d5 5. Nh3 c6 6. O-O Bd6 7. Bf4 Be7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d5 Kd1 95. Nf6 Bf7
96. Ne4 Be8 97. Ke3 Kc2 98. Nd6 Bd7 99. Kd4 Kd1 100. Kd3 Ba4 101. Nc4 Bb5
102. Kc3 Be8 103. Nb2+ Ke1 104. Kd3 Kf2 105. Nd1+ 1/2-1/2
No functional change (just because bench does not change)
2013-03-18 20:40:06 +01:00
Gary Linscott and Marco Costalba
a24da071f0
Check for easy move just once
...
Here the rational seems to be that if after one try easy
move detection fails then the easy move is not so easy :-)
After 15563 games at 60+0.05
ELO: 3.04 +-5.5 (95%) LOS: 97.0%
Total: 15563 W: 2664 L: 2528 D: 10371
No functional change.
2013-03-11 22:23:19 +01:00
Gary Linscott and Marco Costalba
3698d9aa55
Be more aggressive on trying to finish iterations
...
Increase MaxRatio to use more time when in trouble.
After 16000 games at 60+0.05
ELO: 4.89 +-5.4 (95%) LOS: 99.9%
Total: 16000 W: 2700 L: 2475 D: 10825
No functional change.
2013-03-11 19:07:55 +01:00
Gary Linscott
ea4e22be1d
Merge branch 'master' into bishop_pin_clop
2013-02-19 10:31:52 -05:00
Gary Linscott
dc8c6ea2d1
Bring back original bonus
2013-02-19 10:31:50 -05:00
Gary Linscott
d570260a28
Back to CLOP average values
2013-02-16 22:36:58 -05:00
Gary Linscott
3922ac2fe4
Add new clop tuned value
2013-02-14 20:29:24 -05:00
Gary Linscott
66a1a77487
Merge branch 'master' into bishop_pin_clop
2013-02-13 21:41:15 -05:00
Gary Linscott
cd0ecace19
Revert "Use CLOP mean value instead of max"
...
This reverts commit d0c2faa5fd .
2013-02-13 21:40:38 -05:00
Gary Linscott
d0c2faa5fd
Use CLOP mean value instead of max
2013-02-13 12:21:16 -05:00
Gary Linscott
671f24ff35
Merge branch 'simplify_eval' into bishop_pin_clop
2013-02-13 12:19:54 -05:00
Gary Linscott
f32f899467
CLOP tuned
2013-02-13 00:12:02 -05:00
Gary Linscott
17b71fe51d
Add clop parameters
2013-02-12 00:10:21 -05:00
Gary Linscott
30c2e3828a
Merge branch 'master' into simplify_eval
2013-02-11 10:26:25 -05:00
Gary Linscott
a7cdf7299a
Bishop pins only
2013-02-11 10:26:18 -05:00
Gary Linscott
0c06b4509d
Slight tweak to king safety. Bench: 5534531
2013-02-08 08:53:13 -05:00
Gary Linscott and Marco Costalba
c67fb8ef04
Add KBPKP endgame
...
It is a draw if pawns are on G or B files, weaker pawn is
on rank 7 and bishop can't attack the pawn.
No functional change (because it is very rare and does not appear in bench)
2013-02-07 06:51:55 +01:00
Gary Linscott
a72710c660
Simplify eval take 2. Bench 5097444
2013-02-02 10:19:59 -05:00
Gary Linscott
57797822f8
Bring back just bishop pins
2013-01-26 15:35:00 -05:00
Gary Linscott
e83b9075ff
Simplify evaluation
2013-01-24 08:54:13 -05:00
Gary Linscott and Marco Costalba
cee6336515
Detect drawish KQKP endings
...
Based off of the rules from the wikipedia page,
here: http://en.wikipedia.org/wiki/Queen_versus_pawn_endgame .
bench does not change: 5312693 but patch is real, has been
tested on specific positions.
2012-10-28 10:17:57 +01:00
Gary Linscott and Marco Costalba
fdbe8006e0
Bonus for rook/queen attacking pawns on same rank
...
Patch and tuning by Gary Linscott from an idea of Ryan Taker.
Double tested by Gary:
Wins: 3390 Losses: 2972 Draws: 11323
LOS: 99.999992%
ELO: 8.213465 +- 99%: 6.746506 95%: 5.124415
Win%: 51.181792 +- 99%: 0.969791 95%: 0.736740
And by me:
After 5612 games 1255 1085 3271 +11 ELO
2012-09-21 23:25:13 +02:00
Gary Linscott
374c9e6b63
Add more detailed pawn shelter/storm evaluation
2012-03-26 07:52:10 -04:00
Gary Linscott
dbe5e28eaa
Merge remote-tracking branch 'upstream/master'
2012-03-25 10:18:29 -04:00
Gary Linscott
f41a21fefd
Penalty for undefended rook as well
2012-03-22 07:33:47 -04:00
Gary Linscott
d1e18fc7dd
Optimize undefended minor check.
2012-03-21 08:19:21 -04:00
Gary Linscott and Marco Costalba
3c6a4bfbed
Penalize undefended minors
...
Even if not under attack. This seems to be good
especially on openings.
After 12112 games at 10"+0.05
Mod vs Orig 2175 - 1997 - 7940 ELO +5 (+- 3.7)
[Patch series from Gary, little edited by me]
Signed-off-by: Marco Costalba <mcostalba@gmail.com >
2012-03-21 08:00:57 +01:00
Gary Linscott
b46bf2950f
Simpler stalemate check.
2012-02-05 14:52:01 -05:00
Gary Linscott
0347339970
Detect stalemate in KXK endgames
...
Also, handle cases where there are 2 bishops of the same color.
2012-02-05 10:24:53 -05:00