AtmaWeapon / FFXIVSynthSolver

BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Prune non-optimal tree branches #8

Closed AtmaWeapon closed 10 years ago

AtmaWeapon commented 10 years ago

Suppose we determine that actions W, X, Y, and Z are legal from the current state. We expand all 4 of them, and find that Y is optimal. We should prune W, X, and Z from the tree entirely.

There is no speed increase to doing this because the entire W, X, and Z trees have already been analyzed, but it should result in a massive reduction in memory usage.

Currently this will have no negative side effects because the application only supports playing back a sequence on the optimal path, but eventually I plan to allow the user to choose any of the legal actions from any state, for example in case the user thinks he knows better how to proceed than the application. In that case, we would force a re-evaluation at the point where the user chose a non-optimal node. So that is something to consider.

However, if the user is frequently choosing actions that the application thinks is non-optimal, then a better solution is to improve the scoring metric.

AtmaWeapon commented 10 years ago

Fixed in aa28e76738e74684ec39a580dae8fd833887cfa7. This yielded over 80% reduction in memory usage, and much to my surprise, a 60% reduction in analysis time. Very pleased!