问题描述
我基本上是在尝试制作一种简单的国际象棋引擎,您在其中输入一个动作,然后该引擎返回最佳动作。这是我正在使用的代码:
import time
import random
from pystockfish import *
def play():
deep = Engine(depth=20)
deep.setposition(['e2e4'])
deep.bestmove()
play()
我运行它,但出现此错误:
Traceback (most recent call last):
File "C:\Users\JoJoUN.School6th-PC.000\Desktop\Experimental code\chess\GladiatorChess.py",line 12,in <module>
play()
File "C:\Users\JoJoUN.School6th-PC.000\Desktop\Experimental code\chess\GladiatorChess.py",line 9,in play
deep = Engine(depth=20)
File "C:\Users\JoJoUN.School6th-PC.000\AppData\Local\Programs\Python\python37\lib\site-packages\pystockfish.py",line 128,in __init__
stdout=subprocess.PIPE,)
File "C:\Users\JoJoUN.School6th-PC.000\AppData\Local\Programs\Python\python37\lib\subprocess.py",line 756,in __init__
restore_signals,start_new_session)
File "C:\Users\JoJoUN.School6th-PC.000\AppData\Local\Programs\Python\python37\lib\subprocess.py",line 1155,in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
为便于记录,我从Eventtoken.h header - Win32 apps | Microsoft Docs那里获得了代码 我查看了“类似问题”列表中的问题,但是#1我不完全理解它们,而#2我不完全理解错误消息。请帮帮我。
谢谢!
编辑:我试图在Windows 10计算机上的常规Python.org shell中的Python 3.8(32位)上运行它。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)