Randomness
From Maze
(Difference between revisions)
(→The Emergence of Randomness in Computing) | (moved audible example into randomness and the arts) | ||
| Line 17: | Line 17: | ||
In 1913, the French artist Marcel Duchamp made a strong statement with Three Standard Stoppages. He dropped three meter-long pieces of string from the height of one meter and let gravity and wind dictate the paths of the twisting string downward. He then adhered the string and recorded the shape by cutting it out of wood to make a new measurement. This act challenged the meter as a standard measurement and allowed Duchamp to construct his own standards as a parody of rational science and to undermine the authority of the meter. He wrote about the piece in 1914 that the falling thread distorts “itself as it pleases” and the “3 standard stoppages are the meter diminished.” On his use of randomness, Duchamp said, “Pure chance interested me as a way of going agains logical reality.” Duchamp was active within the Dada, and arts movement that reacted to the horrors of World War I with satire and absurdity. In the words of the Dada musician Gabrielle Buffet-Picabia, “Dada wished to destroy the reasonable frauds of men and recover the natural, unreasonable order. Dada wished to replace the logical nonsense of the men of today with an illogical nonsense.” To Jean (Hans) Arp, a Dada artist, individual authorship was synonymous to authoritarianism and random elements were used to liberate the work. | In 1913, the French artist Marcel Duchamp made a strong statement with Three Standard Stoppages. He dropped three meter-long pieces of string from the height of one meter and let gravity and wind dictate the paths of the twisting string downward. He then adhered the string and recorded the shape by cutting it out of wood to make a new measurement. This act challenged the meter as a standard measurement and allowed Duchamp to construct his own standards as a parody of rational science and to undermine the authority of the meter. He wrote about the piece in 1914 that the falling thread distorts “itself as it pleases” and the “3 standard stoppages are the meter diminished.” On his use of randomness, Duchamp said, “Pure chance interested me as a way of going agains logical reality.” Duchamp was active within the Dada, and arts movement that reacted to the horrors of World War I with satire and absurdity. In the words of the Dada musician Gabrielle Buffet-Picabia, “Dada wished to destroy the reasonable frauds of men and recover the natural, unreasonable order. Dada wished to replace the logical nonsense of the men of today with an illogical nonsense.” To Jean (Hans) Arp, a Dada artist, individual authorship was synonymous to authoritarianism and random elements were used to liberate the work. | ||
| − | Within the twentieth century, John Cage is most responsible for promoting random processes within the arts. Cage was strongly influenced by Duchamp. From Cage's point of view, random elements can remove individual bias from creation; they may be used to go beyond the limitations of the taste and bias through “chance operations”. In additional to his work as a composer following these ideas, Cage influenced generations of artists through his writing, lectures, and classes. In this text “Experimental Music”, Cage wrote, “Those involved with the composition of experimental music find ways and means to remove themselves from the activities of the sounds they make. Some employ chance operations, derived form sources as ancient as the Chinese Books of Changes, or as modern as the tables of random numbers used also by physicists in research.” [Cage 66, p. 10] [Note: Earle Brown used the following random sampling number tables: "M.G. Kendall and B. Babington Smith, A Table of Random Sampling Numbers. Tracts for Computers no. 24. (Cambridge, UK: Cambridge University Press, 1939)."] Cage's style of random composition was to create a system of parameters, then leave the results to circumstance. Cage explained, “This means that each performance of such a piece of music is unique, as interesting to its composer as to others listening. It is easy to see again the parallel with nature, for even with leaves of the same tree, no two are exactly alike.” [Cage 66, p. 11] Random components are used to transform a single composition into a space of potential compositions. Over the decades, Cage used an array of techniques to insert unexpected elements into this compositions. He defines the range of techniques used by himself and his contemporaries in the 1958 lectures “Composition as Process”. There are generally two methods for utilizing random values – using them at the time of composition to define the work, or to allow for variation while the work is performed. This second category of is most similar to 10 Print, where the random decisions are made during the programs execution, or to say it a different way, while the instructions are performed by the C64 operating system. | + | * Parallel Audible Example |
| + | |||
| + | In addition to the visual arts, randomness has a place in music as well. To musicians such as Douglas Cope, who make generative music, randomness serves as an accompaniment to the structure of a piece. To keep things simple, we have constructed an audible clone of 10Print which interested readers may like to type in and try out. It takes many more lines than 10Print because the C64 was never endowed with specific BASIC commands for making sound and graphics. The heart of this program is lines 35-75. RND(1) is used to select whether a C or F# note is played. After entering the program and typing RUN, the listener will hear a sequence of evenly-spaced alternating notes, similar to how 10Print displays evenly-spaced alternating / and \ symbols. Of course, the stream of audio does not have a "wrap" function like the terminal does, so there is no means for a "maze" to appear. Readers can judge for themselves, however, what kind of equivalences there are between the visual and audible version of the program. | ||
| + | |||
| + | <blockquote> | ||
| + | 10 poke 54296,15:poke 54277,190:poke 54278,248 | ||
| + | 31 a(0)=17:a(1)=37:a(2)=21:a(3)=76 | ||
| + | 35 q=int(.3+rnd(1)*1):print q | ||
| + | 40 poke 54273,a(q*2):poke 54272, a(q*2+1) | ||
| + | 50 poke 54276,17:for t=1to15:next | ||
| + | 70 poke 54276,16:for t=1to15:next | ||
| + | 75 goto 35 | ||
| + | </blockquote> | ||
| + | |||
| + | Continuing on with the musical interpretations, it is important to mention John Cage. Within the twentieth century, John Cage is most responsible for promoting random processes within the arts. Cage was strongly influenced by Duchamp. From Cage's point of view, random elements can remove individual bias from creation; they may be used to go beyond the limitations of the taste and bias through “chance operations”. In additional to his work as a composer following these ideas, Cage influenced generations of artists through his writing, lectures, and classes. In this text “Experimental Music”, Cage wrote, “Those involved with the composition of experimental music find ways and means to remove themselves from the activities of the sounds they make. Some employ chance operations, derived form sources as ancient as the Chinese Books of Changes, or as modern as the tables of random numbers used also by physicists in research.” [Cage 66, p. 10] [Note: Earle Brown used the following random sampling number tables: "M.G. Kendall and B. Babington Smith, A Table of Random Sampling Numbers. Tracts for Computers no. 24. (Cambridge, UK: Cambridge University Press, 1939)."] Cage's style of random composition was to create a system of parameters, then leave the results to circumstance. Cage explained, “This means that each performance of such a piece of music is unique, as interesting to its composer as to others listening. It is easy to see again the parallel with nature, for even with leaves of the same tree, no two are exactly alike.” [Cage 66, p. 11] Random components are used to transform a single composition into a space of potential compositions. Over the decades, Cage used an array of techniques to insert unexpected elements into this compositions. He defines the range of techniques used by himself and his contemporaries in the 1958 lectures “Composition as Process”. There are generally two methods for utilizing random values – using them at the time of composition to define the work, or to allow for variation while the work is performed. This second category of is most similar to 10 Print, where the random decisions are made during the programs execution, or to say it a different way, while the instructions are performed by the C64 operating system. | ||
<del>In Cage's Music of Changes (1951) and Earle Brown's Indices (1954/57) random values are used to create a fixed composition. Cage used the I-Ching (Book of Changes) to determine among other elements. He flipped three coins six times to determine the hexagram ??? [Note: I stopped writing this section for fear of too much irrelevant detail.]</del> | <del>In Cage's Music of Changes (1951) and Earle Brown's Indices (1954/57) random values are used to create a fixed composition. Cage used the I-Ching (Book of Changes) to determine among other elements. He flipped three coins six times to determine the hexagram ??? [Note: I stopped writing this section for fear of too much irrelevant detail.]</del> | ||
| Line 87: | Line 101: | ||
Patterns in these data are way behind the abilities of humans to predict in our heads, and are even difficult for many computers to suss out. | Patterns in these data are way behind the abilities of humans to predict in our heads, and are even difficult for many computers to suss out. | ||
| + | * How the number is actually generated | ||
| + | |||
But normally, digital orderliness is the rule. It is at least true for the chip (MOS6510) running the Commodore 64’s BASIC interpreter, as well as the chip running the original BASIC interpreter at Dartmouth. The next section will talk about the harnessing of randomness. | But normally, digital orderliness is the rule. It is at least true for the chip (MOS6510) running the Commodore 64’s BASIC interpreter, as well as the chip running the original BASIC interpreter at Dartmouth. The next section will talk about the harnessing of randomness. | ||
Reliability of the randomness. Point out that pseudo-randomness is not bad or inferior. | Reliability of the randomness. Point out that pseudo-randomness is not bad or inferior. | ||
| − | Although random numbers seem to against the concept of predictability, it turns out it's hard to generate numbers that are extremely predictable. The Commodore 64 has several ways of making random numbers. The RND function supplies two, and the sound chip supplies another. | + | Although random numbers seem to against the concept of predictability, it turns out it is difficult to generate numbers that are extremely predictable. The Commodore 64 has two ways of making random numbers. The RND function in BASIC supplies two official means, while programmers have discovered several others, including using the sound chip and writing their own randomization algorithms. |
| − | |||
| − | * How the number is actually generated | ||
On the Commodore 64, when RND(1) is called. It produces a deterministic sequence of random numbers. | On the Commodore 64, when RND(1) is called. It produces a deterministic sequence of random numbers. | ||
| Line 105: | Line 119: | ||
The original BASIC manual shows that Dartmouth Basic (the first BASIC), had a similar specification for the RND(x) function. It generated a single stream of pseudorandom numbers. Interestingly, it recommends throwing away the first "115" or so numbers. (reference: BASIC_Oct64.pdf, page 45 of PDF, page -39- of original document) | The original BASIC manual shows that Dartmouth Basic (the first BASIC), had a similar specification for the RND(x) function. It generated a single stream of pseudorandom numbers. Interestingly, it recommends throwing away the first "115" or so numbers. (reference: BASIC_Oct64.pdf, page 45 of PDF, page -39- of original document) | ||
| − | LCGs can be reversed! | + | LCGs have some interesting properties. One of them is repeatability. |
The C64 allows offered another way of doing it: RND(0). This uses the timer as a random number generator. | The C64 allows offered another way of doing it: RND(0). This uses the timer as a random number generator. | ||
| Line 125: | Line 139: | ||
| − | * Is this similar to how it sounds? Visual equivalence | ||
| − | Two note example | ||
| − | <blockquote> | ||
| − | 10 poke 54296,15 | ||
| − | 20 poke 54277,190 | ||
| − | 30 poke 54278,248 | ||
| − | 31 a(0)=17:a(1)=37:a(2)=21:a(3)=76 | ||
| − | 35 q=int(.3+rnd(1)*1) | ||
| − | 36 print q | ||
| − | 40 poke 54273,a(q*2):poke 54272, a(q*2+1) | ||
| − | 50 poke 54276,17 | ||
| − | 60 for t=1to15:next | ||
| − | 70 poke 54276,16 | ||
| − | 71 for t=1to15:next | ||
| − | 75 goto 35 | ||
| − | </blockquote> | ||
