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

Zork Grand Inquisitor: Fix Determinism Issues on Fixed Seeds #3134

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

nbrochu
Copy link
Collaborator

@nbrochu nbrochu commented Apr 12, 2024

Turns out I had 2 separate small issues affecting determinism on fixed seeds:

  • An iteration on sets of location enum items
  • An inline cast of a set to a list in get_filler_item_names

In both cases, I made sure the operations happened on lists instead to make sure the order is deterministic.

Before

2 generations with fixed seed 12345 would yield completely different item placement, progression items included

After

2 generations with fixed seed 12345 yield identical item placement

World tests are still green after the changes.

@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Apr 12, 2024
@nbrochu nbrochu added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Apr 12, 2024
Copy link
Collaborator

@ScipioWright ScipioWright left a comment

Choose a reason for hiding this comment

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

Very simple change of sets to lists. Still weird that the itempool gets sorted by core, leading to this being an actual issue in the first place.

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 15, 2024
@Berserker66 Berserker66 merged commit fec533b into ArchipelagoMW:main Apr 18, 2024
15 checks passed
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants