vendredi 14 octobre 2016

How to implement optional optimization?

I'm implementing lazy behavior tree evaluation but some node types (e.g. timeout) cannot support such optimization. How could the lazy eval be made dynamically optional for a subtree rooted at such a node, in OOP? A mode variable on the evaluator object won't work, since the subtree's sub-nodes that do support the optimization could simply turn it back on. I think I need to use some other OOP features...is there a good pattern for this type of object behavior?

Aucun commentaire:

Enregistrer un commentaire