derfloh205 / CraftSim

MIT License
14 stars 37 forks source link

Error with craftsim probability table in CraftSim/Pricing /ProfitCalculation.lua #621

Open vickorian opened 1 week ago

vickorian commented 1 week ago

When the probability table is being built, i think there is an error when it's requesting them from the simulation section. I haven't been able to isolate the particular helper function responsible, but the communication is occurring in this file. The probability table isn't being populated with the correct MC_chance, resourcefulness, etc. which is leading to wildly inaccurate results of net profit.

The probability table is communicating correctly with the simulation in some ways because it's updating when different parameters are modified in the simulation. And further, the simulation is (mostly) reporting accurate values when comparing them to the game's reported values. The disconnect is happening in the creation of the table itself and i'm not sure why. It should be as simple as calling what the simulator has stored in memory, so i assume that there is some variable ghost hanging around in the file or as a predefined term leading to a deviation, though the differences in values aren't constant, in that it's not off by just a set amount every time. So there is some multiplicative trickery going on.

Anyways, thanks for all your hard work on CS. It's been very helpful minimizing costs.

derfloh205 commented 1 week ago

do you have an example?

vickorian commented 1 week ago

image image image

Also, i can make a separate feature request, but potion spillover only applies one stack in the simulator instead of the max 10. So 24 vs. 240 stat buff.

derfloh205 commented 1 week ago

As far as I remember the problem here is that it is not known how and when blizzard rounds its values in their calculations. Craftsim tries not to round thus there might be some differences between the read values from the live ui / api and the calculations in the simulation

so its hard to solve that

for the buff stacks one: #412

vickorian commented 1 week ago

ok, I had an idea that since your actual Sim is relatively accurate on calc, can you set the variables in a global space in the simulation cache that will let the table retrieve those values instead of the RecipeData variables it's using now. Then you just have to toggle the "used" value by the simulator toggle being on or off.

vickorian commented 1 week ago

image this is a more pronounced difference as multicraft and resourcefulness increases. The deviation becomes quite stark.

derfloh205 commented 1 week ago

will take a further look when I rework the simulation mode