numenta/nupic — pull request #407 by breznak (2013-11-12 18:36:57+00:00)
Title: RFC UtilityEncoder

I'd like to provide this utility encoder for experimenting with behavior, it implements "emotions",
where eg for internal state `hunger` it's better to take action eat() than sing().

Biologically I believe it's ok to hardwire this for some basic emotions (hunger, fear, comfort) seem hardwired in body too (on chemical reactions, ...)

And I think it's good to have it inside the CLA, (opposite to computing it quite easily by hand in the algorithm application), as this way we can define "intentions"/drive/goal and help the TP choose from multiple options. My goal is mimicking "thinking" as much as possible in the CLA and this will be helpful to that.

Also, the function is quite general, as feval can be user-defined to what-ever, so can encoder be any wild mix of encoders (speed-aside).

Usecase would be eg in @EronWright 's https://github.com/EronWright/nupic-mouse where each possible path is evaluated (++ for amount of cheese, -- for path's length)

CC @jvitku