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

fix(Nexto_EZ): buffer randomness value consistency #335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

donachys
Copy link

Updates the Nexto_EZ bot to match user expectations when the GUI slider is unmodified.

Issues

  • when initialized the Nexto_EZ class loads the shared memory buffer with a value from 0-255 where 0 represents a fully random bot and 255 is fully nexto.
  • when initialized the gui expects the value to be in the 0=fully-random format and displays correctly, but does not update the value until the slider is adjusted.
  • when the slider is adjusted it writes a 0-255 value where 255 is random and 0 is fully nexto. (Note that this is inverted from the initialization step.)
  • when deciding whether the tick should be random or not the Nexto_EZ class expects the buffer to contain a 0-255 value where 255 is fully random. (see line 50)

It seems to match expectations if the user modifies the slider before playing. However if the slider is not changed, or when SHOW_GUI is set to False the bot's behavior will be the inverse of expectation.

Proposed fix

  • update the initialization of the class and gui to set and expect the 0=fully-nexto 255=fully-random format, respectively.
  • add debug logging to elevate confidence the bot is behaving as expected. Defaults to False/Off.

Updates the Nexto_EZ bot to match user expectations when the GUI slider
is unmodified.

* when initialized the `Nexto_EZ` class loads the shared memory buffer
  with a value from 0-255 where 0 represents a fully random bot and 255
  is fully nexto.
* when initialized the gui expects the value to be in the 0=fully-random
  format and displays correctly, but does not update the value until
  the slider is adjusted.
* when the slider is adjusted it writes a 0-255 value where 255 is
  random and 0 is fully nexto. (Note that this is inverted from the
  initialization step.)
* when deciding whether the tick should be random or not the `Nexto_EZ`
  class expects the buffer to contain a 0-255 value where 255 is fully
  random. (see line 50)

It seems to match expectations if the user modifies the slider before
playing. However if the slider is not changed, or when `SHOW_GUI` is set to
False the bot's behavior will be the inverse of expectation.

* update the initialization of the class and gui to set and expect the
  0=fully-nexto 255=fully-random format, respectively.
* add debug logging to elevate confidence the bot is behaving as
  expected. defaults to False/Off
@donachys
Copy link
Author

If you'd prefer this to be resolved in a different way, or if there are concerns with the logging, I can update the pull request.

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.

1 participant