I just wrote this on another topic, and here I bring it as a wiki:
illusion = 0
async choice:
result = 0.34 * random * illusion
delay 8 # seconds
return result
Life:
born = 0.33 * random # either 0 or 1
happy = random
dead = random
while not dead:
illusion = random # perception
luck = 0.33 * random * illusion
happy = (born + luck + choice) > 0.5 # is the glass half full?
dead = random