moving thru the text as random walk
the input text is a straight line
random walk output always +/-1 of the straight line
which means that the input sequence is always broken
and for input=output the sequence must be broken back
in this way, the more deviant the more normal the text
nervous or drunken
<form action="randomwalk.php" method=post>
<input type=hidden name=action value=send>
<input type=submit><br>
<textarea rows=11 cols=70 name=str></textarea><br>
</form>
<?php
$str = $_POST['str'];
if ($str and $_POST['action'] == 'send') {
$iterate=strlen($str)*3;
for ($i=0;$i<$iterate;$i++) {
if (mt_rand(0,2)) $r++;
else $r--;
if ($r<0) $r=0;
if ($r>=strlen($str)) $r=strlen($str)-1;
print $str{$r};
}
}
?>
...realizing that the output should iterate square times more to probably
get the whole text out...
...shit i realize it's not going fast enough thru, where you arein theend
is just the net diff, bias of the random walk, but i want it to always
move forward _and then_ +/- 1...
...something obviously wrong here ...
ok, i'll just do the bias myself, odds 2/3 for going forward, odds 1/3
backward
and at the same time iterate 3 x stringlength instead of square...
ovovinivingngngng gng thrhru t thehthe e t t e eht u the e texet text
as s raranarananandnaranandomomom m walklalalk t k ththt thehthehehe
input tetext is s a s a straraightht thghghgiaigiarartraight ththt
line rar randodomom walk outuoutuo oututptptpuputut a alwaways +/+/+ s
+ +/+/+/-/-1 1 o 1-1 1-1-1-/-1 ofof t f f t the e s e straightht
linenenininene eninine which meanananaeananansns thahtht tht ththatat
theheht t t t t thehththehthe ininpuputututututut ses s s s t
sequqequeueuence e i isisisis a sis a a alwlwayawawawlalwlways b b b s
broroken anand for ini ininpnpnpupni i i
ininput=o=o=ouo=t=o=outputuput t tut the e e seqeseququenence mumust
tst bebe e e b brbrokoken b nen b n n bacaback inin this way, , the
momom more deviviaianaiviviviaiantnt the ehe ehe m m m momore n n n
nonorormal l the t text nervrvouovrvrenenervovrervrvrvous oro oro sus
or d drdrunununkeknkenennnekekennnneneken
--~--~---------~--~----~------------~-------~--~----~
-~----------~----~----~----~------~----~------~--~---