nengo/nengo — pull request #553 by drasmuss (2014-11-19 02:32:18+00:00)
Title: Using generic python function to specify learning rule

The idea is that this allows someone to specify an arbitrary Python function for the learning rule. You need to define a function that accepts the previous decoders and a "data" vector, and outputs a change in the decoders. The data vector is the output of some node; the idea is that users connect up whatever inputs they want to a passthrough node (although it doesn't have to be a passthrough, could be something more complex), and then we pass the output of that node to the learning rule.

See `test_learning_rule.py` for an example of implementing the PES rule using this syntax.