Lower minimum weight if less than desired number of items#5526
Merged
LocalIdentity merged 4 commits intoApr 27, 2023
Merged
Conversation
Dullson
reviewed
Jan 3, 2023
| if response.total < self.maxFetchPerSearch then -- Less than maximum items retrieved lower weight to try and get more. | ||
| local queryJson = dkjson.decode(query) | ||
| queryJson.query.stats[1].value.min = (tonumber(highestWeight) + queryJson.query.stats[1].value.min) / 2 | ||
| queryJson.query.stats[1].value.min = queryJson.query.stats[1].value.min / 10 |
Contributor
There was a problem hiding this comment.
-90% decrease seems pretty agressive compared to +50% adjustment below.
This may cause overshooting and slow convergence.
Contributor
Author
There was a problem hiding this comment.
If it overshoots the average thing seems very effective of getting it in the desired range so it would only overshoot once.
But it does seem to work fine with division by 2 if that is preferable.
If you let it overshoot you get thousands of results which could be desirable vs maybe a few hundred which is nice for people who want to refine the search themselves.
I am not opposed to making this less aggressive if people think that is more reasonable.
LocalIdentity
approved these changes
Apr 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem being solved:
If you have a near perfect item in your build you can get not many results which when combined with sorting leads to less options. This also occurs when using minimum weight e.g. to find best 1c wand for RF.
This also lowers the existing minimum weight slightly to hopefully strike a better balance of number of iterations needed it needs ~3-4 to reduce from max dps weapon to 1c weapon for RF.
Steps taken to verify a working solution: