I have been thinking back to assignment 1 lately, but more specifically the generating random numbers element of the code. For example lets look at this:
>>> game_range = 10
>>> x = int(random.uniform(1, game_range + 1))
>>> x
9
Generating random numbers is an essential computer task, especially for cRPG's and other chance based games, but how does it work in regards to computers? From my basic knowledge of how computer's work deep deep deep down, how does one generate a completely random number?
Apparently they didn't use to. In my curiousity about the history of video games I've learned a tiny bit (no pun intended) about the way older computers worked. The interest in "random"-ness began by watching the video form of a thesis written by a certain Dr. Tom Murphy. He'd written a program, a very simple one, that played Nintendo Entertainment System games. No specific parameters for each game either. It was universal and, in this day and age, not too taxing of a program to run, all based around the potential increase in numbers always going on inside the NES.
Video version of Dr. Murphy's explaination available here: https://www.youtube.com/watch?v=xOCurBYI_gY
The actual paper: http://www.cs.cmu.edu/~tom7/mario/mario.pdf
![]() |
Turns out, to simulate "randomness" the NES actually takes things like player input and button presses into the equation. The users, playing away on the NES controllers, were providing some of the "randomness" for many of these games! To makes sure 1 of 6 power-ups dropped each time though, you'd have to be a computer program like Dr. Murphy's. I found this mind blowing.
I guess I just wanted to share how cool I found that video and computing idea. Still working out how exactly we accomplish "random" in computer and games nowadays though, but cheers and hope I find out in the future!
ES
