Frog Walk javascript program, by Jeffrey Rosenthal, related to this book. Description at the bottom.
This program simulates the "frog walk" Markov chain: on each step it either stays still, or moves one space clockwise, or one space counterclockwise, each with probability 1/3. The frog's current position is shown in green. Keyboard shortcuts (you might need to click on the canvas first): '0-9' to change the simulation speed ('1' for one-step-at-a-time), or '+' or '-' to increase/decrease the number of states shown, or 'p' or 'm' to increase/decrease the current state, or 'r' to restart. This program is written by Jeffrey Rosenthal. See also my other JavaScript, my Stochastic Processes book, and my Java Applets.
This program simulates the "frog walk" Markov chain: on each step it either stays still, or moves one space clockwise, or one space counterclockwise, each with probability 1/3. The frog's current position is shown in green. Keyboard shortcuts (you might need to click on the canvas first): '0-9' to change the simulation speed ('1' for one-step-at-a-time), or '+' or '-' to increase/decrease the number of states shown, or 'p' or 'm' to increase/decrease the current state, or 'r' to restart.
This program is written by Jeffrey Rosenthal. See also my other JavaScript, my Stochastic Processes book, and my Java Applets.