genshinsim / gcsim

monte carlo combat simulation for genshin impact
MIT License
278 stars 91 forks source link

Dynamically Determine a Good Number of Iterations #294

Open Tsym-or-Tysm opened 2 years ago

Tsym-or-Tysm commented 2 years ago

For the most part, users shouldn't need to set the number of iterations themselves, as we should be able to dynamically determine this based on the results.

To keep this performant and to ensure this works with the web, I think the flow should go something like this:

I think this can all be done within go so cmd and web can use the same code, with a function exposed to allow for wasm to feed the results back in. It's not that much data and should only trigger a few times (ideally), so there shouldn't be much overhead.

srliao commented 2 years ago

Hmm i think simc has some way to just estimate the confidence interval. Can't we do the same? Isn't the mean subject to CLT or something something?

Tsym-or-Tysm commented 2 years ago

That's literally the procedure that I outlined above, unless you're saying that they have some kind of more sophisticated way to get at it a priori?

srliao commented 2 years ago

Side note. this would have to be done in JS i think. Unless this is a desktop only tool? (I'm ok with that as well)

k0l11 commented 1 year ago

relevant: