datamllab / rlcard

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

Mahjong and Dou Dizhu performance #91

Open lssr opened 4 years ago

lssr commented 4 years ago

After running some performance tests will all the games (see results below), @justinkterry and I noticed that Mahjong and Dou Dizhu are considerably slower than the rest of the games. Is there any reason for this?

Game Turns/Actions per second
Mahjong 970
Dou Dizhu 6668
Uno 18349
Leduc Holdem 29447
Texas Holdem 20092
Texas Holdem no limit 15699
daochenzha commented 4 years ago

@lssr Thanks for these results. They are really helpful. These games are slow mainly due to their complex game logics. Because these two games need continuous checking of hand. Thus, we can not expect these two games have comparable speed as Texas Hold’em.

For Dou Dizhu, the performance should be near optimal. For example, we have replaced some time-consuming parts with pre-defined maps. It is much faster than the first version. I believe to further improve the speed of Dou Dizhu, the only choice is to reimplemented it with C/C++.

For Mahjong, the performance is not optimized. Thus, there should be much space to improve the speed.

jkterry1 commented 4 years ago

Is further Mahjong optimization planned?

daochenzha commented 4 years ago

Yes, it is planned.

jkterry1 commented 4 years ago

Any movement on mahjong optimizations?

daochenzha commented 4 years ago

@justinkterry Thanks for asking. We do find some redundant logics that can be simplified. We are still working on it.

jkterry1 commented 4 years ago

@daochenzha any news on mahjong optimizations?

daochenzha commented 4 years ago

@justinkterry Not yet. We will busy with some other deadlines recently. We will work on it later.

jkterry1 commented 4 years ago

@daochenzha anything new for mahjong?

jkterry1 commented 3 years ago

@daochenzha Just following up on Mahjong