-
Notifications
You must be signed in to change notification settings - Fork 720
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
Tests: add a test that checks the state of the multiworld for determinism #2819
Tests: add a test that checks the state of the multiworld for determinism #2819
Conversation
I think the issue with Zillion is in core (This could be a problem with other games if they have default random options.) This is without looking really closely. Maybe I'll have more time to look more closely later. |
Note that Line 80 in 2167db5
To more accurately test this, you could, in multiworld.game[1] = world_type.game
multiworld.player_name = {1: "Tester"}
+ random.seed(seed)
multiworld.set_seed(seed)
multiworld.state = CollectionState(multiworld) |
It looks like it's the same issue with Mystic Quest, because the differing item in the test results always involves a weapon that can be a starting weapon. And Mystic Quest |
to make it most closely mimic normal generation it should probably be
should it reinitialize the global random after to prevent worlds from using that? currently global random and multiworld random are the same object but there's not really a guarantee that stays the same and using the global one is even more unsafe than the multiworld random |
this is failing unit tests because of super metroid. |
preferably global random doesn't need to be seeded for AP generation, so adding global seeding to the test goes in the wrong direction. |
It seems like it would take a lot of work to remove global random from I think it would be good to do, but I don't think this unit test should wait on that. We could have a comment on the seeding line in the unit test |
# Conflicts: # test/general/__init__.py
# Conflicts: # test/general/test_implemented.py
Seems like it's failing for some other reason now |
Leaving a comment to explain the tag: This has to account for Zillion and Super Metroid or whatever it was. |
Although Zillion does use global There is currently a problem with this PR that makes every game fail. Once that is fixed, I think Zillion will be passing. |
Right, the PR has to account for Zillion. For example, by excluding it from the test, or actually fixing the problem which was the truncation I believe |
I don't think there's anything specific about Zillion. That problem is making every game fail. |
Running the test locally, it passes for every game (except Super Metroid) if I just skip Zillion. I believe the problem is zero items or zero locations in the gen. Which isn't something Zillion is doing wrong per se, the PR just has to fix it in some way |
I just tried removing the |
What is this fixing or adding?
Title. also adds a seed arg to setup_solo_multiworld
How was this tested?
tests
If this makes graphical changes, please attach screenshots.