datamllab / rlcard

Reinforcement Learning / AI Bots in Card (Poker) Games - Blackjack, Leduc, Texas, DouDizhu, Mahjong, UNO.
http://www.rlcard.org
MIT License
2.78k stars 615 forks source link

Bridge hidden card rep error #276

Closed YanSong97 closed 1 year ago

YanSong97 commented 1 year ago

Great lib!

In bridge environment, the hidden card representation seems to have the incorrect hidden_player_ids for a four-player game. Correct me if am wrong, I believe line 237 should be something like hidden_player_ids = [(current_player_id + 1) % 4, (current_player_id + 3) % 4] to get the correct hidden player id. Same applies to line 239.

Appreciate it if you can double-check it.

https://github.com/datamllab/rlcard/blob/517cb08f8b383ad113492425c9377ca4b9680c74/rlcard/envs/bridge.py#L232-L247

billh0420 commented 1 year ago

Thanks for finding this error. I corrected the two lines and submitted a pull request.

daochenzha commented 1 year ago

@billh0420 @YanSong97 Thanks for the fix!