gcsim
gcsim copied to clipboard
Dynamically Determine a Good Number of Iterations
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:
- Sim runs a default number of iterations (say 250), and collects the results.
- The basic results are then analyzed to determine if we've hit some critical threshold. I think we can just use a 95% confidence interval with a 2.5% standard error, but we may want to evaluate this at some point.
- The sim then runs the number of iterations needed to hit the above measure, if we haven't hit it already.
- Repeat steps 2 and 3.
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.
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?
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?
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)
relevant:
- https://discord.com/channels/845087716541595668/1061109230909784225/1070107842545205328
- https://kb.palisade.com/index.php?pg=kb.page&id=125
- https://discord.com/channels/845087716541595668/846081551687352430/1070131699033329684 (not public)