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

"One item per player" fill greatly messes with priority fill, yielding near 100% failure rates for specific yaml combinations #3467

Open
NewSoupVi opened this issue Jun 5, 2024 · 1 comment
Labels
is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs.

Comments

@NewSoupVi
Copy link
Member

NewSoupVi commented Jun 5, 2024

What happened?

I made a yaml for a game
I put a couple "very lategame locations" as priority locations.
I generated.
All is well.

Now, I generate a 10 player game with all slots using this yaml.
It fails during priority fill almost 100% of the time.

Why? Because of this.

While there are absolutely "bad items" that can be placed on those lategame priority locations for everyone, just due to random chance, they will be tried to be placed "together" with good items that can't be placed on any of the lategame priority locations.

Reproduce

Make a base settings Witness yaml with priority_locations: ["Mountain Bottom Floor Left Pillar 4", "Mountain Bottom Floor Right Pillar 4"]
Generate with 1 of these yamls -> 100% success rate
Generate with 10 of these yamls -> Near guaranteed failure during priority fill
Generate with 10 of these yamls with the following code replacemenet -> 100% success rate, mostly expected results (Although there might be some bugs?)

The code replacement is to replace Fill.py#L60-L68 with

while item_pool and locations:
    # DON'T grab one item per player
    items_to_place = [item_pool.pop()]        

What were the expected results?

Successful generation with 10 yamls that each put 2 lategame locations into priority_locations

Software

Core

@NewSoupVi NewSoupVi added the is: bug/fix Issues that are reporting bugs or pull requests that are fixing bugs. label Jun 5, 2024
@NewSoupVi
Copy link
Member Author

NewSoupVi commented Jun 5, 2024

Now obviously, this is a really important optimisation to AP. Making this replacement does yield consistent success, but it also makes generation exponentially slower (I think literally)

So what I believe should be done is, this optimisation should be optional, behind a parameter called e.g. one_item_per_player = True, which is then turned off during priority fill, where it is most likely to result in problems.

GodlFire added a commit to GodlFire/Shivers that referenced this issue Jun 11, 2024
Option to have ixupi captures a priority has been removed and can be added again if Priority Fill is changed. See Issues ArchipelagoMW#3467.
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.
Projects
None yet
Development

No branches or pull requests

1 participant