Created
December 30, 2015 15:31
-
-
Save postspectacular/b3906ab819fdc916ca32 to your computer and use it in GitHub Desktop.
HOLO2 - Random generated Barricelli reproduction function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; pretty printed randomly generated reproduction function | |
;; x = position in curr. generation | |
;; y = generation | |
;; gene = value at (x,y) | |
(set-cell | |
x y | |
(if (and (prob (abs-sin (* x (+ 0.70618 (/ y 4.62437))))) | |
(pos? (dist x y 0 (- (sq (>> y 3.39245)))))) | |
(mod (+ (+ gene (sin (* y 0.11592))) | |
(* 0.05011 (+ (gene-at x y -3 0) (gene-at x y 3 0)))) | |
(max (gene-at x y -3 0) (gene-at x y 3 0))) | |
0)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment