Created
November 14, 2017 01:30
-
-
Save seanavery/1832b257c7fc7a5d0428ad03914e0c27 to your computer and use it in GitHub Desktop.
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
import random | |
import time | |
class Simulation(): | |
def __init__(self): | |
self.sigma = 2; | |
self.score = random.randint(1, 100) | |
print('### network score', self.score) | |
def simulate(self): | |
time.sleep(1) | |
self.score = round(random.gauss(self.score, self.sigma)) | |
if self.score < 1: | |
self.score = 1 | |
if self.score > 100: | |
self.score = 100 | |
print('### network score', self.score) | |
return self.simulate() | |
simulation=Simulation() | |
simulation.simulate() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment