Skip to content

Add more weighted logic#373

Closed
initsu wants to merge 2 commits intoEllendar:5.1from
initsu:weights
Closed

Add more weighted logic#373
initsu wants to merge 2 commits intoEllendar:5.1from
initsu:weights

Conversation

@initsu
Copy link
Collaborator

@initsu initsu commented Jan 27, 2026

This changes drop item room shape selection a bit. Instead of them being guaranteed to be put first in the shuffle, they are now given 6 times higher chance of being put first. So good odds, but no longer guaranteed.

With that change I'd probably bring Random Walk drop chance back up a bit, maybe to 11-12%.

@initsu initsu marked this pull request as draft January 29, 2026 03:06
@initsu initsu marked this pull request as ready for review January 29, 2026 03:14
@initsu initsu changed the title Add TableWeightedRandom and LinearWeightedRandom weighted samplers Add more weighted logic Jan 29, 2026
@Ellendar
Copy link
Owner

Ellendar commented Feb 1, 2026

The issue isn't with drop item rooms, when I ran statistics, even with the existing setup they appeared less often than almost every other shape. The issue with the high drop rate is that the combination of a high number of drops and the inescapable drop prevention makes drops vastly better than any other option when hunting for a boss, and especially in GP. If drops are rare this is ok, but right now the fastest way to do almost any GP in random walk is "stick to the bottom and hunt for drops". I'm fine with that being a sometimes thing but not it being all the time. Ideally random walk drops appear at about the same frequency they do in other palace styles. Likely that value is actually lower than 8%, but I want to do more testing.

@initsu
Copy link
Collaborator Author

initsu commented Feb 2, 2026

I think they both are issues. As it is, if you see a non-item drop room, you know that all item rooms must be drop rooms (or that room could not remain itemless).

- TableWeightedRandom class works like the Climate weighting works
- LinearWeightedRandom class is like the previous WeightedRandom
- WeightedShuffler class has Random.Shuffle-like behavior, while also taking into account the stored weights for sorting
@Ellendar
Copy link
Owner

I added the parts of this I want to change. We can revisit item room selection later since I'm not happy with the current solution or this one. Functionally, the goal of making item room shapes appear approximately equally while not leaking information about what directions do/do not lead to item rooms seems impossible (especially as we reduce drop rates). Maybe the best solution is to return to digshake's original solution of just categorizing rooms by entrance type and selecting a random entrance type (though with a fix in place to make rooms with multiple entrance types not have increased chance to appear)

@Ellendar Ellendar closed this Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants