optimized the honeycomb rules by using the 'quotient' fieldpatterns
This commit is contained in:
parent
5a83434e7a
commit
bb016585ab
|
@ -272,6 +272,8 @@ void add_candidate(cell *c) {
|
||||||
void test_canonical(string fname) {
|
void test_canonical(string fname) {
|
||||||
stop_game();
|
stop_game();
|
||||||
reg3::reg3_rule_available = false;
|
reg3::reg3_rule_available = false;
|
||||||
|
fieldpattern::use_rule_fp = true;
|
||||||
|
fieldpattern::use_quotient_fp = true;
|
||||||
start_game();
|
start_game();
|
||||||
|
|
||||||
int qc = reg3::quotient_count();
|
int qc = reg3::quotient_count();
|
||||||
|
@ -531,6 +533,12 @@ auto fqhook =
|
||||||
else if(argis("-no-rule")) {
|
else if(argis("-no-rule")) {
|
||||||
reg3::reg3_rule_available = false;
|
reg3::reg3_rule_available = false;
|
||||||
}
|
}
|
||||||
|
else if(argis("-urf")) {
|
||||||
|
cheat(); fieldpattern::use_rule_fp = true;
|
||||||
|
}
|
||||||
|
else if(argis("-uqf")) {
|
||||||
|
cheat(); fieldpattern::use_quotient_fp = true;
|
||||||
|
}
|
||||||
else if(argis("-gen-rule")) {
|
else if(argis("-gen-rule")) {
|
||||||
shift(); test_canonical(args());
|
shift(); test_canonical(args());
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
reg3.cpp
1
reg3.cpp
|
@ -949,6 +949,7 @@ EX namespace reg3 {
|
||||||
buf.resize(qty);
|
buf.resize(qty);
|
||||||
|
|
||||||
shstream ins(decompress_string(buf));
|
shstream ins(decompress_string(buf));
|
||||||
|
dynamicval<bool> q(fieldpattern::use_quotient_fp, true);
|
||||||
hread_fpattern(ins, fp);
|
hread_fpattern(ins, fp);
|
||||||
|
|
||||||
hread(ins, root);
|
hread(ins, root);
|
||||||
|
|
Loading…
Reference in New Issue