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

3176 commits

Author SHA1 Message Date
Marco Costalba
a89b26bedd Correctly apply previous patch
Apply the correct values from previous patch.

bench: 8082049
2014-04-24 08:35:13 +02:00
joergoster
8bfb53efe2 Move queen vs. 3 minors rule to imbalance tables
Tuned with CLOP after 57k games.

Simplification: tested in no-regression mode.

Passed both STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17254 W: 3159 L: 3032 D: 11063

And LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 32413 W: 4967 L: 4864 D: 22582

bench: 8082049
2014-04-23 08:51:34 +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
56273fca1e Reset DrawValue[] before new search
Spotted by Ronald de Man

bench: 7384368
2014-04-21 14:30:27 +02:00
Leonid Pechenik
ef43e6b05d Rise contempt when in advantage
This is a very discussed patch with many
argumentations pro and against. The fact is
it passed both STC:

LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 16305 W: 3001 L: 2855 D: 10449

And LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 34273 W: 5180 L: 4931 D: 24162

Although it is true that a correct test should
include foreign engines, we commit it anyhow so
people can test it out in the wild, under broader
conditions.

bench: 7384368
2014-04-21 12:23:03 +02:00
Marco Costalba
223ebe7b40 Streamline implementation of Position::pretty()
Simpler and more in line with Bitboards::pretty()

No functional change.
2014-04-21 11:47:01 +02:00
Stefan Geschwentner
0e8ad40ef0 Raise penalty blocked enemy pawn on 6th rank
Idea from Lyudmil Tsvetkov.

The value seems to be raised a bit abruptly, but as
Gary said, a blocked pawn on the sixth rank has been
instrumental in limiting king mobility in multiple
losses that I've seen from SF. A blocked pawn on fifth
rank is much less serious on the king safety impact.

Passed both STC
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 14551 W: 2750 L: 2607 D: 9194

and LTC
LLR: 2.96 (-2.94,2.94) [0.00,6.00]
Total: 43595 W: 6917 L: 6618 D: 30060

And even a retest at 60" fixed games 40K
ELO: 1.79 +-1.9 (95%) LOS: 97.0%
Total: 39889 W: 6018 L: 5813 D: 28058

bench: 7154916
2014-04-21 07:47:50 +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
Jean-Francois Romang
9073866491 Enable BMI1 too when using BMI2 ARCH
Adding BMI1 allows the compiler to use _blsr_u64
automatically (the advertised 0.3% speed gain).
I verified that the compiler does not use this
instruction with the -mbmi2 flag only. Also, all
processors supporting BMI2 is also supporting BMI1.

No functional change
2014-04-14 07:54:24 +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
Daylen Yang
81a8c1118b Simplify Makefile by removing OS X targets
Right now the Makefile is cluttered with OS X equivalents
of all the x86 targets. We can get rid of all of them and
just check UNAME against "Darwin" for the few OS X-specific
things we need to do.

We also disable Clang LTO when using BMI2 instructions. For
some reason, LLVM cannot find the PEXT instruction when using
LTO. I don't know why, but disabling LTO for BMI2 fixes it.

No functional change.
2014-04-13 09:05:21 +02:00
Marco Costalba
b2c0634d48 Move args parsing to UCI::loop
This leaves a very clean main.cpp

No functional change.
2014-04-12 13:51:52 +02:00
Marco Costalba
ada55c5d0a Reshuffle in uci.cpp
Move function definitions before call site.

No functional change.
2014-04-12 12:05:25 +02:00
Marco Costalba
17cb7e7fa3 Reshuffle in timeman.cpp
Move template definitions before call site.

No functional change.
2014-04-12 12:00:37 +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
0b2794ae12 Retire signature-build
Does not seem used.

No functional change.
2014-04-12 09:18:55 +02:00
Jean-Francois Romang
226bbc1e63 Add ARCH x86-64-bmi2 support
Intel Haswell and newer CPUs can calculate sliders
attacks using special PEXT asm instructions instead
of magic bitboards. This gives a +3% speed up.

To enable it just compile with ARCH=x86-64-bmi2

No functional change.
2014-04-12 09:15:14 +02:00
Marco Costalba
da2f8880b9 Switch to hardware PEXT
Retire software pext and introduce hardware
call when USE_PEXT is defined during compilation.

This is a full complete implementation of sliding
attacks using PEXT.

No functional change.
2014-04-12 08:55:30 +02:00
Marco Costalba
c556fe1d71 Implement PEXT based attacks
According to:

https://chessprogramming.wikispaces.com/BMI2#PEXTBitboards

No functional change.
2014-04-12 08:55:30 +02:00
Marco Costalba
2bfe61c33b Add PEXT software implementation
For development/debug purposes.

No functional change.
2014-04-12 08:55:30 +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
Gary Linscott
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
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
Marco Costalba
64d29a6330 Sync some common names
No functional change.
2014-04-06 11:26:12 +02:00
Marco Costalba
fcf2a34080 Some more work in pretty_pv
No functional change.
2014-04-06 10:15:11 +02:00
Marco Costalba
698b645e10 Small tidy up in move_to_san
No functional change.
2014-04-05 19:05:37 +02:00
mstembera
d28ea7b518 Smaller and faster profile-build binaries
I have noticed that increasing the bench depth produces
progressively smaller and slightly faster executables at
the cost of longer compile times.  Also using bench "time"
instead of "depth" seems to produce slightly smaller/faster
executables  given comparable compile times.

I have made a new Makefile that generates smaller and
about 1% to 2% faster profile executables at only a
little extra compile time.  On  my mobile 2GHz i7 a
full profile build time goes from 3'48" to 4'13" and
the exe goes down by 5% from 416,310 bytes to 395,567
bytes.

No functional change.
2014-04-05 12:48:20 +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
Marco Costalba
ccf59b0228 Update Readme to 128 max threads
No functional change.
2014-04-03 11:33:42 +02:00
Joerg Oster
299afcd886 Queen vs. 3 pieces imbalance
Passed both STC
LLR: 7.32 (-2.94,2.94) [-1.50,4.50]
Total: 98108 W: 18087 L: 17576 D: 62445

And LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 15082 W: 2417 L: 2248 D: 10417

bench: 7717336
2014-04-03 10:42:06 +02:00
Marco Costalba
c15b132f03 Make operator<< to return void
This should help preventing misuse.

No functional change.
2014-04-03 10:34:25 +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
d2caba1f66 Do not workaround function argument evaluation
Rewrite options initialization to do not trying to
hack upon the undefined evaluation order of function
arguments.

No functional change.
2014-04-01 09:39:41 +02:00
Marco Costalba
1efc19ade0 Fix a compile error with Intel C++
Error: a value of type "int" cannot be assigned
to an entity of type "Value"

No functional change.
2014-03-30 14:20:12 +02:00
Marco Costalba
678425f274 Fix a warning with MSVC 2010
Warning C4804: '<' : unsafe use of type 'bool' in operation

No functional change.
2014-03-30 14:25:57 +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
Marco Costalba
9350d0dce5 Raise VALUE_INFINITE
In some legal positions like this one:
R6R/3Q4/1Q4Q1/4Q3/2Q4Q/Q4Q2/Np1Q4/kB1N1KB1  b -- 0 1

We can have a very high score, in this case 30177 and 29267
for midgame and endgame respectively, and because
VALUE_INFINITE = 30001 we have an assert in interpolate()

Midgame and endgame scores are stored in 16 bit signed integers
so we can rise VALUE_INFINITE a little bit. This does not fix
the possibility of overflow in general case, just makes the
condition more difficult to trigger and anyhow better uses all
the score width.

Raising VALUE_INFINITE to 32000 seems to fix the problem for this
particular case.

No functional change.
2014-03-29 11:13:42 +01:00
Jean-Francois Romang
4833887842 Further simplification of TT replace strategy
No functional change
2014-03-29 10:05:02 +01:00
Marco Costalba
f811a5693e Restore old aspiration window to 16
Tested directly at LTC because previous long
test series on this topic shows it is TC dependant.

Tested with no-regression mode because gets rid of
an ugly and ad-hoc rule.

Test at LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 67918 W: 10590 L: 10541 D: 46787

bench: 7926803
2014-03-29 08:45:40 +01: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
Marco Costalba
865b71309c Simplify TT replace strategy
Tested for no-regression with SPRT[-3, 1] at STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 32046 W: 6020 L: 5918 D: 20108

No functional change.
2014-03-24 08:32:08 +01:00