@djensen Sure. Even if you don’t directly use the engine., maybe you can take advantage of some of the techniques?
I think the speed of my engine is due to:
Precompute everything up frontFor each node (unique sub-army)
get any needed probability with an array lookup
get the next state index for any casualty type with an array lookup.
I don’t use any hash/maps in the tight inner loop. Only for postprocessing the output, or preprocessing the input. Pruning. I use a pruning threshold 1e-12. If a state’s seed probability is smaller than this threshold – I prune to zero – and don’t update child states. Roundless evaluation. I don’t roll multiple rounds of battle. The 2-D probability matrix is solved only one time.





