Equim-chan / Mortal

🚀🀄️ A fast and strong AI for riichi mahjong, powered by Rust and deep reinforcement learning.
https://mortal.ekyu.moe
GNU Affero General Public License v3.0
929 stars 118 forks source link

Testing with akochan #50

Closed apocalotus closed 10 months ago

apocalotus commented 1 year ago

Hello, recently I have been training the Mortal model, but I encountered difficulties when testing it with akochan. My approach involves using the py_vs_akochan method in the one_vs_three environment. Although I anticipated that akochan would require a significant amount of CPU and memory resources during the simulations, I didn't expect the CPU pressure to become so overwhelming that testing became impossible. The program crashes when simulating over 50 groups for the half-dealer testing. Additionally, when I tried reducing the number of half-dealer simulations, I noticed that the testing program consistently consumes a large amount of server memory, indicating a potential memory leak.

I saw in your documentation that you conducted battles between akochan and mortal, but it seems that you only performed tens of thousands of half-dealer matches compared with hanchans between different versions of Mortal. Did you also encounter this issue? I would like to ask what method you used to successfully complete the testing. Thank you.

Equim-chan commented 1 year ago

Since akochan is highly CPU-intensive, you should start with a smaller games_per_iter (starting from 1).

I have stopped further test-plays against akochan due to its resource usage and time cost, which I don't believe is much worth it meanwhile. Mortal, on the other hand, has been designed for efficiency and it's capable of running millions of test-plays in a reasonable timeframe.

243083df commented 1 year ago

Btw, how can i train model for only East round?

apocalotus commented 1 year ago

Since akochan is highly CPU-intensive, you should start with a smaller games_per_iter (starting from 1).

I have stopped further test-plays against akochan due to its resource usage and time cost, which I don't believe is much worth it meanwhile. Mortal, on the other hand, has been designed for efficiency and it's capable of running millions of test-plays in a reasonable timeframe.

Got it! Thanks!

apocalotus commented 1 year ago

Btw, how can i train model for only East round?

Btw, how can i train model for only East round?

For training a model for east round, you need to filter offline game records, retrain the GRP model, and make some modifications to the game environment(gamecore) for online training.

243083df commented 1 year ago

Btw, how can i train model for only East round?

Btw, how can i train model for only East round?

For training a model for east round, you need to filter offline game records, retrain the GRP model, and make some modifications to the game environment(gamecore) for online training.

Oh, it cant self train?