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

Artifact Upgrade Probability Calculator (dev-mode only) #1209

Merged
merged 57 commits into from
Nov 12, 2023
Merged

Conversation

tooflesswulf
Copy link
Collaborator

@tooflesswulf tooflesswulf commented Jun 24, 2023

The math is wrapped inside a class nicely now. Should be fairly straightforward:

  1. Construct a UpOptCalculator class w/ some nodes, thresholds, and current build.
  2. Add each artifact to the calculator one by one
  3. Perform loose (fast) calculations with calcFastAll()
  4. Perform more accurate (slow) calculations on top few candidates
upopt = new UpOptCalculator(
    nodes,
    thresholds,
    curEquip
)
artifacts.forEach(art => upopt.addArtifact(art))
upopt.calcFastAll()
upopt.calcSlowToIndex(5)  // Top 5 artifact recommendations stored in upopt.artifacts[0:5]

@frzyc frzyc requested a review from lantua June 28, 2023 21:31
@lantua lantua removed their request for review June 28, 2023 21:32
@frzyc frzyc changed the title Upopt has an API now. Artifact Upgrade Probability Calculator Aug 17, 2023
@nguyentvan7 nguyentvan7 marked this pull request as draft October 4, 2023 22:40
@lantua
Copy link
Collaborator

lantua commented Oct 20, 2023

Based on #1237, we have three types of calculations: slow, fast, and exact.
We use the slow and fast calculations for the ranking, but the exact one to display to the users.
There seems to be no bounded relationship between the three calculations, albeit in practice, they tend to approximate one another.
This may confuse if the ranking and the displayed numbers do not agree (e.g. if the first result has a smaller value than the third one).

We may need to put a warning to the users, and/or perform the exact calculation in the background and update the ranking as the result becomes available.

@nguyentvan7 nguyentvan7 added the showDevComponents Set on a PR to show components that are normally development-only label Nov 9, 2023
@nguyentvan7
Copy link
Collaborator

Validated that the upopt page is not present in UI and will not load if devmode is disabled

@nguyentvan7 nguyentvan7 marked this pull request as ready for review November 12, 2023 01:40
@nguyentvan7 nguyentvan7 requested a review from frzyc November 12, 2023 01:40
@nguyentvan7 nguyentvan7 changed the title Artifact Upgrade Probability Calculator Artifact Upgrade Probability Calculator (dev-mode only) Nov 12, 2023
@nguyentvan7 nguyentvan7 merged commit 5333ea4 into master Nov 12, 2023
6 checks passed
@nguyentvan7 nguyentvan7 deleted the upopt branch November 12, 2023 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
showDevComponents Set on a PR to show components that are normally development-only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants