We've been making things awfully hard on our spirits. People often make use of an ouija board to communicate with the dead. Ouija consists of a planchette (a small heart-shaped piece of wood or plastic) as a movable indicator and a flat board marked with the letters of the alphabet, the numbers 0-9 and various words, symbols and graphics. Participants place their fingers on the planchette, and it is moved about the board to spell out words that answer questions asked to the spirits. Paranormal and supernatural beliefs associated with ouija have been harshly criticized by the scientific community, since they are characterized as pseudoscience. The action of the board can be parsimoniously explained by unconscious movements of those controlling the pointer, a psychophysiological phenomenon known as the ideomotor effect.
The standard ouija board lays out the alphabet in two stacked rows, which means it's easy for the dead to tell us about FEEDERS, but terribly hard to refer to LAYAWAY, even though these words are equally long.
In the interests of better communication, Eric Iverson made a study about the level of difficulty in spelling certain words. Using an image of the ouija bord, he determined the distance the planchette would have to travel in order to spell out various English words. The results are dismaying: the most exhausting four-letter word (MAMA) requires fully 17 times as much travel as the simple FEED. Longer words are more consistent: the hardest 23-letter word (DISESTABLISMENTARIANISM) requires little more work than the easiest (ELECTROENCEPHALOGRAPHIC). But do dead people have that kind of stamina?
What's the answer? Iverson experimented with different layouts and found a hexagonal grid that minimizes the average travel distance for a typical word (Iverson, 2005). Even rearranging the letters on a standard board to
ZXVGINAROFUPQ
JKWCHTESDLMYB
rather than the standard alphabet increases efficiency by about a third. Now maybe we can have some better conversations.
In this assignment we use the positioning of the letters on the standard ouija board. This means that the letters are layed out in alphabetic order across two rows and thirteen columns, where we index the rows and columns in the following way.
The distance the planchette has to travel from one letter to another letter, is expressed as the total number of horizontal and vertical movements it has to make to neighbouring letters. For example, to move the planchette from the letter D to the letter U, 5 neighbouring movements have to be made. As a result, this distance measure does not take into account the possibility to make diagonal moves. Your task:
Write a function position that takes a letter as its argument. The function must return two integers, that respectively indicate the index of the row and the column where the letter is found on the ouija board.
Write a function shift that takes two letters as its arguments. The function must return the total number of horizontal and vertical movements the planchette has to make to neighbouring letters, in order to travel from the first letter to the second letter on the standard ouija board. This does not take into account the possibility to make diagonal moves.
Write a function ergonomics that takes a single string argument. The function may assume that this string only contains letters. The function must return the total distance the planchette has to travel to visit all letters of the given string in succession, starting at the first letter of the string.
None of these functions may make distinction between uppercase and lowercase letters.
>>> row, col = position('K')
>>> row
0
>>> col
10
>>> row, col = position('q')
>>> row
1
>>> col
3
>>> shift('K', 'q')
8
>>> shift('f', 'e')
1
>>> ergonomics('FEED')
2
>>> ergonomics('MAMA')
36
>>> ergonomics('feeders')
5
>>> ergonomics('layaway')
67
>>> ergonomics('disestablismentarianism')
113
>>> ergonomics('electroencephalographic')
108
When Elijah Bond — patentee of the Ouija board — died in
1921, he was buried in an unmarked grave, and as time passed its
location was forgotten. In 1992, Robert Murch — chairman of the Talking Board Historical
Society1 — set out to find it, and after a 15-year search he did2 — Bond had been buried with his
wife's family in Baltimore rather than with his own in Dorsey, Md.
Murch got permission to install a new headstone and raised the necessary
funds through donations, and today Bond has the headstone below, with a
simple inscription on the front and a Ouija board on the back — in
case anyone wants to talk.