summaryrefslogtreecommitdiff
path: root/AutoImagesGPU.py
diff options
context:
space:
mode:
authorpommicket <leonardomtenenbaum@gmail.com>2015-09-19 09:47:59 -0400
committerpommicket <leonardomtenenbaum@gmail.com>2015-09-19 09:47:59 -0400
commit5d0e537f59ed8b06c018dd8b781895397ae89b42 (patch)
tree2442840ced667d0350921178a23109ff9232892c /AutoImagesGPU.py
parentc53150c701151e23e49d5c5cd5c49f8a9cf8df86 (diff)
Fixed function length
Diffstat (limited to 'AutoImagesGPU.py')
-rw-r--r--AutoImagesGPU.py4
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: