Closed Wikunia closed 6 years ago
I see. Does this error come up during self-play or only during the pit stage?
If I just implement the it like for every other game and then use the rotation flipping in getCanonicalForm
the error occurs when getNextState
is called by Coach.py
in the self playing part. There the getNextState
is called with -1
as a player sometimes, right?
Whereas the mcts variant calls it always with player 1. I have to say that I didn't fully understand your code and naively tried to implement it for this game :laughing:
It's currently a bit hard to debug without knowing when which representation is used (like if it is currently the canonical form (and if yes rotated) or the normal representation of it.
I think I found a way. For this game but I think also in general it would be nice to implement Pie rule (https://en.wikipedia.org/wiki/Pie_rule)
Thanks, will have a look!
Sometimes the black and white player is not symmetry. For example, in Renju, a variation of Gobang, there are rules of three and three, four and four, and longlink for black player only and sometimes swap player.
May I ask some suggestions for implementing more general getCanonicalForm
in GobangGame.py
?
I think I found a way. For this game but I think also in general it would be nice to implement Pie rule (https://en.wikipedia.org/wiki/Pie_rule) @Wikunia Would you mind sharing how you've overcome this? I have a similar issue with asymmetric win-conditions depending on the player's piece color.
We are trying to implement a version for Hex/Nash https://en.wikipedia.org/wiki/Hex_(board_game)
There the two players are trying to reach a slightly different goal. One player is playing from left to right the other one from top to bottom. Therefore, the idea was to rotate the board and flip it in
getCanonicalForm
but then the moves aren't legal anymore as the board has changed at least that's what we believe is happening :DAny ideas of how to overcome this issue?