diff options
Diffstat (limited to 'AutoImagesGPU.py')
-rw-r--r-- | AutoImagesGPU.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/AutoImagesGPU.py b/AutoImagesGPU.py index e70051c..30b9d1b 100644 --- a/AutoImagesGPU.py +++ b/AutoImagesGPU.py @@ -28,7 +28,7 @@ single = ['cos', 'sin'] #Operations on a single number binary = ['*', '+', '-'] #Operations for 2 numbers numlist = ['x', 'y', 'Constant'] -def randFunction(length, singleweight, numberweight): +def randFunction(functionLength, singleweight, numberweight): hasx = False hasy = False while not(hasx and hasy): @@ -41,7 +41,7 @@ def randFunction(length, singleweight, numberweight): chanceend = 0 length = 1 #Number of operations done so far while True: - chanceend = (1.0 - (1.0 / length)) ** 12.0 + chanceend = (1.0 - (1.0 / length)) ** (float(functionLength)/7) if lasttype == 'n': number = random.random() if number < chanceend: |