Randomness

From Maze

(Difference between revisions)
Jump to: navigation, search
Line 1:Line 1:
 +
Introduction
 +
 +
Does carefully applied randomness help everything run smoothly? Does the extension of random methods into the home through home computing and its accompanying literacy campaign constitute a defeat of the unpredictable? What does randomness mean in art? This chapter scrutinizes the meaning of random beginning with its entrance into our language, its use in the fields of science, art, and eventually its inversion of meaning from unknown into mundane.
 +
=== ===
=== ===
Line 52:Line 56:
the protocol called Ethernet, which is familiar to us today in the form of CAT-5 cables for office computers and in wireless form from our laptops.
the protocol called Ethernet, which is familiar to us today in the form of CAT-5 cables for office computers and in wireless form from our laptops.
−
Carefully applied randomness helps everything run smoothly. This is necessary in an Ethernet network whic h operates in some ways like a dinner conversation in that every single computer on the network can potentially try to talk at once. Other network protocols ensure that each computer gets a predictable time slot to speak, but Ethernet works differently. It has a means to determine if two machines have accidentally "spoken over" each other. Much like a human conversation, this one speaker must yield to the other. In the human word, such conflicts are sometimes embarrassing, awkward, or funny, and usually some kind of social rule will decide who gets to speak. For example, perhaps the elder speaker or the loudest one gets to talk. In Ethernet, there is no such hierarchy. Instead, each computer simply flips a coin and decides randomly whether or not to try to talk again. Of course, half of the time, this will not resolve the conflict, and they will have to do it again, and the process will repeat.
+
Carefully applied randomness helps everything run smoothly. This is necessary in an Ethernet network which operates in some ways like a dinner conversation in that every single computer on the network can potentially try to talk at once. Other network protocols ensure that each computer gets a predictable time slot to speak, but Ethernet works differently. It has a means to determine if two machines have accidentally "spoken over" each other. Much like a human conversation, this one speaker must yield to the other. In the human word, such conflicts are sometimes embarrassing, awkward, or funny, and usually some kind of social rule will decide who gets to speak. For example, perhaps the elder speaker or the loudest one gets to talk. In Ethernet, there is no such hierarchy. Instead, each computer simply flips a coin and decides randomly whether or not to try to talk again. Of course, half of the time, this will not resolve the conflict, and they will have to do it again, and the process will repeat.
=== Computational Randomness in Aesthetic Design ===
=== Computational Randomness in Aesthetic Design ===
Line 80:Line 84:
An important feature of computing is the opposite of randomness, regularity. Computer chips differ greatly from the outer world in their orderliness. Unlike our beaches or the bumpy landmasses with weather on which we build our houses, the world inside chips is meticulously fabricated, symmetrical, isolated and predictable. In fact, its basis is one massive crystal grown from purified silicon. It is so perfect that it is difficult to create unanticipated behavior.
An important feature of computing is the opposite of randomness, regularity. Computer chips differ greatly from the outer world in their orderliness. Unlike our beaches or the bumpy landmasses with weather on which we build our houses, the world inside chips is meticulously fabricated, symmetrical, isolated and predictable. In fact, its basis is one massive crystal grown from purified silicon. It is so perfect that it is difficult to create unanticipated behavior.
−
As randomness in the home computer market transitioned from being a mere source of artificial surprise into practical security applications, computer chips were designed with modules designed to encourage random amounts of heat energy to influence their silicon junctions to hasten the creation of unpredictable data. This is part of the essence of encryption - the production of obscurata.
+
As randomness in the home computer market transitioned from being a mere source of artificial surprise into practical security applications, computer chips were designed with modules designed to encourage random amounts of heat energy to influence their silicon junctions to hasten the creation of unpredictable data. To those who believe all security is security through obscurity, this is part of the essence of encryption - the production of obscurata.
−
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.
+
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.
 +
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.
−
* Prg in User guide demo of biasing randomness
+
Reliability of the randomness. Point out that pseudo-randomness is not bad or inferior.
−
Above, it was suggested to the reader to try out the program
+
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.
−
<blockquote>
+
* How the number is actually generated
−
10 PRINT CHR$(205.9+RND(1));: GOTO 10
 
−
</blockquote>
 
−
Structurally, it's identical to 10 PRINT. Internally, one number has changed. Changing the bias makes the program more likely to print out / than \. This disrupts the subtle equilibrium needed to produce a convincing maze output.
+
On the Commodore 64, when RND(1) is called. It produces a deterministic sequence of random numbers.
 +
The algorithm used to do this a linear congruential generator with some extra byte-swapping taking place.
 +
The linear congruential generator (LCG) was proposed by Lehmer in 1949. It begins with a common seed, and nearly every C64 in the world will respond the same way to the maze program because they all rely on this mode of random number generation.
−
This lesson was not documented here first. It is from the Commodore 64 User's Guide, a spiral-bound volume the size of a paperback which came with every store-bought Commodore 64. It gives try-as-you-go examples which teach the reader how to use the Commodore 64, with ample space devoted to BASIC programming. This is especially significant, considering that Commodore, a tightly-run company provided such thorough documentation, when minimal resources were dedicated toward the improvement of BASIC from previous version.
+
Commodore inherited this from Dartmouth BASIC?
−
 
−
 
−
intrestingly enough, they thought this would be a good idea to teach in the C64 User Guide.
 
−
 
−
 
−
* Use to explain to reader how randomness works, what it's good for
 
−
 
−
Early definitions of randomness suggested urgency or fear and predate widespread computation. Their grounding in external events stood ground alongside the spread of Cartesian thought.
 
−
 
−
So now that randomness starts to become a controllable, recognizable pattern to millions of home computer users, it can be used to help interpret the world. It can explain the concept of bias, which is part of democratic processes such as polls and elections. Randomness also helps explain more complex concepts such as insurance and tragedy.
 
−
 
−
Inside the home computer, similar to its function in the arts, randomness adds unpredictability to otherwise repetitive processes.
 
−
 
−
In the salad days of home computing, approximately
 
−
In my own memories from 1984 and beyond, RND was most often used to improve the quality of games. For example, in my endless clones of Breakout!, RND chose where the ball would drop into the game, how much it would wiggle through the air, and helped make the sound of the bricks exploding. It made the game a little bit different each time and more challenging
 
−
 
−
With a large percentage of the natural world governed by events which can be characterized and in some times predicted, the use of randomness can also serve as a means of interpretation of the world. For example, in scientific pursuits, such as Van Neuman's design of atomic bomb, randomness is used to characterize natural, to predict the interactions of high-energy particles.
 
−
 
−
Van neuman's early use of computer-generated random number generatoration has steadily grown into electronic devices which today can generate random series with measurability improved characteristics.
 
−
Although random numbers seem to against the concept of predictability, it turns out it's hard to generate numbers that are extremely predictable. Techniques have improved since the time of Neumann. The Commodore 64 has several ways of making random numbers. The RND function supplies two, and the sound chip supplies another.
 
−
 
−
 
−
 
−
* How the number is actually generated,
 
Dartmouth
Dartmouth
Line 125:Line 106:
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)
−
C64
+
LCGs can be reversed!
−
RND(0) Uses the timer as the random number generator
+
The C64 allows offered another way of doing it: RND(0). This uses the timer as a random number generator.
−
 
−
RND(1) is a deterministic sequence of random numbers
 
−
it is a linear congruential generator with some extra byte-swapping taking place.
 
−
* reliability of the randomness,
+
* How Randomness Works, what it's good for
−
The linear congruential generator (LCG) was proposed by Lehmer in 1949.
 
−
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.
+
Inside the home computer, similar to its function in the arts, randomness adds unpredictability to otherwise repetitive processes.
 +
 +
Early definitions of randomness suggested urgency or fear and predate widespread computation. Their grounding in external events stood ground alongside the spread of Cartesian thought.
 +
 +
So now that randomness starts to become a controllable, recognizable pattern to millions of home computer users, it can be used to help interpret the world. Randomness also helps explain concepts like lotteries, insurance. It can explain the concept of bias, which is part of processes like polls, lotteries and elections.
 +
 +
With a large percentage of the natural world governed by events which can be characterized and in some times predicted, the use of randomness can also serve as a means of interpretation of the world. For example, in scientific pursuits, such as Van Neuman's design of atomic bomb, randomness is used to characterize nature, specifically to predict the interactions of high-energy particles.
 +
 +
Van Neuman's early use of computer-generated random number generation has steadily extended into electronic devices which today generate random series with measurably improved characteristics.
 +
 +
Techniques have improved since the time of Neumann.
−
* Point Out that psuedo randomness is not bad or inferior
+
* 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>
−
* alternative methods of finding randomness within the C64.
+
* Alternative methods of finding randomness within the C64.
Assembly routine (Ian)
Assembly routine (Ian)
Line 158:Line 160:
 +
SID Noise
 +
It was possible on the C64 to get random values from the Sound Interface Device (SID) chip. Reading from register 27 (decimal) returns the current value of oscillator 3. If it's set to noise, you get a random number generator.
It was possible on the C64 to get random values from the Sound Interface Device (SID) chip. Reading from register 27 (decimal) returns the current value of oscillator 3. If it's set to noise, you get a random number generator.
Line 167:Line 171:
−
 
−
 
−
 
* Use multiple seeds, then SID register random
* Use multiple seeds, then SID register random
−
 
Line 177:Line 177:
−
* Is this similar to how it sounds? Visual equivalence
 
* Develop three or four one-liners
* Develop three or four one-liners
* User/programmer side
* User/programmer side
−
* Two note example
+
 +
 +
 +
* Prg in User guide demo of biasing randomness
 +
 +
Above, it was suggested to the reader to try out the program
 +
 +
<blockquote>
 +
10 PRINT CHR$(205.9+RND(1));: GOTO 10
 +
</blockquote>
 +
 +
Structurally, it's identical to 10 PRINT. Internally, one number has changed. Changing the bias makes the program more likely to print out / than \. This disrupts the subtle equilibrium needed to produce a convincing maze output.
 +
 +
This lesson was not documented here first. It is from the Commodore 64 User's Guide, a spiral-bound volume the size of a paperback which came with every store-bought Commodore 64. It gives try-as-you-go examples which teach the reader how to use the Commodore 64, with ample space devoted to BASIC programming. This is especially significant, considering that Commodore, a tightly-run company provided such thorough documentation, when minimal resources were dedicated toward the improvement of BASIC from previous version.

Revision as of 04:50, 6 May 2011

View this revision of Randomness.

Personal tools