Conversation
This re-writes the cached quantity calculations for MixedBehaviorProfile: * Uses the preorder and postorder traversal of nodes provided by the game class; * Thereby avoids recursion to descend the tree * Cleanly separates the computation of each vector of quantities (which will be a help for further optimisation in future when we look at the data structures used to represent them) * Because there is a dependency order in the cached quantities, implements a slightly more sophisticated cache to compute only what is truly needed. Introduce cache object Remove separate cache invalidation Ensure only as much information as is required.
|
@rahulsavani I've completed my first go at rationalising the way we're doing caching in mixed behaviour profiles. I've still got a bit more to do, but this is advanced enough it is worth you having a look. All tests continue to pass, and also I checked a few of my standard extensive games in liap/logit and didn't notice any differences. Note that this is based on current @d-kad I wanted to call your attention to this because I've implemented here a more sophisticated And for both - note this new implementation uses both the preorder and postorder traversal versions of |
This re-writes the cached quantity calculations for MixedBehaviorProfile: