N-Wouda/ALNS

Rename RandomWalk and WorseAccept?

leonlan opened this issue · 2 comments

Is your feature request related to a problem? Please describe

The names of the RandomWalk and WorseAccept acceptance criteria are somewhat confusing.

  • RandomWalk always accepts a solution, i.e., the "random walk" is with respect to the LNS search trajectory. But to me the "random" in RandomWalk implies that there is some acceptance probability.
  • WorseAccept always accepts better solutions and randomly accepts worse solutions with probability $p$, but the name does not imply any of this randomness. The name emphasizes too much the "worse," aspect, but pretty much all acceptance criteria share this in common to accept worse solutions.

Describe the solution you'd like

  • Rename RandomWalk to AlwaysAccept.
  • Rename WorseAccept to RandomAccept.
  • We do not change the behavior of these criteria.

This change is not backward compatible and requires a major version release. We could, however, add AlwaysAccept and RandomAccept in a minor release and issue a deprecation warning for RandomWalk and WorseAccept.

Describe alternatives you have considered

Keeping the names as-is. It's not that big of a problem that's worth a backward incompatible change.

Additional context

Historical note: the names originate from Santini et al. (2018). I don't think we have to adhere to these names.

Can I hijack this discussion to also propose renaming AdaptiveThreshold to something less.. vague?

Can I hijack this discussion to also propose renaming AdaptiveThreshold to something less.. vague?

Yea agreed. It shares some characteristics with late acceptance hill climbing. Some relevant keywords may be history, lookback, average, ...

MovingAverage, RollingAverage, …


I like MovingAverageThreshold.