Возникает ошибка:
Traceback (most recent call last):
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 243, in Think
mymove = minimax(field1, Mycolor, Mycolor, 0, Depth, -50, 50)
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 134, in minimax
resnow = minimax(field, (color + 1) % 2, mycolor, n + 1, nEnd, alpha, beta)
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 134, in minimax
resnow = minimax(field, (color + 1) % 2, mycolor, n + 1, nEnd, alpha, beta)
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 134, in minimax
resnow = minimax(field, (color + 1) % 2, mycolor, n + 1, nEnd, alpha, beta)
[Previous line repeated 7 more times]
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 106, in minimax
moves = GenerationMoves(field, color)
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 55, in GenerationMoves
attacks += SearchAttaks(field, color, (color + 1) % 2, movement, x, y, [x, y])
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 17, in SearchAttaks
attacks += SearchAttaks(field, color, color2, movement, x3, y3, attacknow + [x2, y2])
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 17, in SearchAttaks
attacks += SearchAttaks(field, color, color2, movement, x3, y3, attacknow + [x2, y2])
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 17, in SearchAttaks
attacks += SearchAttaks(field, color, color2, movement, x3, y3, attacknow + [x2, y2])
[Previous line repeated 978 more times]
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 11, in SearchAttaks
if TestInField(x2, y2):
File "D:\Home\Egor\Python\Games\LogicGames\Сheckers\EnglishСheckers\EnglishСheckers.4\EnglishChekers.4.1.py", line 2, in TestInField
return 0 <= x < 8 and 0 <= y < 8
RecursionError: maximum recursion depth exceeded in comparison
Как исправить?
Вопрос задан
более трёх лет назад
129 просмотров