A cute little toy about Evolution.

Submitted by MrWigggles on Tue, 2013-10-29 23:06

So the toy below is a Dice Snake living in a most cruel world. Only dice snake made out of pairs of number can breed and be successful.

So yea. +snake < the length of the snake >

The game is suppose to show that Evolution doesn't work on blind chance even though it has random elements part of it process. Generally select numbers between 5-20. The longer the snake, the longer the toy takes.

@@ Snake Toy (#12101)
@create Snake Toy
&CMD-SNAKE Snake Toy=$+Snake *:@assert and(if(gt(before(%0,.),0),mul(before(%0,.),-1),before(%0,.)),xget(%VC,dat-engage))={@trigger %VC/loop-evo=%0;&dat-start %VC=%0;&dat-secs %VC=secs();@remit %L=EVOLUTION IS HAPPENING! It might take some time.;&dat-engage %VC=1;@remit %L=<\;[iter(lnum(1,%0),\[[die(1,5)]\])]%R%R...Time Passes...};@remit %L=EVOLUTION IS HAPPENING. YOU MUST WAIT BEFORE IT CAN HAPPEN AGAIN!
&DAT-ENGAGE Snake Toy=0
&DAT-GEN Snake Toy=1
&DAT-LSUC Snake Toy=
&DAT-SECS Snake Toy=
&DAT-START Snake Toy=
&DAT-SUC Snake Toy=
&DESCRIBE Snake Toy=This is a command that sends a poor dice snake to breed and evolved in the most cruel of worlds... In this world, only dice snakes made out of matching pairs can be successful.%R%R+snake <# of dice segments for the snake> (Dont be ass, only send in numbers.) And it does take some time to evolve a dice snake. The longer the segments, the longer it'll take.
@set Snake Toy/DESCRIBE=no_command visual prefixmatch public nearby
&LOOP-EVO Snake Toy=@assert eq(die(1,6),die(1,6))={&dat-gen %VC=inc([xget(%VC,dat-gen)]) ; @trigger %VC/loop-evo=%0};&dat-suc %VC=u(u-suc);@remit %L=u(u-dis,sub(%0,1)); @trigger %VC/loop-evo1=%0
@set Snake Toy/LOOP-EVO=visual
&LOOP-EVO1 Snake Toy=@assert eq(%0,2)={@trigger %VC/loop-evo=[sub(%0,1)];&dat-gen %VC=inc(xget(%VC,dat-gen))};@trigger %VC/trig-mes;@trigger %VC/trig-cleaning
@set Snake Toy/LOOP-EVO1=visual
&TRIG-CLEANING Snake Toy=&dat-lsuc %VC=[xget(%VC,dat-suc)] ; &dat-gen %VC=1 ; &dat-start %VC= ; &dat-secs %VC= ; &dat-suc %VC= ;&dat-engage %VC=0
&TRIG-MES Snake Toy=@remit %L=%R%R<:[repeat(\[[ansi(r,6)]\],xget(%VC,dat-start))]%R%RIt took [xget(%VC,dat-gen)] generations and [sub(secs(),xget(%VC,dat-secs))] seconds to gain a successful dice snake.%RFor it to happen in a single generation would be 1 out of [mul(xget(%VC,dat-start),36)].%RBeneficial mutations accrued at generations\; [itemize(xget(%VC,dat-suc))].
&U-DIS Snake Toy=%R[sub(first(xget(%VC,dat-suc)),elements(xget(%VC,dat-suc),2))] generations in fact...%R%R<:[repeat(\[[ansi(r,6)]\],sub(xget(%VC,dat-start),%0))][iter(lnum(1,%0),\[[die(1,5)]\])]%R%R...TIME PASSES...
&U-SUC Snake Toy=[trim(xget(%VC,dat-gen)%B[xget(%VC,dat-suc)])]
&vc snake toy=num(snake)
@set snake toy=!no_command