AtmaWeapon / FFXIVSynthSolver

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

Do we even need the tree at all? #9

Closed AtmaWeapon closed 10 years ago

AtmaWeapon commented 10 years ago

I started thinking about why we even need the tree. As far as I can tell, we only need it's structure as a means to traverse through the state tree during analysis, but as soon as a state has been examined, it no longer needs to be in the tree.

What I mean by this is that currently it solves (and retains) the entire tree in memory. Then during playback, it just traverses the tree as you choose interactions. However, the analyzer already puts solved states into a hash table with their corresponding scores. So a possible better alternative is to just lose the entire tree structure as soon as you've solved a node, and during playback go directly through the hashtable to select optimal branches.

This would completely eliminate the memory problem, although it's not clear if or what type of problems would be encountered. Needs investigation.

AtmaWeapon commented 10 years ago

Fixed in 9163bca6605f3b3aa9e452736a99df570511b5aa. This led to massive improvements all around, that were at least 2 orders of magnitude better than anything i imagined.It's fast enough now that I think I can add basically anything without risk of performance issues.