-
Notifications
You must be signed in to change notification settings - Fork 729
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
Fill: allow for single player fill restrictive placement and sweeping #2415
Fill: allow for single player fill restrictive placement and sweeping #2415
Conversation
Tested on main's OoT, observed ~20% speedup on 10 worlds default settings and ~35% speedup on 20 worlds, presumably would get even better with more worlds but I don't have infinite processing power to test it. |
# Conflicts: # Fill.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look about like what I did a while ago when the conversation that sparked this PR was had. I don't think my approval can speak for whether these changes forget behaviors that I don't know about, but I can say that it works very well for Emerald's purposes. Emerald is starting to hurt quite badly in pre_fill
due to having to collect and sweep from every world in order to place a handful of its own items. Aside from creating a patch file, this is by far the slowest aspect of Emerald right now.
Shuffling both badges and HMs (16 items among 16 locations, split into two groups) on my current dev branch for Emerald takes
Without this PR:
- ~1.1 seconds per
pre_fill
in a 10-player game - ~10 minutes per
pre_fill
in a 2000-player game
With this PR
- ~0.3 seconds per
pre_fill
in a 10-player game - ~2 minutes per
pre_fill
in a 2000-player game with this PR merged
It's another good chunk of time knocked off if there's an api to create single-player all_state
s, though not nearly as much.
i have this #2427 but i'm not happy with it atm so would definitely like some feedback on it on how it can be improved/made more usable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good & necessary
Tested a bunch of seeds with multiple games between main and this PR branch
Everything was identical. |
…ArchipelagoMW#2415) * Core: allow for single player state sweeping * Fill: have distribute items use single_player fill when it can * oop * pass locations to sweep_for_events instead of the player * finally found the diff that was breaking swap * LTTP fills everyone's dungeons at once, not just a single player's --------- Co-authored-by: NewSoupVi <[email protected]>
…ArchipelagoMW#2415) * Core: allow for single player state sweeping * Fill: have distribute items use single_player fill when it can * oop * pass locations to sweep_for_events instead of the player * finally found the diff that was breaking swap * LTTP fills everyone's dungeons at once, not just a single player's --------- Co-authored-by: NewSoupVi <[email protected]>
ArchipelagoMW#2415 removed the ability to provide items/locations for multiple players simultaneously with single_player_placement=True. Now that this is removed, the old behaviour should be considered deprecated so that developers using the old behaviour don't run into unexpected problems. With the requirement in place that all items in the provided item pool have to belong to the same player, that singular player can be retrieved once in advance rather than getting the player from the most recent item set into the `item` variable. This reduces the used scope of the `item` variable to just the loops it is part of and removes IDE warnings about the variable possibly not being initialized.
…layers ArchipelagoMW#2415 removed the ability to provide items/locations for multiple players simultaneously with single_player_placement=True. Now that this is removed, the old behaviour should be considered deprecated so that developers using the old behaviour don't run into unexpected problems. With the requirement in place that all items in the provided item pool have to belong to the same player, that singular player can be retrieved once in advance rather than getting the player from the most recent item set into the `item` variable. This reduces the used scope of the `item` variable to just the loops it is part of and removes IDE warnings about the variable possibly not being initialized.
…layers ArchipelagoMW#2415 removed the ability to provide items/locations for multiple players simultaneously with single_player_placement=True. Now that this is removed, the old behaviour should be considered deprecated so that developers using the old behaviour don't run into unexpected problems. With the requirement in place that all items in the provided item pool have to belong to the same player, that singular player can be retrieved once in advance rather than getting the player from the most recent item set into the `item` variable. This reduces the used scope of the `item` variable to just the loops it is part of and removes IDE warnings about the variable possibly not being initialized.
…ArchipelagoMW#2415) * Core: allow for single player state sweeping * Fill: have distribute items use single_player fill when it can * oop * pass locations to sweep_for_events instead of the player * finally found the diff that was breaking swap * LTTP fills everyone's dungeons at once, not just a single player's --------- Co-authored-by: NewSoupVi <[email protected]>
What is this fixing or adding?
title
How was this tested?
generated the same seed for 300 players under 4 separate conditions. existing emerald code with and without using the all_state cache, and then the same after merging in the single player optimization.
emerald cache single player opt.txt
emerald cache.txt
emerald no cache.txt
emerald no cache single player opt.txt
If this makes graphical changes, please attach screenshots.