Thanks Nums, I read 7.1 and it was interesting and useful. The rest was out of my league...

I found out what my big problem was though, the stack only holds 2^21 and I was thinking 2^32. The stack overflows were leading to my looping problems.

The book says I should use a fraction to limit the rand like: state * 143/1125 but this leads to half as many 0's as other numbers.

Using a mod like: state mod 1001 gives the right number of 0's, what's up with that?

I settled on this:

`'Seed`

cond

*.robage 1 =

start

*.xpos *.ypos add 9 div 51 store

stop

'Location Generator

cond

start

*51 211 mult 1663 add 7875 mod 51 store

*51 143 mult 1125 div 52 store

stop

'Value Generator

cond

*52 51 !=

start

*51 211 mult 1663 add 7875 mod 143 mult 1125 div *52 store

stop

@Botsareus I figured a random number generator that was able to change would be better than a static Random gen.

This new one works almost as well as rnd according to my very limited testing, besides the stupid 0's. (Replacing [143 mult 1125 div] with [1001 mod] fixes that)

I thought you would like it because it lets mutations affect more things.

P.S. The stack is so small, I had to reduce my fraction from 1001/7875 to 143/1125