Your final team project will be a simulation of something called a drunkard's walk. (Often this is called a random walk, which is perhaps more politically correct.) In a drunkard's walk, the drunkard starts out at a random point. At each time unit, the drunkard takes one step in a randomly chosen direction. The question is, how far will the drunkard travel after a given number of steps? Of course, the distance traveled will depend on the particular path that the drunkard takes, so we should really ask, what is the average distance traveled by a drunkard after a given number of steps. To investigate this question, you will run a large number of drunkard's walk experiments and compute the average distance traveled. (The drunkard's walk, by the way, is related to more important physical processes such as diffusion and Brownian motion.)
To keep things simple, we will assume that the drunkard's position is given by two int values, x and y. At each step, the drunkard can move in one of eight directions, chosen at random. This will change the values of x and y as shown in the diagram at the right.
To make things more interesting, you will show the user a visual representation of the experiments as they are being run. The visual representation should show how the drunkard moves across the board. Start the drunkard at the center of the board. After the drunkard has completed the specified number of steps, highlight where the drunkard ends up at the end of the walk and calculate the distance traveled.
Remember, the formula for the distance between two points (x1,y1) and (x2,y2) is Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)).
Students are expected to use modern software tools for project management, code review, team collaboration, code hosting, etc. such as GitHub and Slack.
Please turn in the following: