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

Issue with calculate week #40

Closed
Sblesh opened this issue Apr 8, 2020 · 29 comments · Fixed by #106
Closed

Issue with calculate week #40

Sblesh opened this issue Apr 8, 2020 · 29 comments · Fixed by #106
Labels
prediction Prediction / Calculation Issues

Comments

@Sblesh
Copy link

Sblesh commented Apr 8, 2020

I tried to set my week and can't calculate it. If you put 130+ bells in any of the label gives you an error.

I bought turnips in Sunday at 91 bells.
Monday AM were at 120 bells
Monday PM were at 147 bells
Tuesday AM were at 197 bells
Tuesday PM were at 199 bells
Wednesday AM were at 99 bells
Wednesday PM were at 95 bells

@Aliervo
Copy link

Aliervo commented Apr 8, 2020

Is it your first week buying turnips?

@theRTC204
Copy link
Collaborator

We have seen some reports from others that the algorithm is possibly calculating values incorrectly. This still needs to be investigated further and additional examples are greatly appreciated!

There appears to be a few things happening here.

If we assume that this was not your first week buying, then having a sell price of 147 on Monday PM is not possible (based on the predictions model, I mean). So, either this is your first week, or the predictions model is not working.

If this is your first week, then we still have a problem once we get to Wednesday AM, where the predictions model suggests your sell price could not be lower than 146 - your value was 99 though.

In both situations, whether first week or not, there appears to be a calculation issue (this of course is assuming your values are 100% correct, and not possibly typo'd or invalid)

@rolledback
Copy link

I have seen this as well.
image
It is the Wednesday PM price which breaks things.
image

@theRTC204
Copy link
Collaborator

Thanks for sharing. The more examples people provide, the more information we'll have to hunt down the cause.

@ElGenerico
Copy link

For me, it is the Tuesday PM price input that broke the calculator.
chrome_2020-04-08_11-10-36
chrome_2020-04-08_11-10-42

@pjbollinger
Copy link

I'm also experiencing this. If you remove the 72 from Wednesday AM it works. I noticed that 71 works, so I'm wondering if there is an off by 1 error. This is not the first week of buying turnips (second if it means anything, v1.1.4a)

Screen Shot 2020-04-08 at 12 35 46 PM

@rolledback
Copy link

I believe this other web app is using similar methods. They have an issue open right now discussing off by one/precision issues: elxris/Turnip-Calculator#3

May be worth following.

@theRTC204
Copy link
Collaborator

I've been keeping tabs on that, and comparing results between this app and their app - I have seen several situations where the elxris app produces a prediction, where this one cannot.

@theRTC204
Copy link
Collaborator

It's worth noting that JavaScript rounds float values differently than C++ does, so there may not be anything that anyone can do to properly address that. Frankly, every language can potentially have slight variations in their floating point math...

@rolledback
Copy link

Yes, very true. WebAssembly might be a good solution here. Or, running the analysis on a server (but that costs more $$$ 😋) .

@theRTC204
Copy link
Collaborator

Neither is likely, I don't think. My understanding is the maintainer would like to keep this lightweight and without a back end. Also, Web Assembly would require a complete rewrite of the entire app, so it's essentially a new project.

@mikebryant
Copy link
Owner

Yeah, anything involving a backend is too heavyweight for me

How far out are we anyway.. I'm half wondering whether to just add a bell of fudge factor either way if needed to find a prediction. Is that good enough?

@theRTC204
Copy link
Collaborator

Tough to say this point. Some of the examples show a variance in the 10s or greater, which does suggest a calculation issue more than a rounding issue.

@Aliervo
Copy link

Aliervo commented Apr 8, 2020

Speaking of WebAssembly, someone did make this. But it would still require a significant rewrite to incorporate.

@ptrain24
Copy link

ptrain24 commented Apr 8, 2020

Monday PM broke for me. (Not sure if additional examples are helping at this point... but I thought I would share.

image

@theRTC204
Copy link
Collaborator

Monday PM broke for me. (Not sure if additional examples are helping at this point... but I thought I would share.

What were all your values? The example is only beneficial if we can use it to replicate (need your buy price at least)

@ptrain24
Copy link

ptrain24 commented Apr 8, 2020

Here you go. Changing the probability of the previous week doesn't affect anything in this case.

image

@theRTC204
Copy link
Collaborator

Here you go. Changing the probability of the previous week doesn't affect anything in this case.

Thanks! It's possible this could be a rounding issue. The lower bounds from the prediction for Monday PM is 72 but you got a 71. Do you happen to know what the rest of your week looked like?

@ptrain24
Copy link

ptrain24 commented Apr 8, 2020

Yep:

image

@theRTC204
Copy link
Collaborator

Thanks again. More than just the Monday PM value appears to be outside the ranges of the prediction. This is helpful.

@tylermatchett
Copy link
Contributor

I just posted one with incorrect screen shots, so here is the correction:
I have gotten this issue today with my Thursday AM value
The value Nook quoted was 62, however put into the field it breaks the predition, correct it to 61 and it works, seems to be similar to the issues above, but here's one more for the dataset.

Not Working
notworking

Working
working

@wlrlbam
Copy link

wlrlbam commented Apr 9, 2020

First week, purchased at 89
Mon am 89. Mon pm 130
Tues am 109. Tues pm 142
Wed am 151. Wed pm 156
Thur am 154. Thur pm 82.
It broke and did the all 999 starting wed am

@bli754
Copy link

bli754 commented Apr 10, 2020

Screenshot_20200409-194416

Inputting the Thurs PM broke the calculator :/

@Vankog
Copy link

Vankog commented Apr 10, 2020

Today the Calc broke 💔 for me, too. (same for https://elxris.github.io/Turnip-Calculator/)
No first timer. :-)
Screenshot_20200410-102406

@Serxeid
Copy link

Serxeid commented Apr 10, 2020

More data if it helps. Predicted range for Friday AM was 91-143, actual price is 172. Tested on this tool, https://github.com/drfuzzyness/google-sheets-stalk-market-calculator v1.3, and https://elxris.github.io/Turnip-Calculator/ getting the same results.

ss (2020-04-10 at 11 00 35)

This was referenced Apr 13, 2020
@Fae-ok
Copy link

Fae-ok commented Apr 14, 2020

Tuesday PM broke mine

8F5752D8-4043-4D76-B475-BC7DF8D45C09

@mikebryant mikebryant added the prediction Prediction / Calculation Issues label Apr 14, 2020
@theRTC204
Copy link
Collaborator

Tuesday PM broke mine
@Fae-ok what was your Tuesday PM value?

@mjdalton
Copy link

I have what looks like to be the same issue. It broke with Monday's values but I included a screenshot with the values from today just in case
image

@tylermatchett
Copy link
Contributor

So with the recent changes in #93 it seems to break with this valid data:
https://turnipprophet.io/?prices=104.95.91.124.201

Buy price 104
mam - 95
mpm - 91
tam - 124
tpm - 201

You need to delete both mpm and tam to get it to show anything, or adjust the buy price up 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prediction Prediction / Calculation Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.