# Some Java applets written by Jeffrey Rosenthal

Hi there! Click on the names below to view the corresponding applet. And please e-mail me with any feedback that you may have. Remember, "An applet a day keeps the doctor away!"

See also the Markov chain applets below, and my cartoon series.

NOTE: Unfortunately, most browsers no longer support Java applets; see my notes about that. Hence, more recently, I have instead written some related JavaScript pages.

## Games: soccer, tennismatch, and spacetag.

My soccer applet simulates a one-on-one (or three-on-three) soccer (football) match. At what level can you beat the computer?

My tennismatch applet lets you interactively play tennis against a computer opponent. Depending on your monitor and pixel size, you may prefer the large size, medium size, or small size. Also available is a (large-sized) tennis practice applet, where you can hit the ball against a wall to improve your control.

My spacetag applet (my favourite, including a cash prize!) is a space game, where you fly around in a green ship and come across planets, space stations, bad guys, etc. It is available in large size, medium size, or small size, or alternatively as a jar file. See also the instructions.

## Science simulations: evolution, manymoons, random walk, frogwalk, ehrenfest, buckets, uncunx, poisson, voting.

My evolution applet simulates the evolution of four amoebas into more powerful amoebas, in a "survival of the fittest" scenario.

My manymoons applet simulates a (randomly initialized) collection of N moons, circling each other under the influence of gravity. (Here is the corresponding source code.) Also available are a (periodic) two-body version and a (rather unstable) three-body version.

My random walk applet illustrates simple random walk, together with the famous "gambler's ruin" problem of classical probability.

My buckets applet illustrates the pouring of water into a triangular array of buckets -- sort of like Pascal's Triangle, but trickier.

My frogwalk applet simulates a 1/3,1/3,1/3 random walk on a discrete circle.

My uncunx applet illustrates that generalised quincunx device described in this paper.

My poisson applet illustrates that even if dots are placed uniformly at random, various "patterns" will seem to appear ("Poisson clumping").

## Markov chain Monte Carlo (MCMC) simulations:exp, unif, slice, cftp, metropolis, and pointproc.

My first Markov chain simulation applet is "exp", which simulates a one-dimensional independence sampler Markov chain with exponential target distribution. This Markov chain was used as an example in a research paper, and is related to my research.

A second Markov chain applet is "unif". It simulates a one-dimensional Metropolis sampler Markov chain with exponential target distribution and uniform proposal distributions. Would you trust this sampler's results?

A third Markov chain applet, "slice", simulates a one-dimensional slice sampler. See how the chain's convergence properties depend on the nature of the target distribution.

A fourth Markov chain applet, "cftp", simulates a "coupling from the past" algorithm. See how to obtain an exact sample from a distribution, using only a Markov chain for which the distribution is stationary.

My fifth and most useful Markov chain applet, "metropolis", shows a simple random-walk Metropolis MCMC algorithm, including an adaptive option. Also available as a jar file, or as a related JavaScript version.

Another Markov chain applet, "pointproc", runs a Metropolis-within-Gibbs algorithm on a spatial point process.

See also my finance-related applet "option", which uses a Monte Carlo algorithm to estimate the maximum of a stock price over a time interval.

## Computer Vision

I have recently gotten interested in problems in Computer Vision. See my "faces" computer vision applet and the related research paper.

## Animation: The Space Adventures of Dr. J

I've also created a Java animation series, The Space Adventures of Dr. J. Enjoy!

There is also a Java applet of my Galactic Peace interactive fiction game.

### Animated Gifs

I have also experimented with creating animated gifs. I created the above rotating maple leaf with the help of the software whirlgif, which I installed on utstat.toronto.edu as /u/jeff/bin/whirlgif (with documentation at /u/jeff/bin/whirlgif.doc). To create the bouncing baton on the right, I also used the C package gd1.2.
I recently collected some statistics-related applets from the Web, for my university's open day on Oct. 4, 1997.

Many thanks to Alan Rosenthal for helping me to get started with Java programming. Thanks to Gamelan, Bonus.com, TSN, Rochester's Jungle, zeeks.com, a Greek site, a Mexican site, a Japanese site, another Japanese site, The Valley, The Football Links, Web Arena, and the MCMC Preprint Service for linking to my applets in the past (they've mostly stopped now). See also my policy regarding the use of my applets on your web site.
[contact me / Computing Page / Nonwork Page / Home Page]