Created
August 10, 2012 21:10
-
-
Save JAChapmanII/3317998 to your computer and use it in GitHub Desktop.
models of the universe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// an int completely represents the state of the universe, position of all particles, velocities, whatever is needed to perfectly recreate it exactly. | |
// strictly deterministic | |
int sd_step(int currentUniverse) { | |
return currentUniverse + 2; // magical constant | |
} | |
void sd_universe() { | |
int universe = 0; | |
while(true) { | |
universe = sd_step(universe); | |
} | |
} | |
// jac's | |
int jacs_step(int currentUniverse, int randomVariable) { | |
return currentUniverse + randomVariable; | |
} | |
void jacs_universe() { | |
int universe = 0; | |
while(true) { | |
universe = sd_step(universe, getCompletelyRandomVariable()); | |
} | |
} | |
// arm's | |
int arms_step(int currentUniverse) { | |
return currentUniverse + getCompletelyRandomVariable(); | |
} | |
void arms_universe() { | |
int universe = 0; | |
while(true) { | |
universe = sd_step(universe); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment