You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd been considering using python-shogi to automate the task of converting a few thousand tsumeshogi problems (in KIF) format to SFEN for use elsewhere (namely an Anki plugin). Each tsumeshogi problem consists of a kifu with the initial state of the problem, and the main solution line(s), though I'm currently ignoring the (much harder) problem of automatically extracting the solutions.
It seems there are some issues with my idea. After some initial problems with KIF import (renaming them to .kifu seems to have solved that issue), I find that no matter which kifu I import, via something like:
Essentially, it seems that python-shogi has a hardcoded assumption that a kifu will be a "full game record" and thus always initialises the board in a "game start" state, not the state explicitly given in the kifu.
Is this understanding correct; and either way, is it possible for this to be handled properly in a future release?
The current implementation has a problem as you pointed, that should be fixed especially to use python-shogi for tsume-shogi.
I'm waiting for pull requests to handle the situation properly.
I'd been considering using python-shogi to automate the task of converting a few thousand tsumeshogi problems (in KIF) format to SFEN for use elsewhere (namely an Anki plugin). Each tsumeshogi problem consists of a kifu with the initial state of the problem, and the main solution line(s), though I'm currently ignoring the (much harder) problem of automatically extracting the solutions.
It seems there are some issues with my idea. After some initial problems with KIF import (renaming them to
.kifu
seems to have solved that issue), I find that no matter which kifu I import, via something like:I always get an SFEN corresponding to the initial game state, not of the tsumeshogi problem at all!
I asked around and so far it looks as if the following line (and the logic behind it) are responsible:
python-shogi/shogi/KIF.py
Line 128 in 60c997a
Essentially, it seems that python-shogi has a hardcoded assumption that a kifu will be a "full game record" and thus always initialises the board in a "game start" state, not the state explicitly given in the kifu.
Is this understanding correct; and either way, is it possible for this to be handled properly in a future release?
Content of my
.kifu
file:The text was updated successfully, but these errors were encountered: