Randomness

From Maze

Revision as of 16:30, 26 March 2011 by CaseyReas (Talk | contribs) (→Computational Randomness in Aesthetic Design)
Jump to: navigation, search

Contents

[hide]

Since chance is hap, the root of happy, it would seem that randomness, a type of chance, might have a happy etymology. Not so. Likely ancestors of the word "random" are found in Anglo-Norman, Old French, and Middle French and include randoun, raundun, raundoun, randon, randun, and rendon -- words indicating speed, impulsiveness, and violence. These earlier words are found beginning around the 12th century and probably derive from randir, to run fast or gallop. Bumper stickers implore drivers to "practice random acts of kindness," but only because people in our culture fear random acts of violence so much that this ingrained phrase can be punned upon -- and at a deeper level, perhaps, because the speed and violence of other vehicles are to be feared. While today it might be harmless for us to encounter "a random" (a person unknown to us, according to the Jargon File) sitting in the computer lab exploring a system at random, a "random encouter" centuries ago was much more likely to resemble a violent random encounter in Dungeons & Dragons. Think, for instance, of a figure on horseback hurtling through a village, trampling and slaughtering whoever he can reach.

In centuries past, before the age of enlightenment, randomness was a nightmare. Throughout its history, the word "random" has had some interesting meanings that became obsolete before the scientific and mathematical meaning became primary. One of these is the degree of elevation of a gun that can be used to maximize the range. Another is the board used by compositors to keep type as pages are made up. These particular randoms, used properly, both kill opponents and facilitate the process of textual composition. The RND found in 10 PRINT operates more in the compositional mode, selecting one of two character graphics for display on the screen via the PRINT command, which was originally made for putting ink on paper. But its presence in the Commodore 64 also has some connections to speed, violence, the military, and laying waste.

[Pre-computer non-aesthetic uses and concepts of randomness. From Newton to quantum mechanics (theology), etc.]

Random elements have played a role through millennia of culture in games of chance and divination. The roll of a die or toss of coin have long foretold the fortunes of men. The birth and proliferation of science engendered a more rational world view. Through Aristotle to Galileo to Newton, classical mechanics defined the universe as a defined system without random actions.

Randomness and Aesthetics Before Computing

[The text formerly here was a mix of notes and paragraphs and not draft yet. I've moved it into Randomness in the Arts notes section.]

The Emergence of Randomness in Computing

The RND command is the algorithmic heart of 10 PRINT, its flip-flip-flopping beat powering the creation of the maze. It is also a paradox. The function of the RND token in 10 PRINT is immediately known yet its output is entirely unknown. Unpredictable. A cipher, the manifestation of a much deeper latent content, operating underneath the surface of the machine.

An obvious question to ask about randomness is why bother at all? Why have the ability in the first place to generate random numbers? Computers are supposed to calculate with exactitude. Computers are supposed to order the world. Computers are supposed to sift through reams of data and model possible outcomes, possible futures.

But it turns out that it’s impossible to function as any kind of calculating machine or simulation without taking into account randomness, a defining feature of life—and the universe for that matter.

Quite simply, randomness is required for any statistical endeavor needing random sampling or tests of probability. And one or two random numbers are not enough. Large-scale statistical calculations or simulations require large batches of random numbers. In her history of humans’ quest for randomness--which Bennett suggests goes as far back as ancient Babylonia (17)--Bennett highlights one the early and largest set of random numbers, the RAND Corporation’s A Million Random Digits with 100,000 Normal Deviates (135). Generated in 1955 “by random frequency pulses of an electronic roulette wheel,” the RAND’s set of random numbers was an important contribution to any study of probability and is still in use today. As the forward to the undated online edition of the table notes:

The tables of random numbers in the book have become a standard reference in engineering and econometrics textbooks and have been widely used in gaming and simulations that employ Monte Carlo trials. Still the largest known source of random digits and normal deviates, the work is routinely used by statisticians, physicists, polltakers, market analysts, lottery administrators, and quality control engineers. (RAND Corporation)

These seemingly benign uses aside, the RAND report ominously explains that its one million random numbers were originally “prepared in connection with analyses done for the United States Air Force” (RAND Corporation). Like so many other advances in computing, randomness, it turns out, is intimately linked to Cold War military strategies. In fact, most of the early work on computer-based random number generation was performed under the auspices of the U.S. Atomic Energy Commission (see, for example, Rotenberg’s work in the late fifties) or the U.S military (such as Green et al’s work at MIT, with joint support of the U.S. Army, Navy, and Air Force).

As Donald Knuth relates in The Art of Computer Programming, John von Neumann was the first to propose the idea of harnessing a computer to generate random numbers (Knuth 3). It was around 1946 and von Neumann was fresh off the Manhattan Project and soon to begin his lead work on the hydrogen bomb. Von Neumann’s solution, for which a computer was to be used, was called the middle-square method. It worked by squaring an initial random number and extracting the middle digits; this number was then squared again, and the middle digits provided a new random number. The disadvantage of this method soon became apparent: because each number is a function of the one before it, the sequence, as Knuth explains, “isn’t random, but it appears to be” (3)--a phenomenon known today as “pseudo-randomness,” which arguably describes any human or machine attempt to generate random numbers.

Knuth gamely admits that his own attempts to generate random numbers through software algorithms—using what he hoped to be a “’super random’ number generator”--failed, though it’s worth noting that he wanted his machine language program “to be so complicated that a man reading a listing of it without explanatory comments would not know what the program was doing” (Knuth 5). It does not take a leap of imagination to see in Knuth’s desire for obscure code an early version of the same kind of mystery residing in 10 PRINT.

To those interested in randomness and expressive culture, perhaps the most intriguing element of Knuth’s magisterial discussion of random number appears in a footnote. Knuth recalls a CBS television documentary in 1960 called “The Thinking Machine” which featured “two Western-style playlets” written by a computer (Knuth, 1969, 158-160). In fact, three playlets were acted out on national television that day in October, 1960, generated by a TX-0 computer housed at MIT’s Electronics Systems Laboratory. As journalist John Pfeiffer noted in a book released two years after the documentary, SAGA II, the script-writing program behind the mini-Westerns, took programmers Douglas Ross and Harrison Morse two months and fifty-five hundred instructions to develop (Pfeiffer, 1962, 130-138). The key to SAGA II were its thirty “switches,” which made “various alternative or branching paths” possible (136). "Among other things,” Pfeiffer observed, “the robber may go to the window and look out and then go to the table, or he may go to the table directly. You cannot tell in advance which one of these alternatives the program will select, because it does the equivalent of rolling a pair of dice” (136).

[General uses of randomness in computing today: random backoff for Ethernet, password generation and security]

Computational Randomness in Aesthetic Design

[An early example of this is a 1960 teleplay "written" by a computer at MIT, and then performed on CBS.]

[Randomness in art/computing appropriates the code/hardware from engineering uses.]

[Perlin Noise]

Nake_Fields.png
2149 × 1890 pixels
Frieder Nake: Fields of rectangular cross hatchings, overlaid by vertical lines. 22/10/65 Nr. 2. Computer drawing, ink on paper, 50 x 44 cm. Collection Etzold, Museum Abteiberg Mönchengladbach. Permission by the artist.

The 1960s were a time for radical experimentation with randomness in the visual arts. Even though computers were an available tool to explore chance operations, they were used in a limited way because of problems of access to the machines and a distrust of technology within the arts. The 10 PRINT program is remarkable because it represents the time when these reasons for not using computers in the visual arts were disappearing; the C64 was relatively inexpensive and designed for home use and the image of the computer was changing from machines that support technocracies to learning and self-empowerment tools.

Before personal computers, however, calculating machines could only be found in universities and research labs and because of the cost and perceived use. They were typically used exclusively for serious work, not for creating aesthetic images. When artists did gain access to these machines it was typically through artists-in-residence programs at companies such as Bell Labs and IBM, and through infrastructure such as Experiments in Art and Technology (E.A.T) based in New York and the Los Angeles County Museum of Art's Art and Technology initiative in Los Angeles. In fact, many of the first aesthetic computer graphics were made not by artists, but by mathematicians and engineers who were curious about the potential for other uses for the machines at their labs.

Within the first years that computer images were made, random processes were explored thoroughly. The first two exhibitions of computer-generated graphics appeared in art galleries in 1965 and both shows included pieces that were created using random values. In New York, the works of A. Michael Noll and Bela Julesz, both researchers at Bell Labs, were exhibited at the Howard Wise gallery from 6-24 April under the title “Computer-Generated Pictures”. In Stuttgart, the works of Georg Nees and Frieder Nake were exhibited at the Wendelin Niedlich Gallery from 5 - 26 November under the title “Computer-Grafik Programme”

[Include footnote about Noll, random, and the patent office.]

Writing with perspective in 1970, Noll highlights randomness as an essential feature of the computer in relation to the arts, “The computer is a unique device for the arts since it can function solely as an obedient tool with vast capabilities for controlling complicated and involved processes, but than again, full exploitation of its unique talents for controlled randomness and detailed algorithms could result in an entirely new medium – a creative artistic medium.”

The C64 and the RND Function

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.

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.


  • Prg in User guide demo of biasing randomness

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

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



  • How the number is actually generated,

Rnd(0) Uses the timer as the 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.


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)


  • reliability of the randomness,

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.


  • Point Out that psuedo randomness is not bad or inferior


  • alternative methods of finding randomness within the C64.

Assembly routine (Ian)

Rand8	
	lda		random				; get seed (must be non-zero)
	asl							; shift byte
	bcc		Rand8.no_eor		; branch if carry flag not set after left shift
	eor		#$CF				; otherwise EOR with literal $CF
Rand8.no_eor
	sta		random				; save number as next seed


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.

5 rem init sid for noise
6 poke 54272+wave, noise
10 print chr$(209.5+peek(54272+osc3read));goto 10



  • Use multiple seeds, then SID register random


  • How it could be used to teach someone randomness/probability


  • Is this similar to how it sounds? Visual equivalence
  • Develop three or four one-liners
  • User/programmer side
  • Two note example


We also synthesize some of the previous sections, and discuss the aesthetic qualities of the 10 PRINT pattern in terms of randomness.

Works Cited

Bennett, Deborah. 1998. Randomness. Cambridge Mass.: Harvard University Press.

Ekeland, Ivar. 1996. The Broken Dice, and Other Mathematical Tales of Chance. University of Chicago Press, June 15.

Felder, H. 1968. The GPSS/360 random number generator. In Proceedings of the second conference on Applications of simulations, 21–28.

Green Jr, B. F, J. E. Smith, and L. Klem. 1959. Empirical tests of an additive random number generator. Journal of the ACM (JACM) 6, no. 4: 527–537.

Isida, Masatugu, and Hiroji Ikeda. 1956. Random number generator. Annals of the Institute of Statistical Mathematics 8, no. 1 (12): 119-126. doi:10.1007/BF02863577. http://www.springerlink.com/content/02510157q12768k4/.

Knuth, Donald E. 1969. The Art of Computer Programming. Vol. 2. Reading, Massachusetts: Addison-Wesley.

Lord, E. A., and S. Ranganathan. 2006. Truchet tilings and their generalisations. Resonance 11, no. 6 (6): 42-50. doi:10.1007/BF02838881. http://www.springerlink.com/content/w1577r5g78rx2033/.

Neumann, John von. 1961. Various Techniques Used in Connection with Random Digits. In Collected Works: Design of Computers, Theory of Automata and Numerical Analysis, ed. A.H. Taub, 5:768-769. Oxford: Pergamon Press.

Pfeiffer, John E. 1962. The thinking machine. Lippincott.

RAND Corporation. 1955. A Million Random Digits with 100,000 Normal Deviates. http://www.rand.org/pubs/monograph_reports/MR1418/index2.html.

Rotenberg, A. 1960. A new pseudo-random number generator. Journal of the ACM (JACM) 7, no. 1: 75–77.

Smith, Cyril Stanley, and Pauline Boucher. 1987. The Tiling Patterns of Sebastien Truchet and the Topology of Structural Hierarchy. Leonardo 20, no. 4: 373-385.

Personal tools