I can see two ambiguous parts here.
First, someone needs to come up with the integration points. The SpatialPooler will make calls into a Boosting or Inhibition object... when and where? For boosting, the object will probably need to do bookkeeping, and probably needs to know about timesteps. Maybe it just takes in overlaps and boosts them in-place? Part of this proposal is to add extensibility, allowing different boosting or inhibition algorithms to be inserted. Can we come up with an interface to these objects that works for all potential algorithms?
Second, how does this work with pointers and ownership? In C++, using polymorphism means using pointers or references. You can't pass a
Derived into a function expecting a
Base -- you have to use
Base&. The C++ SpatialPooler will hold a reference or pointer to a Boosting and Inhibition object. Who instantiates the object? Who deletes it? Maybe we should use smart pointers? The SpatialPooler could hold a smart pointer to the object, and a
setBoostingAlgorithm method could take in a smart pointer? And the SWIG bindings for the
setBoostingAlgorithm method could also save it to
self.boostingAlgorithm so that the Python garbage collector doesn't destroy it? (I'm interested in this problem -- it would be useful to know how to build pluggable algorithms into the SP, TM, etc.)
I don't think we'll be ready to approve this until we have answers to these questions. I don't know yet if this task is possible.