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

(BREAKING CHANGE) Make likelihoods configurable #528

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Conversation

skizzerz
Copy link
Member

@skizzerz skizzerz commented Nov 10, 2024

Rather than encoding the likelihood of a mode as part of the game_mode decorator, it is now present in botconfig.yml. The defaults have been migrated over, however any custom modes will require manual work.

If your custom mode simply re-defined a built-in mode to change the likelihood, delete the custom mode file and customize the likelihood via botconfig.yml instead.

If you have actual custom modes, you must remove the likelihood kwarg from the game_mode decorator, and then add a section to your botconfig.yml to define the mode's likelihood, like so:

gameplay:
  <mode name>:
    weight: <likelihood>

The default is 0 for custom modes that are missing from botconfig, i.e. the modes will be majority-vote only. Failure to remove the likelihood kwarg will result in the bot failing to start. This is a breaking change.

Additionally, for sleepy and boreal some additional settings became configurable in botconfig.yml which can be used to tweak the difficulty of those modes.

Finally, the configuration page autogeneration for the wiki should now properly handle union types.

Rather than encoding the likelihood of a mode as part of the game_mode
decorator, it is now present in botconfig.yml. The defaults have been
migrated over, however any custom modes will require manual work.

If your custom mode simply re-defined a built-in mode to change the
likelihood, delete the custom mode file and customize the likelihood via
botconfig.yml instead.

If you have actual custom modes, you must remove the likelihood kwarg
from the game_mode decorator, and then add a section to your
botconfig.yml to define the mode's likelihood, like so:

gameplay:
  <mode name>:
    weight: <likelihood>

The default is 0 for custom modes that are missing from botconfig, i.e.
the modes will be majority-vote only. Failure to remove the likelihood
kwarg will result in the bot failing to start. This is a breaking
change.

Additionally, for sleepy and boreal some additional settings became
configurable in botconfig.yml which can be used to tweak the difficulty
of those modes.

Finally, the configuration page autogeneration for the wiki should now
properly handle union types.
- Add section to botconfig template to let admins know this is a thing
  they can do, along with a suggested set of weights
- Make it so you can specify as ints instead of dicts in botconfig
- Fix missing metadata in sleepy
@Vgr255 Vgr255 merged commit fc39d13 into master Nov 25, 2024
2 checks passed
@Vgr255 Vgr255 deleted the weight_config branch November 25, 2024 19:58
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