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
game = pyspiel.load_game('rbc', {'fen': '2kr1n1N/pp2p3/8/2P2pp1/2P1p3/4B3/r1PK1P2/8 b - - 1 25'})
state = game.new_initial_state().child(0)
print([state.action_to_string(a) for a in state.legal_actions()])
results include both Raxd2 and Rxd2, but should instead include Raxd2 and Rdxd2, since Rxd2 is ambiguous.
(the board is
. . k r . n . N
p p . . p . . .
. . . . . . . .
. . P . . p p .
. . P . p . . .
. . . . B . . .
r . P K . P . .
. . . . . . . .
)
This is due to ChessBoard's Move.ToSan() using only (pseudo)-legal moves to disambiguate, of which Raxd2 is not one, so it thinks disambiguation is not necessary.
Sorry to raise yet another issue for reconchess! 😛 I can make the fix for this one, but I'm not sure how to do it: pass an extra argument to ToSAN that's a vector of all moves to disambiguate between?
Or is the better fix to just switch ActionToString to use ToLAN instead? This might be the better choice, since some SAN concepts fall apart in recon chess anyways: e.g. an action could be either Qd2 or Qxd2, but with LAN the action only has one valid representation.
The text was updated successfully, but these errors were encountered:
example:
results include both
Raxd2
andRxd2
, but should instead includeRaxd2
andRdxd2
, sinceRxd2
is ambiguous.(the board is
)
This is due to
ChessBoard
'sMove.ToSan()
using only (pseudo)-legal moves to disambiguate, of which Raxd2 is not one, so it thinks disambiguation is not necessary.Sorry to raise yet another issue for reconchess! 😛 I can make the fix for this one, but I'm not sure how to do it: pass an extra argument to
ToSAN
that's a vector of all moves to disambiguate between?Or is the better fix to just switch ActionToString to use
ToLAN
instead? This might be the better choice, since someSAN
concepts fall apart in recon chess anyways: e.g. an action could be eitherQd2
orQxd2
, but with LAN the action only has one valid representation.The text was updated successfully, but these errors were encountered: