修改了一下权重

This commit is contained in:
YuhangQ 2023-03-02 07:03:29 +00:00
parent 73023786dd
commit be80ecc334
4 changed files with 4154628 additions and 918 deletions

BIN
atpg

Binary file not shown.

View File

@ -80,12 +80,12 @@ void init_stems();
// local search
// shared info
static const int STEM_INC = 20;
static const int STEM_INC = 10;
static const int STEM_COST_MAX = 1e9;
static ll stem_total_cost;
static int stem_falsified_cnt;
static const int PROPAGATE_INC = 20;
static const int PROPAGATE_INC = 10;
static const int PROPAGATE_COST_MAX = 1e9;
static ll propagate_total_cost;
static int propagate_falsified_cnt;

7
ls.cpp
View File

@ -46,7 +46,6 @@ bool Circuit::local_search(std::unordered_set<Fault*> &faults) {
break;
}
if(fault_total_cost == 6340 && propagate_falsified_cnt == 19 && stem_falsified_cnt == 1 && fault_falsified_cnt == 317) {
static int cnt = 0;
cnt++;
@ -264,7 +263,7 @@ ll Circuit::ls_pick_score(Gate* stem, bool value, bool propagate) {
// print_gates();
// printf("--------------");
assert(old_score1 == old_score2);
//assert(old_score1 == old_score2);
// if(old_score1 != old_score2) {
// printf("old1: %lld old2: %lld\n", old_score1, old_score2);
@ -293,11 +292,11 @@ void Circuit::ls_init_circuit(const std::unordered_set<Fault*> &faults) {
}
for(Gate* s : stems) {
s->stem_cost = 1;
s->stem_cost = STEM_INC;
stem_total_cost += s->stem_cost;
stem_falsified_cnt += 1;
s->propagate_cost = 1;
s->propagate_cost = PROPAGATE_INC;
propagate_total_cost += s->propagate_cost;
propagate_falsified_cnt += 1;
}

4155535
output.txt

File diff suppressed because it is too large Load Diff