clojush.random
random-closes
(random-closes close-parens-probabilities)
Returns a random number of closes based on close-parens-probabilities, which defaults to [0.772 0.206 0.021 0.001]. This is roughly equivalent to each selection coming from a binomial distribution with n=4 and p=1/16. (see http://www.wolframalpha.com/input/?i=binomial+distribution+4+0.0625) This results in the following probabilities: p(0) = 0.772 p(1) = 0.206 p(2) = 0.021 p(3) = 0.001
random-plush-genome
(random-plush-genome max-genome-size atom-generators)
(random-plush-genome max-genome-size atom-generators argmap)
Returns a random Plush genome with size limited by max-genome-size.
random-plush-genome-with-size
(random-plush-genome-with-size genome-size atom-generators argmap)
Returns a random Plush genome containing the given number of points.
random-plush-instruction-map
(random-plush-instruction-map atom-generators)
(random-plush-instruction-map atom-generators {:keys [epigenetic-markers close-parens-probabilities silent-instruction-probability track-instruction-maps], :or {epigenetic-markers [], close-parens-probabilities [0.772 0.206 0.021 0.001], silent-instruction-probability 0}})
Returns a random instruction map given the atom-generators and the required epigenetic-markers.
random-push-code
(random-push-code max-points atom-generators)
(random-push-code max-points atom-generators argmap)
Returns a random Push expression with size limited by max-points.