Browse Source

update: type id size

legacy
Dnomd343 2 years ago
parent
commit
e2f9809319
  1. 11
      src/klotski_core/ffi/tmain.cc
  2. 43
      src/klotski_core/group/type_id.h

11
src/klotski_core/ffi/tmain.cc

@ -33,17 +33,16 @@ using klotski::TYPE_ID_LIMIT;
void tmain() {
// printf("tmain start\n");
std::vector<uint32_t> max_group_size;
max_group_size.reserve(TYPE_ID_LIMIT);
std::vector<uint32_t> type_id_size;
type_id_size.reserve(TYPE_ID_LIMIT);
for (uint32_t type_id = 0; type_id < TYPE_ID_LIMIT; ++type_id) {
// std::cout << Group::build_groups(type_id)[0].size() << std::endl;
max_group_size.emplace_back(Group::build_groups(type_id)[0].size());
type_id_size.emplace_back(Group::all_cases(type_id).size());
std::cerr << type_id << std::endl;
}
for (uint32_t i = 0; i < max_group_size.size(); ++i) {
for (uint32_t i = 0; i < type_id_size.size(); ++i) {
printf("%6d, ", max_group_size[i]);
printf("%6d, ", type_id_size[i]);
if (i % 12 == 11) {
printf("\n");
}

43
src/klotski_core/group/type_id.h

@ -19,32 +19,23 @@ const uint16_t TYPE_ID_INDEX[203] = {
};
const uint32_t TYPE_ID_SIZE[203] = {
12, 192, 1440, 6720, 21840, 52416, 96096, 137280,
154440, 137280, 96096, 52416, 21840, 6720, 1440, 124,
1736, 11284, 45136, 124124, 248248, 372372, 425568, 372372,
248248, 124124, 45136, 11284, 132, 1848, 12012, 48048,
132132, 264264, 396396, 453024, 396396, 264264, 132132, 48048,
12012, 512, 6144, 33792, 112640, 253440, 405504, 473088,
405504, 253440, 112640, 33792, 1044, 12528, 68904, 229680,
516780, 826848, 964656, 826848, 516780, 229680, 68904, 582,
6984, 38412, 128040, 288090, 460944, 537768, 460944, 288090,
128040, 38412, 1092, 10920, 49140, 131040, 229320, 275184,
229320, 131040, 49140, 3180, 31800, 143100, 381600, 667800,
801360, 667800, 381600, 143100, 3382, 33820, 152190, 405840,
710220, 852264, 710220, 405840, 152190, 1320, 13200, 59400,
158400, 277200, 332640, 277200, 158400, 59400, 1320, 10560,
36960, 73920, 92400, 73920, 36960, 4680, 37440, 131040,
262080, 327600, 262080, 131040, 7248, 57984, 202944, 405888,
507360, 405888, 202944, 5344, 42752, 149632, 299264, 374080,
299264, 149632, 1632, 13056, 45696, 91392, 114240, 91392,
45696, 948, 5688, 14220, 18960, 14220, 3444, 20664,
51660, 68880, 51660, 7120, 42720, 106800, 142400, 106800,
7284, 43704, 109260, 145680, 109260, 4392, 26352, 65880,
87840, 65880, 1044, 6264, 15660, 20880, 15660, 396,
1584, 2376, 1260, 5040, 7560, 3084, 12336, 18504,
4288, 17152, 25728, 3196, 12784, 19176, 1836, 7344,
11016, 270, 1080, 1620, 88, 180, 626, 772,
1036, 464, 342,
12, 192, 1440, 6720, 21840, 52416, 96096, 137280, 154440, 137280, 96096, 52416,
21840, 6720, 1440, 124, 1736, 11284, 45136, 124124, 248248, 372372, 425568, 372372,
248248, 124124, 45136, 11284, 132, 1848, 12012, 48048, 132132, 264264, 396396, 453024,
396396, 264264, 132132, 48048, 12012, 512, 6144, 33792, 112640, 253440, 405504, 473088,
405504, 253440, 112640, 33792, 1044, 12528, 68904, 229680, 516780, 826848, 964656, 826848,
516780, 229680, 68904, 582, 6984, 38412, 128040, 288090, 460944, 537768, 460944, 288090,
128040, 38412, 1092, 10920, 49140, 131040, 229320, 275184, 229320, 131040, 49140, 3180,
31800, 143100, 381600, 667800, 801360, 667800, 381600, 143100, 3382, 33820, 152190, 405840,
710220, 852264, 710220, 405840, 152190, 1320, 13200, 59400, 158400, 277200, 332640, 277200,
158400, 59400, 1320, 10560, 36960, 73920, 92400, 73920, 36960, 4680, 37440, 131040,
262080, 327600, 262080, 131040, 7248, 57984, 202944, 405888, 507360, 405888, 202944, 5344,
42752, 149632, 299264, 374080, 299264, 149632, 1632, 13056, 45696, 91392, 114240, 91392,
45696, 948, 5688, 14220, 18960, 14220, 3444, 20664, 51660, 68880, 51660, 7120,
42720, 106800, 142400, 106800, 7284, 43704, 109260, 145680, 109260, 4392, 26352, 65880,
87840, 65880, 1044, 6264, 15660, 20880, 15660, 396, 1584, 2376, 1260, 5040,
7560, 3084, 12336, 18504, 4288, 17152, 25728, 3196, 12784, 19176, 1836, 7344,
11016, 270, 1080, 1620, 88, 180, 626, 772, 1036, 464, 342,
};
const uint32_t TYPE_ID_MAX_GROUP_SIZE[203] = {

Loading…
Cancel
Save