我试图使用Python stockfish库获取一系列fen位置的评估。当解决方案在x中匹配时,我的代码运行得很快。当溶液为x厘米时,它会运行很长时间。如何让stockfish限制思考评估的时间?这是我的密码:
fish = Stockfish()
evals = []
fen = 'r1bqk2r/pp1pbppp/2n1pn2/2p5/2B1N3/4PN2/PPPP1PPP/R1BQ1RK1 b kq - 1 1'
fish.set_fen_position(fen)
fish.get_evaluation()
Tags:
您可以使用
python-chess
库($ pip instep python-chess
),只需执行以下操作:相关问题 更多 >
编程相关推荐