damonhook / aos-statshammer

A tool for calculating and comparing damage outputs for Warhammer Age of Sigmar units.
https://aos-statshammer.herokuapp.com/
MIT License
19 stars 12 forks source link

Simulations API Performance Improvements #29

Open damonhook opened 4 years ago

damonhook commented 4 years ago

Right now it does a complete set of simulations per save. This means that at a numSimulations of 5,000 it actually simulates 30,0000 attack sequences.

However, an attack sequence is the same up until the save roll phase. This means we could change the simulations to simulate once, then at the save phase, do 6 save rolls. Thus we would only do 5,000 attack sequences up until the divergent path.

This would dramatically improve response times and allow us to increase the number of simulations used