Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename termination criterions such that it is obvious when they terminate #161

Closed
Saethox opened this issue Apr 1, 2023 · 3 comments · Fixed by #178
Closed

Rename termination criterions such that it is obvious when they terminate #161

Saethox opened this issue Apr 1, 2023 · 3 comments · Fixed by #178
Assignees
Labels
enhancement New feature or request

Comments

@Saethox
Copy link
Collaborator

Saethox commented Apr 1, 2023

For example, the combined termination criterion

.while_(termination::FixedIterations::new(500) & termination::DistanceToOpt::new(0.01), ...),

could be read as "terminate when 500 iterations are reached and the best objective value found is within 0.01 of the optimum", which would mean the algorithm doesn't terminate until both conditions are true.

What this actually means is that the algorithm terminates when either 500 iterations are reached or the distance to the optimum is less than 0.01.

We should remove the implicit negation in termination criterions so it is readable in a while expression, for example IterationsBelow and DistanceToOptAbove instead FixedIterations and DistanceToOpt:

.while_(termination::IterationsBelow::new(500) & termination::DistanceToOptAbove::new(0.01), ...),
@Saethox Saethox added the enhancement New feature or request label Apr 1, 2023
@luleyleo
Copy link
Collaborator

luleyleo commented Apr 1, 2023

I was also thinking about this, and maybe it would be best to abolish the concept of "termination" and just make them normal conditions. The "termination" terminology is really just a relic of the first versions of MAHF and I don't think it makes sense anymore.

@HeleNoir
Copy link
Collaborator

HeleNoir commented Apr 2, 2023

I would be okay with that. We can omit the "termination" term and just use a condition.

@Saethox
Copy link
Collaborator Author

Saethox commented Apr 2, 2023

Well, FixedIterations and such are already simply Conditions, it's just that their name is not really clear. The only thing that makes them "termination criterions" is that they are located in the conditions::termination module, and that's fine I think because termination is an important concept here.

Or what exactly did you think of, @luleyleo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants