gereleth / hexapipes

Hexagonal pipes puzzles
https://hexapipes.vercel.app/hexagonal/5
MIT License
186 stars 19 forks source link

Unexpected "improved average of 12" #102

Closed graue closed 1 year ago

graue commented 1 year ago

I'm not sure why I got this "improved average of 12" when... I haven't solved 11 of the last 12 puzzles (so I shouldn't have an average at all), and definitely haven't solved any daily in under 5 minutes for a while.

image

After switching tabs and back the message disappeared.

gereleth commented 1 year ago

This is pretty puzzling. There's no current ao12 in the table but there is an "improved ao12" message. That's not supposed to happen. Where did that time even come from? It's rather similar to the old best value, so maybe it's a bug in date-based streaks calculation?..

Could you maybe share your solves data? You can get it by running window.localStorage.getItem('/daily_solves') in your browser console when on the hexapipes site. I haven't touched the stats code for a long time but I'll try to look into it.

graue commented 1 year ago

Sure, could I share it with you privately? Considering how far that goes back, and the times of day included, I prefer not to reveal it to the entire world.

BTW, the best average of 12 is now showing as a new, third value, in between the two values in the screenshot: 03:56.339

gereleth commented 1 year ago

I found a problem with computing average of 12 on dailies - a bug in how missed days are handled. Say you solved some dailies, skipped a week and solved some more. When the code processes that break it starts computing "average of 12+7=19" instead of 12. And it snowballs with more skipped days causing weird results on a long solves history (thanks for providing an example!)

I'm going to push a fix soon.

gereleth commented 1 year ago

I think this should be fixed now. Your correct best AO12 comes from the end of 2022 and is 2:28. Imagine how easy the dailies must have been back then =).