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

Make agent move to actual random closest position #2119

Merged
merged 2 commits into from
Apr 23, 2024

Commits on Apr 23, 2024

  1. Make agent move to actual random closest position

    This fixes a bug in which move_agent_to_one_of is deterministic when pos has multiple closest choices and selection="closest".
    EwoutH authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    0f7866d View commit details
    Browse the repository at this point in the history
  2. Correctly shuffle pos list

    The function `random.shuffle` from Python's random module does not return any value; it modifies the list `pos` in-place. Therefore, `agent.random.shuffle(pos)` results in `None`, and trying to iterate over `None` leads to the error you're seeing. This commit fixes this error.
    EwoutH authored Apr 23, 2024
    Configuration menu
    Copy the full SHA
    0521dd7 View commit details
    Browse the repository at this point in the history