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

3968 commits

Author SHA1 Message Date
Leonid Pechenik
71bfbb22fc More detailed dependence of time allocation on the magnitude of score change
10+0.1:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 5657 W: 1130 L: 979 D: 3548

60+0.6:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 36884 W: 5002 L: 4762 D: 27120

bench: 8428997
2016-05-20 19:44:50 +02:00
loco-loco
7cb8cbb403 Assorted pruning tweaks
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 38257 W: 5206 L: 4961 D: 28090

STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16550 W: 3110 L: 2914 D: 10526

Bench: 8428997
2016-05-20 19:34:49 +02:00
Marco Costalba
6eb670ad37 Integrate ENPASSANT in the search 2016-05-20 19:01:48 +02:00
Marco Costalba
9a0f8b38c3 BENCH CHANGE! Switch to new loop cycle
Bench change is due to different move
generation order. But functionality
remains the same.
2016-05-19 19:11:38 +02:00
Marco Costalba
8634305cb9 Test new loop cycle in probe_ab()
Currently we return as soon as we reach
beta. This makes the bench signature to
depend on the move order in case we have
more than one possible capture and only
one of them reach beta then the nodes
searched are different in case we first
test one capture or the other.

Verify that the best value found by the
two move llops are the same. This check
will allow to remove old loop, replaced
by new one.
2016-05-19 18:56:25 +02:00
Marco Costalba
7dc41c7929 Document probe_ab() 2016-05-19 11:41:30 +02:00
Marco Costalba
b465f2b44a Don't init second WDLEntry when symmetric 2016-05-18 22:20:43 +02:00
Marco Costalba
66456590d7 More stuff 2016-05-18 07:20:45 +02:00
Marco Costalba
6233830b9b Assorted small stuff 2016-05-17 22:21:44 +02:00
Marco Costalba
8bedb19690 Sync with master
Verified against master with 4-men and
partially 5-men tables.
2016-05-17 13:56:51 +02:00
Marco Costalba
99458025ba Fix sorting of leading pawns
Currently we sort leading pawns before
to flip. This is ok becuase MapPawns[] is
(almost) flip invariant apart for the case
of two symmetric non-leading pawns like the
case of d2, e2, h2.

After MapPawns[] sorting we have  h2, d2, e2
with values 46, 11, 10. Then we flip because
leading pawns is in h2 -> a2,e2,d2 with values
46,10,11. So this is not sorted anymore.

The fix is to sort after flipping. And instead
of forst sorting just pick the leading pawn
directly.
2016-05-17 12:40:55 +02:00
Marco Costalba
28d497e00c Some more additional doc on encoding 2016-05-16 23:21:57 +02:00
Marco Costalba
f5ac865866 Init MapToEdges[] with other tables
And simplify LeadPawnIdx[] usage.
2016-05-16 18:21:15 +02:00
Marco Costalba
1cbaaaef68 Document Pawnidx[] and Pfactor[] 2016-05-16 10:08:11 +02:00
Marco Costalba
306561431b Clarify why blockLengthSize > blocksNum
Ronald de Man says:

This difference has to do with the fact that the "sparse index"
does not point to "k * d->span", but to "k * d->span + d->span / 2".

Since k = idx / d->span, we know that k * d->span <= idx,
so k * d->span is a valid index into the table.
But k * d->span + d->span / 2 might be a value that is bigger than
the largest index for the table (if "idx" happens to be near the
end of the table).

So the last valid entry in the SparseIndex[] array might have
to a point to a block and (sub)index that is not part of the
real table but comes "after" it. To make this work, the generator
adds entries for a few "fake" blocks, each of maximum size 65536,
to the blockLength[] array so that there is something to point to
for the last valid entry in the SparseIndex[] array.

These fake blocks do not correspond to any compressed data.

So the fake blocks avoid the need to detect and handle this special
case in decompress_pairs().
2016-05-15 18:18:09 +02:00
Marco Costalba
7448fce808 Simplify Pawnidx[] init code
But still not clear what we have here...
2016-05-15 14:46:38 +02:00
Marco Costalba
e435f85b02 Document (and refactor) norms and factors 2016-05-15 10:20:45 +02:00
mstembera
0784bd542b Fix a multiPV bug in lazy SMP
Where the helper threads were not doing multiPV at all.

Regression tested sprt @ 5+0.05 th 7

LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 73918 W: 11891 L: 11853 D: 50174

bench: 8716243
2016-05-14 21:34:55 +02:00
Marco Costalba
e16d269622 Fix a typo that leads to a crash
Oddly nough the crash appear only under Windows,
not under Linux.
2016-05-14 21:01:54 +02:00
Marco Costalba
c2d9cdcaff Relicense under GPL
With original author acknowledgment:
http://www.talkchess.com/forum/viewtopic.php?t=59947&postdays=0&postorder=asc&topic_view=flat&start=30
2016-05-14 17:50:31 +02:00
Marco Costalba
57c229a7a2 Small tweak to decode loop 2016-05-14 14:50:10 +02:00
Marco Costalba
7dd8fd77b2 Set a specific type for a symbol
And other assorted small stuff and docs
2016-05-14 14:32:46 +02:00
Marco Costalba
1a88103633 Streamline calc_symlen() 2016-05-14 12:22:50 +02:00
Marco Costalba
976581339f Document sympat
Assorted renaming and reformat while there.

Hopefully it is more clear now!
2016-05-14 11:56:25 +02:00
Marco Costalba
a6ede54d59 Document Huffman decode 2016-05-14 10:46:30 +02:00
Marco Costalba
04f94b1538 Get rid of idxbits
Use indexSpan instead. This could be a teoretical
slwo down becuae we repalce some shifts by divide
and modulo, but this should not be measurable and
instead the code is more understandable now. This
is a big plus becuase this part of code is complex.
2016-05-14 08:20:20 +02:00
Marco Costalba
c0476e12db Start documenting decompress_pairs
Documenta and rename this difficult part
of the code. Still lot to do.
2016-05-14 08:08:28 +02:00
Marco Costalba
61a27cdadd Move set_map out of structs
To be aligned to other helper functions. Also
better document where DTZEntry is needed.
2016-05-13 18:40:58 +02:00
Marco Costalba
ee5aac2abc Always compute hasUniquePieces
Now that is part of the common fields, it
is natural always setthis memeber, even if
for pawns is not used.
2016-05-13 14:35:32 +02:00
Marco Costalba
018d907d74 Further merge enty init
And use references instead of pointers
2016-05-13 14:24:30 +02:00
Marco Costalba
9acb2b4b61 Merge Entry init functions 2016-05-13 13:31:12 +02:00
Stéphane Nicolet
16c603ce9b Double pawn simplification
Try doubled pawn simplification, with psq
table compensation.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 36094 W: 6558 L: 6463 D: 23073

LTC:
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 102352 W: 13417 L: 13404 D: 75531

Bench: 8716243
2016-05-13 13:01:59 +02:00
Marco Costalba
a357b70f6a Move hasUniquePieces to common fields
This allow to greatly simplify the code
and remove some SFINAE trick that now
is no more needed.
2016-05-11 00:14:47 +02:00
Marco Costalba
b13dd6c333 Retire 'symmetric'
And make explicit that WDLEntry and the corresponding
DTZEntry have the same principal key.
2016-05-10 18:56:42 +02:00
loco-loco
969982406c Merge good and bad quiets
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 58613 W: 10779 L: 10723 D: 37111

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 33608 W: 4539 L: 4436 D: 24633

Bench: 9441294
2016-05-10 18:15:16 +02:00
Marco Costalba
72bb4695d1 Fix an issue with pawn ordering
A subtle one because at leat 3 leading pawns
are needed to uncover this bug.

Found by stuwph
2016-05-10 17:52:15 +02:00
Marco Costalba
2681419141 Assorted small stuff 2016-05-09 16:12:53 +02:00
Marco Costalba
56d1bef249 Don't need to order pawns a second time 2016-05-09 10:58:56 +02:00
Marco Costalba
12c3e394e7 Retire Flap[] table
Just use the equivalent Ptwist[], renamed in
MapToEdges[] to indicate that gives highest
score to pawns near the edge and then, as
second order, to bottom rank squares.
2016-05-09 08:48:30 +02:00
Marco Costalba
410fa6c74a Compute also remaining tables 2016-05-08 21:31:43 +02:00
Marco Costalba
e01cdac536 Workaround broken MSVC zero-init 2016-05-08 19:07:29 +02:00
Marco Costalba
695eb4222a Fix a compile error with MSVC 2013 2016-05-08 17:52:51 +02:00
Marco Costalba
7a01beb441 Fix a warning with MSVC 2015 2016-05-08 17:39:59 +02:00
Marco Costalba
8d2eb34944 Fix DTZTable key check
We currently check onnly first key, while
we shoudl check both, as confirmed by
author on talkchess:

http://www.talkchess.com/forum/viewtopic.php?t=59947&start=30

This bug fix do not change functionality, we simply
find earlier the DTZ entry instead of reload it.
2016-05-08 15:03:13 +02:00
Marco Costalba
8baa476390 Compute also MapB1H1H7[] and MapA1D1D4[] 2016-05-08 14:49:05 +02:00
Marco Costalba
6f11b0438d Compute KK_idx[] at init time 2016-05-08 14:13:22 +02:00
Marco Costalba
f68df60fe5 Correctly handle shared 'ready' flag
Avoid ' double-checked locking' issue.
2016-05-08 12:51:01 +02:00
Marco Costalba
79051949ca Better clarify DTZEntry keys
Calrify that DTZ entry is initialized with
the same color of the corresponding WDL
entry.
2016-05-08 12:28:50 +02:00
Marco Costalba
875441db2b Use natural types for structs
Aslo changed PairsData::factor to uint64_t to
be aligned with recent fix 16019f47c8
2016-05-08 11:35:12 +02:00
Marco Costalba
9c35466295 Better document encoding 2016-05-08 10:03:53 +02:00