Go port of mjai-manue
Work in progress
Differences from the original:
- Supports both Gimite's original Mjai protocol and a minor modified version of the Mjai protocol used by RiichiLab.
- Fixed the miscalculation of the shanten number when the hand contains four identical tiles.
- Improved error handling to more reliably reject invalid or anomalous input.
- Refactored the code to improve readability and maintainability.
Note
The original project includes an older version written in Ruby and a newer version written in CoffeeScript. This project ports only the new version.
For more information, see the original README (Japanese) or its translation.
There are two options to install this application:
Download the executable file for your platform from the releases page.
go install github.com/Apricot-S/mjai-manue-go/cmd/mjai-manue
mjai-manue
will be built in current directory.
For TCP/IP (e.g., mjai)
mjai-manue --url http://example.com:11600/default
For Standard I/O (e.g., mjai.app)
mjai-manue --pipe
Note
In practice, mjai.app
runs bot.py
in the submission .zip
file.
You need to call the above command from within bot.py
and pipe the standard input and output.
Tip
See scripts/mjai.app/ for how to generate a submission file for mjai.app
.
Licensed under the New BSD License (3-Clause BSD License).
This project includes the following files from the original mjai-manue project, which are licensed under the New BSD License. Full credit for these files goes to the original author, Hiroshi Ichikawa.
Files used:
- configs/danger_tree.all.json
- configs/game_stats.json
- configs/light_game_stats.json