gnh1201 / lotto_genetic_algorithm

Lotto prediction with Genetic Algorithm and Mersenne Twister (MT19937)
https://catswords.social/@catswords_oss
19 stars 2 forks source link

TypeError: 'numpy.float64' object cannot be interpreted as an integer #4

Open dicotom opened 1 month ago

dicotom commented 1 month ago

Set: Average time of function evaluating (secs): 0.14540128231048585 (total = 14.540128231048584)

Best score before optimization: -425

____ 0.4% GA is running...1 gen from 255...best value = -425Traceback (most recent call last): File "N:\DOWNLOADS\Roi Polanitzer GIT HUB LOTTERY FILES\LOTTERY PREDICTIONS\lotto_genetic_algorithm-main\lotto_genetic_algorithm-main\main.py", line 57, in model.run(function=f) File "C:\Python312\Lib\site-packages\geneticalgorithm2\geneticalgorithm2.py", line 1056, in run ch2 = self.mut_middle(ch2, pvar1, pvar2) File "C:\Python312\Lib\site-packages\geneticalgorithm2\geneticalgorithm2.py", line 1186, in mut_middle x[i] = random.randint(v2, v1) File "C:\Python312\Lib\random.py", line 336, in randint return self.randrange(a, b+1) File "C:\Python312\Lib\random.py", line 301, in randrange istart = _index(start) TypeError: 'numpy.float64' object cannot be interpreted as an integer

gnh1201 commented 3 days ago

Sorry for the late response, we will look into this matter soon.