Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with variant FENs? #6

Open
DeFilippis opened this issue Apr 9, 2015 · 3 comments
Open

Doesn't work with variant FENs? #6

DeFilippis opened this issue Apr 9, 2015 · 3 comments

Comments

@DeFilippis
Copy link

Hey Jarret,

If I run stockfish from the command line on a traditionally illegal FEN like so:

position pppppppp/pppppppp/pppppppp/ppppp1pp/1pp1ppp1/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2
go

Stockfish will work with it and yield a move choice. However, if I do the same with your Python wrapper (which is excellent, by the way) like this

deep = Engine()
deep.setfenposition("pppppppp/pppppppp/pppppppp/ppppp1pp/1pp1ppp1/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2")
print deep.bestmove()

The engine hangs indefinitely. Any ideas on how to fix this?

@iamjarret
Copy link
Owner

Hi Evan,

Thanks for the nice feedback! Here's one idea:

try running

engine.put("position pppppppp/pppppppp/pppppppp/
ppppp1pp/1pp1ppp1/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2")

does it work? If so, then your version of stockfish is using a different
UCI protocol. Change line 183 to remove the word "fen." Otherwise, try
running engine.isready(). If that freezes there is a problem reading
stockfish's output and I'd have to get back to you with a solution.

On Thu, Apr 9, 2015 at 10:55 AM, Evan DeFilippis notifications@github.com
wrote:

Hey Jarret,

If I run stockfish from the command line on a traditionally illegal FEN
like so:

position pppppppp/pppppppp/pppppppp/ppppp1pp/1pp1ppp1/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2
go

Stockfish will work with it and yield a move choice. However, if I do the
same with your Python wrapper (which is excellent, by the way) like this

deep = Engine()
deep.setfenposition("pppppppp/pppppppp/pppppppp/ppppp1pp/1pp1ppp1/8/PPPP1PPP/RNBQKBNR w KQkq - 0 2")
print deep.bestmove()

The engine hangs indefinitely. Any ideas on how to fix this?


Reply to this email directly or view it on GitHub
#6.

Jarret Petrillo
iamjarret.github.io
908-451-8373

@DeFilippis
Copy link
Author

Hey Jarret,

Thanks! I had to manually do the work with "engine.put", and it worked. Thanks!

@iamjarret
Copy link
Owner

Great! You may have an old version of Stockfish installed.

On Thu, Apr 9, 2015 at 12:30 PM, Evan DeFilippis notifications@github.com
wrote:

Hey Jarret,

Thanks! I had to manually do the work with "engine.put", and it worked.
Thanks!


Reply to this email directly or view it on GitHub
#6 (comment).

Jarret Petrillo
iamjarret.github.io
908-451-8373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants