Skip to content

Filter and weight game constraint templates#23

Open
eiron wants to merge 2 commits intosilasary:keymasters_keepfrom
eiron:kk-weightedconstraints
Open

Filter and weight game constraint templates#23
eiron wants to merge 2 commits intosilasary:keymasters_keepfrom
eiron:kk-weightedconstraints

Conversation

@eiron
Copy link

@eiron eiron commented Feb 28, 2026

Allow for weighted constraints, and also to filter constraints that would make the game time-consuming or difficult.

Allow for weighted constraints, and also to filter constraints that would make the game time-consuming or difficult.
Copilot AI review requested due to automatic review settings February 28, 2026 01:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for filtering and weighting optional game constraint templates so generated trials can avoid difficult/time-consuming constraints unless explicitly allowed.

Changes:

  • Introduced filter_game_constraint_templates() to apply difficult/time-consuming filtering to constraint templates.
  • Updated objective generation to use the filtered constraint templates.
  • Switched optional constraint selection to weighted sampling via weight.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Introduce a static _filter_templates function to centralize filtering logic for objective/constraint templates and remove duplicated code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants