Skip to content

Instantly share code, notes, and snippets.

@JAChapmanII
Created August 10, 2012 21:10
Show Gist options
  • Save JAChapmanII/3317998 to your computer and use it in GitHub Desktop.
Save JAChapmanII/3317998 to your computer and use it in GitHub Desktop.
models of the universe
// 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