Notation: au(b,pv) is the antagonistic update of a progress measure b with priority pv. pm(w) is the current progress measure of w and pr(v) is the priority of v.
If I understood the paper by Fearnley et al. then au(b, pv) is monotonic in b. It should follow that max{au(pm(w), pr(v)) | (v,w) in E} is equal to au(max{pm(w) | (v,w) in E}, pr(v)). The same for min. Applying this to the lift function in qpt.cpp should allow to reduce the number of expensive calls to au:
|
for (int to : out[v]) { |
|
if (disabled[to]) continue; |
|
au(tmp, pm_nodes + k*to, pr, k, max, maxo, pl); |
|
if (pm_val(tmp, k, pl) > goal) tmp[0] = max; // goal reached, lift to Top |
|
#ifndef NDEBUG |
|
if (trace >= 2) { |
|
logger << "to successor " << label_vertex(to) << ":"; |
|
pm_stream(logger, tmp, k); |
|
logger << std::endl; |
|
} |
|
#endif |
|
if (first) { |
|
first = false; |
|
for (int i=0; i<k; i++) res[i] = tmp[i]; |
|
strategy[v] = to; |
|
} else if (owner[v] == pl) { |
|
// we want the max |
|
if (pm_less(res, tmp, k, pl)) { |
|
for (int i=0; i<k; i++) res[i] = tmp[i]; |
|
strategy[v] = to; |
|
} |
|
} else { |
|
// we want the min |
|
if (pm_less(tmp, res, k, pl)) { |
|
for (int i=0; i<k; i++) res[i] = tmp[i]; |
|
strategy[v] = to; |
|
} |
|
} |
|
} |
Notation:
au(b,pv)is the antagonistic update of a progress measurebwith prioritypv.pm(w)is the current progress measure ofwandpr(v)is the priority ofv.If I understood the paper by Fearnley et al. then
au(b, pv)is monotonic inb. It should follow thatmax{au(pm(w), pr(v)) | (v,w) in E}is equal toau(max{pm(w) | (v,w) in E}, pr(v)). The same formin. Applying this to theliftfunction in qpt.cpp should allow to reduce the number of expensive calls toau:oink/src/qpt.cpp
Lines 272 to 300 in 2d12471