spion / triplie-ng

Chatbot with Markov chains BFS and Hebbian learning
MIT License
57 stars 16 forks source link

Creatives = 0 (no creativity) does not pass in the value (resulting in NaN values later) #34

Open Kermalis opened 3 years ago

Kermalis commented 3 years ago

The return object here is expecting a .values property which is passed in from the parameter: https://github.com/spion/triplie-ng/blob/master/lib/pipeline/associate.js#L160

However, when creatives is 0, you are just mapping the array without adding .values to it: https://github.com/spion/triplie-ng/blob/master/lib/pipeline/associate.js#L160

The return object for creativity != 0 adds .values properly: https://github.com/spion/triplie-ng/blob/master/lib/pipeline/associate.js#L160

The return value is then used in Markov. However, .values is never used, so I'm not sure what the point of it is. The input value comes from Associate when it generates avalues, which is currently broken (#32) So why does associate generate values if they won't be used? The pairing formula in associate doesn't shed any light on what the values are for.