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

VL scaling support for Simulation #1961

Conversation

WHY-HAVE-YOU-SUMMONED-ME

This PR introduces a setting that allowed adding multiple VLs per Simulation flag based on the amount of advantage.
Some changes were made in PunishmentManager to support this.

@SamB440 SamB440 added the status: review required The pull request is awaiting review label Jan 23, 2025
@GigaZelensky
Copy link
Contributor

Violations seem not to be removed anymore when setting "remove-violations-after:" in the punishments.yml config. Could be something i messed up.

Comment on lines 183 to 191
private int getViolations(PunishGroup group, Check check) {
int vl = 0;
for (Check value : group.violations.values()) {
if (value == check) vl++;
if (value == check) {
vl = Math.max(vl, (int)Math.ceil(value.getViolations()));
}
}
return vl;
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Violation entries added to PunishGroup.violations via handleViolation() are still getting deleted correctly, but the VL count returned by getViolations() no longer correspond directly to the amount of key-value pairs with the same value (check) as the supplied parameter, but is instead taken from Check.getViolations(), which would only decrease upon a Check.reward() call.
To fix this issue, there needs to be some sort of way to keep track of the VL gain from individual violations.

@WHY-HAVE-YOU-SUMMONED-ME
Copy link
Author

I would consider this PR not important enough to be merged upstream.
On top of that, the issue it currently suffer from cannot be fixed without large refactors to the codebase.

@WHY-HAVE-YOU-SUMMONED-ME WHY-HAVE-YOU-SUMMONED-ME deleted the multiple-vls-per-flag branch February 23, 2025 14:07
@WHY-HAVE-YOU-SUMMONED-ME WHY-HAVE-YOU-SUMMONED-ME restored the multiple-vls-per-flag branch February 23, 2025 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: review required The pull request is awaiting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants