frog

echolinefrog.rca3bde1111 years agoHistory
NameLast commit messageLast commit date
acc
acc.c
change
change.c
frog
frog.c
frog.dat
frog.rc
frog.sh
mkfile
README.md
README.md

this is a plan9 program.

a frog can jump up to one foot in any direction. what is the probability after N jumps that the frog is within one foot of its starting point?

so here are these three naive C programs:

frog.c - a frog simulator

acc.c - an accumulator that checks the landing position of the frog

change.c - stops when the accumulator is not changing any more

and a shell script:

frog.sh - to run all this crap for weeks and weeks

some results can be found in frog.dat if one does not wish to bog down one's computer. there are, of course, better ways to do this...