mjx-project / mjx

Mjx: A framework for Mahjong AI research
https://colab.research.google.com/drive/1m1wOT_K2YFtuV6IO7VgWk4ilVhTKqRFU?usp=sharing
MIT License
171 stars 19 forks source link

Feature request: import/export mjai game logs #1137

Open Equim-chan opened 2 years ago

Equim-chan commented 2 years ago

Although mjx-project/mjx_mjai_translater is already out there, it looks like it's more about running mjai-speaking agents against the mjx emulator server. I have some existing mjai game logs and hope to use mjx's awesome plotting feature to visualize some certain board states.

sotetsuk commented 2 years ago

Thank you for your interest!

Let me confirm your request. Mjx defines its game state as protocol buffer format (schema: mjx.proto). So I guess all you need is a translater from mjai game log to mjx.proto game log. Is it correct?

If mjai game log can be translated into tenhou format, a possible hot fix is to translate mjai game log into mjx.proto game log in the following flow: [mjai format] => [tenhou format] => [mjx format]. Mjx supports Tenhou log format translation in mjx/mjx-convert.

We plan a mjx.proto update, which may break backward compatibility, in Oct, but after that, mjx.proto must be stable. If the quick fix does not work, we may support mjx log to mjx.proto translation after the update.