SIMPLE icon indicating copy to clipboard operation
SIMPLE copied to clipboard

Feature request: Implement chess and an user interface for it using SIMPLE

Open ghost opened this issue 4 years ago • 4 comments

Hi David, i'm new to data sciene and also to Python. I find SIMPLE amazing. Can you please extend SIMPLE with chess please? It would be awesome if you can provide an user interface for it also. Thanks.

ghost avatar May 02 '21 18:05 ghost

Hi - thanks I'll bear that in mind. Chess would be an interesting one to include for sure, though there will certainly be other implementations out there (e.g. LeelaZero) that are better suited to training a state of the art chess engine for sure. SIMPLE is designed to be very generally applicable to multiplayer games, but agree that it would be an interesting exercise to implement chess and see how it does.

davidADSP avatar May 11 '21 20:05 davidADSP

Am I right to understand that the action space when implementing a new environment has to be a discrete space of the form {0, 1, ..., N-1} where N is the number of possible moves, and cannot be a more structured space?

For instance, to implement chess, a possible choice for the action space is the set of quadruplets (x1,y1,x2,y2) where (x1,y1) represents the starting square and (x2,y2) the end square. Is there a better way to represent this space than self.action_space = gym.spaces.Discrete(8 * 8 * 8 * 8) in the Env class?

ltnKoen avatar Feb 14 '22 12:02 ltnKoen

Am I right to understand that the action space when implementing a new environment has to be a discrete space of the form {0, 1, ..., N-1} where N is the number of possible moves, and cannot be a more structured space?

For instance, to implement chess, a possible choice for the action space is the set of quadruplets (x1,y1,x2,y2) where (x1,y1) represents the starting square and (x2,y2) the end square. Is there a better way to represent this space than self.action_space = gym.spaces.Discrete(8 * 8 * 8 * 8) in the Env class?

I'd love a response to this as well. I'm trying to create a self-play RL model for the game Blokus and I'm struggling to see how I might encode the relatively large action space.

kambielawski avatar Jul 12 '22 16:07 kambielawski

There are already libraries for getting possible moves in chess and evaluating moves, so it might not actually be too difficult to do this.

AndreThompson-Atlow avatar Jan 12 '23 22:01 AndreThompson-Atlow