htm-community / comportex

Hierarchical Temporal Memory in Clojure
154 stars 27 forks source link

Migrate to immutable, splittable random number generator #30

Closed floybix closed 8 years ago

floybix commented 8 years ago

Fixes #22

This was prompted by the fact that 'pprng' library is deprecated, but it turns out that immutable splittable RNGs are awesome. Pure functions - all. the. way. down.

Layers gain a deftyped clojure.test.check.random.JavaUtilSplittableRandom under key :rng which will need some kind of handling for serialisation (even if it's just to ignore it and make a new one).

mrcslws commented 8 years ago

Very cool. Thanks for doing this. I'm excited that models will now behave consistently by default (without requiring careful maintenance of a global RNG seed)