diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-05 23:01:10 +0200 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2024-10-05 23:01:10 +0200 |
| commit | ce2d2d1339b2e0f8f7bb4c5392acf4fbf4e00f03 (patch) | |
| tree | cf50236534e51e645aab384e04e434cdb63668a8 /src/solvers | |
| parent | 1272e304b6367c7dd94d25acf88b2843adabb93a (diff) | |
| parent | a581a8494e15d0abfb5ddb5acef75a1d7941bd69 (diff) | |
| download | nissy-core-ce2d2d1339b2e0f8f7bb4c5392acf4fbf4e00f03.tar.gz nissy-core-ce2d2d1339b2e0f8f7bb4c5392acf4fbf4e00f03.zip | |
Merge branch 'master' of tronto.net:h48
Diffstat (limited to 'src/solvers')
| -rw-r--r-- | src/solvers/h48/gendata_h48.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/solvers/h48/gendata_h48.h b/src/solvers/h48/gendata_h48.h index 17c594f..391c97b 100644 --- a/src/solvers/h48/gendata_h48.h +++ b/src/solvers/h48/gendata_h48.h | |||
| @@ -277,6 +277,37 @@ gendata_h48k2(gendata_h48_arg_t *arg) | |||
| 277 | static const uint8_t shortdepth = 8; | 277 | static const uint8_t shortdepth = 8; |
| 278 | static const uint64_t capacity = 10000019; | 278 | static const uint64_t capacity = 10000019; |
| 279 | static const uint64_t randomizer = 10000079; | 279 | static const uint64_t randomizer = 10000079; |
| 280 | |||
| 281 | /* | ||
| 282 | * A good base value for the k=2 tables have few positions with value | ||
| 283 | * 0, because those are treated as lower bound 0 and require a second | ||
| 284 | * lookup in another table, and at the same time not too many positions | ||
| 285 | * with value 3, because some of those are under-estimates. | ||
| 286 | * | ||
| 287 | * The following values for the base have been hand-picked. I first | ||
| 288 | * performed some statistics on the frequency of these values, but | ||
| 289 | * they turned out to be unreliable. I have not figured out why yet. | ||
| 290 | * In the end I resorted to generating the same table with multiple | ||
| 291 | * base value and see what was best. | ||
| 292 | * | ||
| 293 | * A curious case is h3, which has this distribution for base 8: | ||
| 294 | * [0] = 6686828 | ||
| 295 | * [1] = 63867852 | ||
| 296 | * [2] = 392789689 | ||
| 297 | * [3] = 477195231 | ||
| 298 | * | ||
| 299 | * and this for base 9: | ||
| 300 | * [0] = 70554680 | ||
| 301 | * [1] = 392789689 | ||
| 302 | * [2] = 462294676 | ||
| 303 | * [3] = 14900555 | ||
| 304 | * | ||
| 305 | * I ended up picking base 8 to have a much lower count of elements | ||
| 306 | * with value 0, at the cost of a less precise estimate for the higher | ||
| 307 | * values. But I am not 100% confident this is the optimal choice, | ||
| 308 | * so I'll leave it here for future considerations. | ||
| 309 | */ | ||
| 310 | |||
| 280 | static const uint8_t base[] = { | 311 | static const uint8_t base[] = { |
| 281 | [0] = 8, | 312 | [0] = 8, |
| 282 | [1] = 8, | 313 | [1] = 8, |
