## 2D Random Walk and a Drunk Mathematician

July 9, 2021

The random walk is a way to create a path based on random decisions at junctions. If you’ve played a procedurally generated video game, including major examples like Minecraft and Stardew Valley as well as cult favorites like Spelunky and Dwarf Fortress, you’ve encountered a random walk in the form of a dungeon or terrain made this way in the programming. More @ Popular Mechanics

2D Random Walk math helps game programmers to plot interesting pathways in games like Minecraft Dungeons. (above)

# Plot a 2D Random Walk

There are 4 choices:

UP, DOWN, LEFT, RIGHT

Note: This 2D random walk is limited to a 1-unit step length and right angles turns.

Set the Random Number Spinner here to 4 and generate 8 random moves of 1 unit and plot the moves on the worksheet(below).

1  up

2  down

3  right

4  left

Printable Worksheet:

Here are 5 X 8 step 2D Random Walks.

These 2D Random Walks do not look like the path taken by a drunk mathematician.

# Drunken Mathematician

This looks like a drunken mathematician and the 2D Random Walk for a drunk mathematician would look like pathways shown below with variable step lengths and turns from 0-360°.

All Random Walks can be mathematically modeled. eg. Go to MIT here. This math can be quite complicated (See here.) But all we want to do is plot the 2D Random Walk to see random numbers in action.

## Holiday Music: The Random Playlist & Not so Random Math

June 18, 2021

USE The Random Number Spinning Wheel HERE

Here’s Mathspig’s Play List with links:

1. Angie McMahon, Melb, AUS      Pasta

2. San Cisco, WAust                      Skin

3. Go Get Mum, Melb, AUS           Phone, Key, Wallet

4. Shirley Kovacs, Netherlands      Sound of the Underground

5. The Teskey Brothers, Vic           Hold Me

6. The Dead South, Canada           In Hell I’ll Be in Good Company

7. The Staves, UK                           The Long Run

8.  Cat Clyde, Canada                     Mama Said

9. Mojo Juju, Melb, AUS                  Train Along the Hawkesbury

10. Marlon Williams, NZ                   Hello Miss Lonesome

11. Syzygy, Melb, AUS                      The Pendulum

12. Vampire Weekend, USA              Harmony Hall

## Don’t Play It Again Sam! The iPod, iPad & iPhone Shuffle

March 31, 2009

Here is an example of Gambler’s Fallacy, but for non-gamblers.

We see – in this case – hear a pattern and then attribute meaning to this pattern  – It’s a conspiracy!!!! – when there is no pattern and no meaning!!!!! So Apple found when designing their iPod shuffle feature later on the iPad and iPhone.

“When Apple first introduced the shuffle feature on its iPods, the shuffle was truly random; each song was equally likely to be picked than any other. However, the randomness didn’t appear random, since some songs were occasionally repeated, and customers concluded that the feature contained some secret patterns and preferences. As a result, Apple was forced to revise the algorithm. ‘We made it less random to make it feel more random,’ said Steve Jobs, the CEO of Apple’

p68 The Decisive Moment How the Brain Makes Up Its Mind Jonah Lehrer (Text Publishing 2009)

Try it. Pick 12 songs maybe off your playlist  – Your MP3 player, perhaps or a Top 20 Chart or Top 20 Downloads Chart – assign each song a number: 1, 2, 3….up to 12. Take two dice (Diehards Note:  It’s 1 die, 2 dice) and roll.

How many throws until you get 2 songs played in a row?