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

419 commits

Author SHA1 Message Date
Arjun Temurnikar
fe23f27086 Remove rook passers eval completely
Tested in no-regression mode.

Passed STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17727 W: 3248 L: 3122 D: 11357

And (a very long!) LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 106327 W: 16258 L: 16265 D: 73804

bench: 7396783
2014-04-27 09:51:48 +02:00
Arjun Temurnikar
3705559fdb Remove RookOn7th and merge values into psqt
Tested in no-regression mode:

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 55678 W: 9954 L: 9892 D: 35832

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 9238 W: 1448 L: 1311 D: 6479

bench: 7905850
2014-04-24 08:53:46 +02:00
Arjun Temurnikar
6579a65bbb Remove penalty for knight when few enemy pawns
Tested in standard mode at STC and no-regression
mode at LTC:

STC
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 19503 W: 3502 L: 3349 D: 12652

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 67474 W: 9974 L: 9921 D: 47579

bench: 8331217
2014-04-24 08:47:13 +02:00
Marco Costalba
a66e6e5ad9 Revert "Generalize shift_bb() to handle double pushes"
Seems to intorduce some compiler warning as
reported by Gary. Warning seems bogus, but
revert anyhow.

No functional change.
2014-04-21 20:56:12 +02:00
Marco Costalba
eced15fe36 Generalize shift_bb() to handle double pushes
And use it in evaluate_space.

No functional change.
2014-04-20 15:52:37 +02:00
Arjun Temurnikar
a4d058bca2 Small simplification to passed pawns
Tested in no-regression mode.

Passed both STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 28521 W: 5066 L: 4958 D: 18497

And LTC
LLR: 3.04 (-2.94,2.94) [-3.00,1.00]
Total: 21939 W: 3261 L: 3138 D: 15540

bench: 8165681
2014-04-20 10:06:51 +02:00
Joseph Hellis
619d66b7ab Remove supporting pawns
Tested in no-regression mode

Passed both STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 44957 W: 7984 L: 7903 D: 29070

and LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 12396 W: 1916 L: 1783 D: 8697

Bench: 7907885
2014-04-17 08:45:31 +02:00
Marco Costalba
7bce8831d3 More readable trapped rook condition
Prefer

file_of(s) < file_of(ksq)

to the inidrect

file_of(ksq) < FILE_E

To evaluate if semiopen side to check is the left side.

Also other small touches while there.

No functional change.
2014-04-13 14:29:42 +02:00
Marco Costalba
800ba28e83 Fix a typo in evaluate
Spotted by Lyudmil Antonov.

No functional change.
2014-04-12 10:17:41 +02:00
Marco Costalba
2f92e3b525 Big reshuffle in evaluate.cpp
Reshuffle functions to define them in reverse
calling order (C style).

This allow us to define templates before they are
used. Currently it is not like this, for instance
evaluate_pieces is defined after do_evaluate that
calls it. This happens to work for some strange
reason (two phase lookup?) but we want to avoid
code that works 'by magic'.

As a nice side-effect we can now remove the function
prototypes.

No functional change.
2014-04-12 08:39:18 +02:00
Gary Linscott
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
Marco Costalba
ce6b7a1b85 Further simplification in evaluate
No functional change
2014-04-11 08:38:09 +02:00
Marco Costalba
e3b54235ad Get rid of an evaluate_pieces() overload
Rewrite and greatly simplify that part of code.

No functional change.
2014-04-10 19:45:18 +02:00
Gary Linscott
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
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
Lucas Braesch
0d8a4c7565 Rescale UCI scores to PawnValueEg
This is more consistent with what other engines are doing.
Often people thinks that SF's scores are overblown. In the
end, it just boils down to the arbitrary way of rescaling them.

No functional change.
2014-04-06 11:53:28 +02:00
Lucas Braesch
be641e881f Remove QueenOn7th and QueenOnPawn
Small simplification.

Passed SPRT(-3,1) both at STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17051 W: 3132 L: 3005 D: 10914

and LTC:
LLR: 4.55 (-2.94,2.94) [-3.00,1.00]
Total: 24890 W: 3842 L: 3646 D: 17402

The rationale behind this is that I've never managed to add a
Queen on 7th rank bonus in DiscoCheck, because it never showed
to be positive (evne slightly) in testing. The only thing that
worked is Rook on 7th rank.

In terms of SF code, it seemed natural to group it with QueenOnPawn
as well as those are done together. I know you're against groupping
in general, but when it comes to non regression test, you are being
more conservative by groupping. If the group passes SPRT(-3,1) it's
safer to commit, than test every component in SPRT(-3,1) and end up
with the risk of commiting several -1 elo regression instead of just
one -1 elo regression.

In chess terms, perhaps it's just easier to manouver a Queen (which
can more also diagonaly) than a Rook. Therefore you can let the search
do its job without needing eval ad-hoc terms to guide it. For the Rook
which takes more moves to manouver such eval terms can be (marginally)
useful.

bench: 7473314
2014-04-05 11:26:44 +02:00
mstembera
3b19ea6ae5 Speed up apply_weight
Speed up by about 2% this hot path function pre-calculating
midgame and endgame values of the weight.

No functional change.
2014-04-05 11:12:18 +02:00
Stefan Geschwentner
0ba814b3ca Drop not defended by pawn condition
Passed no-regression test both at STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 96554 W: 17563 L: 17572 D: 61419

and at LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 31891 W: 4905 L: 4801 D: 22185

bench: 7720896
2014-04-01 11:59:25 +02:00
Marco Costalba
422c9c2acd Show evaluation from white POV in trace
We chose this instead of negamax sign convention
(ie. from the point of view of the side to move)
because it is more in line to how the eval
table is presented.

Also some tweak to formatting while there.

No functional change.
2014-03-30 10:45:46 +02:00
Stefan Geschwentner
af0c13ba6a Pinned pieces affect king safety
Here the new idea is to link pinned pieces
with king safety.

Passed both STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 10047 W: 1867 L: 1737 D: 6443

And LTC
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 10419 W: 1692 L: 1543 D: 7184

bench: 8325087
2014-03-29 08:37:55 +01:00
Marco Costalba
c7cf45241c Fix a bug in pawns eval tracing
Instead of totals we were showing white and
black values.

Spotted by Sven Schüle

No functional change.
2014-03-26 07:06:29 +01:00
mstembera
553ead429d Some minor cleanup stuff
I came across while browsing the code.

No functional change.
2014-03-03 08:57:20 +01:00
Marco Costalba
7bdb8c9c5c Reformat of eval tracing code
Also assorted rename while there.

No functional change.
2014-02-15 14:11:26 +01:00
renouve
45dbd9cd03 Retire grain size code
Seems useless at long TC.

Tested at 60+0.05
ELO: 2.98 +-2.2 (95%) LOS: 99.6%
Total: 30440 W: 4934 L: 4673 D: 20833

And at 120+0.05
ELO: 2.50 +-2.6 (95%) LOS: 97.1%
Total: 19633 W: 2848 L: 2707 D: 14078

bench: 8502826
2014-01-08 23:22:17 +09:00
shane31
153309e287 Scale eval when down to only one pawn
Passed both short TC
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 11921 W: 2346 L: 2208 D: 7367

And long TC
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 21002 W: 3395 L: 3197 D: 14410

bench: 7602383
2014-01-02 12:44:46 +01:00
Marco Costalba
c9dcda6ac4 Update copyright year
No functional change.
2014-01-02 01:49:18 +01:00
Gary Linscott
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
Arjun Temurnikar
71440cf77b Retire KingExposed[] array
And merge its values into KPSQT table.

Passed blazingly fast both short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 5348 W: 1091 L: 971 D: 3286

And long TC:
LLR: 2.96 (-2.94,2.94) [0.00,6.00]
Total: 3029 W: 530 L: 415 D: 2084

bench: 8702197
2013-12-31 12:05:22 +01:00
Ralph Stößer
899a2c033e Loosened trigger condition for king safety
Reduce eval discontinuity becuase now we kick in
king safety evaluation in many more cases.

Passed both short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 8708 W: 1742 L: 1613 D: 5353

And long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 6743 W: 1122 L: 990 D: 4631

bench: 6835416
2013-12-23 20:55:30 +01:00
Chris Caino
8aa4f3fde4 Increase pawn king attack weight
Tighter lower bound for pawn attacks so to
activate king safety in some cases like here:

6k1/2B3p1/2Pp1p2/2nPp3/2Q1P2K/P2n1qP1/R6P/1R6 w

Original patch by Chris, further simplified by
Jörg Oster.

Passed both short TC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 30171 W: 5887 L: 5700 D: 18584

And long TC
LLR: 2.97 (-2.94,2.94) [0.00,6.00]
Total: 20706 W: 3402 L: 3204 D: 14100

bench: 7607562
2013-12-23 20:52:12 +01:00
Gary Linscott
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
Arjun Temurnikar
431c3ac485 Even more spelling fixes
No functional change.
2013-12-06 09:03:24 +01:00
Jerry Donald
a8af78c833 Another round of spelling fixes
And also renamed a loop variable while there.

No functional change.
2013-12-02 23:51:29 +01:00
Richard Lloyd
13a73f67c0 Big assorted spelling fixes
No functional change.
2013-12-02 20:29:35 +01:00
Marco Costalba
f99cb3dc27 Rename CASTLE to CASTLING
It is call 'castling move', not 'castle move'

Noticed while reading DiscoCheck sources.

No functional change.
2013-12-01 11:16:47 +01:00
Chris Caino
091aff0445 Evaluate mobility of pinned pieces exactly
Previously some squares could be "incorrectly" awarded
to a pinned piece.

e.g. in 3k4/1q6/3b4/3Q4/8/5K2/B7/8 b - - 0 1 the black
bishop get 4 squares too many and the white queen gets 6.

Passed both short TC.
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 4871 W: 934 L: 817 D: 3120

And long TC:
LLR: 2.96 (-2.94,2.94) [0.00,6.00]
Total: 38968 W: 6113 L: 5837 D: 27018

bench: 9282549
2013-11-10 11:52:38 +01:00
Lucas Braesch
eed508b444 Futility pruning simplification
1/ eval margin and gains removed:
16bit are now free on TT entries, due to the removal of eval margin. may be useful
in the future :) gains removed: use instead by Value(128). search() and qsearch()
are now consistent in this regard.

2/ futility_margin()
linear formula instead of complex (log(depth), movecount) formula.

3/ unify pre & post futility pruning
pre futility pruning used depth < 7 plies, while post futility pruning used
depth < 4 plies. Now it's always depth < 7.

Tested with fixed number of games both at short TC:
ELO: 0.82 +-2.1 (95%) LOS: 77.3%
Total: 40000 W: 7939 L: 7845 D: 24216

And long TC
ELO: 0.59 +-2.0 (95%) LOS: 71.9%
Total: 40000 W: 6876 L: 6808 D: 26316

bench 7243575
2013-11-09 10:17:27 +01:00
Marco Costalba
343544f3f7 Revert "Retire eval margin and gains"
This reverts commit ecd07e51d0.

Patch was incorrect and partial. It will be reapplied in
the correct form.

bench: 9189063
2013-11-07 22:32:13 +01:00
Gary Linscott
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
Lucas Braesch
ecd07e51d0 Retire eval margin and gains
1/ eval margin and gains removed:
 - gains removed by Value(128): search() and qsearch() now behave consistently!

2/ futility_margin()
 - testing showed that there is no added value in this weird (log(depth), movecount)
   formula, and a much simpler linear formula is just as good. In fact, it is most
   likely better, as it is not yet optimally tuned.
 - the new simplified formula also means we get rid of FutilityMargins[], its
   initialization code, and more importantly ss->futilityMoveCount, and the hacky
   code that updates it throughout the search().
 - the current formula gives negative futility margins, and there is a hidden interaction
   between the move coutn pruning formula and the futility margin one: what happens is
   that MCP is supposed to be triggered before we use the non-sensical negative futility
   margins.

3/ unify pre & post futility pruning
 - pre futility pruning (what SF calls value based pruning) used depth < 7 plies,
   while post futility pruning (what SF calls static null move pruning) used depth < 4 plies.
 - also the condition depth < 7 in pre futility pruning was not obvious, and it seemd
   to be depth < 16 (futility_margin() returns an infinite value when depth >= 7).

Tested with fixed number of games both at short TC:
ELO: 0.82 +-2.1 (95%) LOS: 77.3%
Total: 40000 W: 7939 L: 7845 D: 24216

And long TC
ELO: 0.59 +-2.0 (95%) LOS: 71.9%
Total: 40000 W: 6876 L: 6808 D: 26316

bench: 10206576
2013-11-07 19:46:51 +01:00
Jörg Oster
f011a5af11 Penalty for Knight when enemy pawns are few
This seems more a material imbalance topic,
anyhow test is good and so patch is applied
as is.

Passed both short TC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 17391 W: 3548 L: 3393 D: 10450

And long TC:
LLR: 3.00 (-2.94,2.94) [0.00,6.00]
Total: 34660 W: 5972 L: 5700 D: 22988

bench: 8291883
2013-10-24 20:11:33 +02:00
Marco Costalba
f86d2aee29 Re-add "Further increase safe checks bonus"
After 40K games at 60 secs, result is still
not clear, but not a regression against SF 4

After
ELO: 50.11 +-2.1 (95%) LOS: 100.0%
Total: 40000 W: 10547 L: 4817 D: 24636

Before
ELO: 49.51 +-2.1 (95%) LOS: 100.0%
Total: 40000 W: 10483 L: 4821 D: 24696

So re-apply the patch to avoid to
special-case this one.

bench: 7403882
2013-10-22 17:33:11 +02:00
Marco Costalba
35ea39bed2 Restore behaviour after count<ALL_PIECES> fix
Because pos.count<ALL_PIECES>(Us) was always zero,
rewrite the formula as if this would still be
the case.

bench: 8510004
2013-10-22 17:27:58 +02:00
Marco Costalba
c08e7419a0 Fix build on Intel compiler
Due to a strange issue (bug?) the ternary
operator does not return a BitCountType for
icc, so revert to the expression.

The same patch was already applied in
9749f1f14c

Thanks to NssY Wanyonyi for pointing out
this.

No functional change.
2013-10-20 23:19:08 +02:00
Marco Costalba
67f91bc5ea Revert "Further increase safe checks bonus"
This reverts commit 4bc2374450 for
two reasons.

First regression testing shows almost equal
score:

Before the patch:
ELO: 49.75 +-2.5 (95%) LOS: 100.0%
Total: 27205 W: 7113 L: 3244 D: 16848

After the patch:
ELO: 48.87 +-2.9 (95%) LOS: 100.0%
Total: 20860 W: 5478 L: 2563 D: 12819

Second, and more sensible to me, this patch
increases safe check bonuses to 4 times their
original value (!) and considering:

- Values were already well tuned

- Values are highly critical

- King safety is highly critical, very TC
  dependent and very difficult to test

- Our testing coverage is partial (self-testing,
  blitz times)

I think is better to be safe than sorry and so
I revert the patch.

bench: 8440524
2013-10-20 10:04:43 +02:00
Ralph Stößer
4bc2374450 Further increase safe checks bonus
Passed both short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 10466 W: 2087 L: 1953 D: 6426

And long TC:
LLR: 2.96 (-2.94,2.94) [0.00,6.00]
Total: 26334 W: 4540 L: 4310 D: 17484

And also proved stronger than a slightly
different patch, also succesful against master:

https://github.com/mcostalba/Stockfish/commit/dc6830a3b4ed12

But losing against current one in a match
at 60secs with SPRT [-3, 3]:

LLR: -2.96 (-2.94,2.94) [-3.00,3.00]
Total: 44484 W: 7360 L: 7463 D: 29661

bench: 9160831
2013-10-19 12:19:36 +02:00
Marco Costalba
f5e872a0e3 Some evaluation code reshuffle
No functional change.
2013-10-18 09:49:38 -07:00
Ralph Stößer
5aeb907fa1 Double king safety weights
Good both at short TC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 5448 W: 1133 L: 1012 D: 3303

And at long TC:
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 40509 W: 6836 L: 6541 D: 27132

bench: 7700683
2013-10-14 23:24:29 +02:00
Lucas Braesch
7f142d6817 Use prefix operators wherever possible
No functional change.
2013-10-05 18:10:43 +02:00