Skip to content

Lower minimum weight if less than desired number of items#5526

Merged
LocalIdentity merged 4 commits into
PathOfBuildingCommunity:devfrom
QuickStick123:lower-weight-to-include-results
Apr 27, 2023
Merged

Lower minimum weight if less than desired number of items#5526
LocalIdentity merged 4 commits into
PathOfBuildingCommunity:devfrom
QuickStick123:lower-weight-to-include-results

Conversation

@QuickStick123
Copy link
Copy Markdown
Contributor

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:

  • Try finding 1c RF weapon with highest DPS weapon equipped.
  • Try finding best weapon with highest DPS weapon equipped to give full result slots.

@QuickStick123 QuickStick123 added the enhancement New feature, calculation, or mod label Jan 3, 2023
Comment thread src/Classes/TradeQueryRequests.lua Outdated
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-90% decrease seems pretty agressive compared to +50% adjustment below.
This may cause overshooting and slow convergence.

Copy link
Copy Markdown
Contributor Author

@QuickStick123 QuickStick123 Jan 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 LocalIdentity merged commit 90cf37b into PathOfBuildingCommunity:dev Apr 27, 2023
@QuickStick123 QuickStick123 deleted the lower-weight-to-include-results branch April 27, 2023 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants