From: Sander Land Date: 2006-05-04T04:00:09+09:00 Subject: Re: Golfing a signature. de-obfuscated it a bit to understand it :) L = 0.3 # % of # s = 20 # size o = "#" f = " " c = nil b = ([nil]*s).map{ (0..s).map{ (rand < L) ? o : f } }; $> << "\e[2J"; until c==b; $> << "\e[H" << b.map{|x|x * " "} * "\n" c = b.map{|z| z.dup }; b.each_index{|y| b[y].each_index{|x| q = -1..1 z = [] q.map{|dx| q.map{|dy| z << [dx,dy]}}; z -= [[0,0]] n = ( z.map{|dxy| c[y + dxy[0]][x + dxy[1]] rescue nil } - [f,nil] ).size if b[y][x]==o b[y][x] = f if (n>3||n<2) else b[y][x] = o if n==3 end } } sleep 0.2 end some ways i found to decrease the size: remove "-[[0,0]]" and change the condition to (n>4||n<3) to account for the +1 "rescue f" over "rescue ()", and -[f] over -[f,nil] possible bug here though: c[i+x[0]][e+x[1]] take i=e=0 and x=[-1,-1], this results in c[-1][-1] which is bottom-right, i don't think this is what you want (unless i misunderstood the 'game').