All Projects → Equim-chan → akochan-reviewer

Equim-chan / akochan-reviewer

Licence: Apache-2.0 license
🔍🀄️ Review mahjong game log with mjai-compatible mahjong AI.

Programming Languages

rust
11053 projects
CSS
56736 projects

Projects that are alternatives of or similar to akochan-reviewer

MajsoulAI
雀魂/天凤四人麻将AI;目前段位 雀魂雀圣3 天凤8段。
Stars: ✭ 93 (-81.51%)
Mutual labels:  mahjong, tenhou
pantheon
Primary Pantheon project repository
Stars: ✭ 21 (-95.83%)
Mutual labels:  mahjong, riichi
tenhud
HUD for tenhou.net riichi mahjong server. Shows tsumogiri and hidden tiles.
Stars: ✭ 12 (-97.61%)
Mutual labels:  mahjong, tenhou
16mj
16 Mahjong
Stars: ✭ 15 (-97.02%)
Mutual labels:  mahjong
tjmj
网页的天津麻将,从 GoogleCode 导入,不活跃
Stars: ✭ 29 (-94.23%)
Mutual labels:  mahjong
JapaneseMahjong
日本麻将的库,“求向听数”、“判断胡牌”、“牌面拆解”采用查表法。
Stars: ✭ 96 (-80.91%)
Mutual labels:  mahjong
mahjong soul api
Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.
Stars: ✭ 30 (-94.04%)
Mutual labels:  mahjong
ChineseOfficialMahjongHelper
国标麻将小助手——包含算番器、线下实麻计分器、番种详细说明、牌理等
Stars: ✭ 82 (-83.7%)
Mutual labels:  mahjong
autotable
An online mahjong table
Stars: ✭ 39 (-92.25%)
Mutual labels:  mahjong
Deep-Learning-Mahjong---
Reinforcement learning (RL) implementation of imperfect information game Mahjong using markov decision processes to predict future game states
Stars: ✭ 45 (-91.05%)
Mutual labels:  mahjong
mah
a html5 mahjong solitaire game
Stars: ✭ 33 (-93.44%)
Mutual labels:  mahjong
mahjong-ai
A program for investigation on deep learning model for Hong Kong Mahjong.
Stars: ✭ 24 (-95.23%)
Mutual labels:  mahjong

mjai-reviewer

GitHub Workflow Status dependency status GitHub code size in bytes License

Review mahjong game log with mjai-compatible mahjong AI, supported engines are Mortal and akochan.

Try it online | Demo result page

It is recommended to just use the online version, which works for Mahjong Soul games out-of-the-box, no download, no install, no extension, and it is free to use.

mjai-reviewer 1.x.x is incompatible with 0.x.x versions, previously known as akochan-reviewer. If you prefer the old version, check out v0 branch.

How to Review Mahjong Soul Logs (updated 2021-09-26)

Usage

$ # Review https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2
$ # Note that you may need to quote it in the shell to escape the string
$ mjai-reviewer -e mortal -u "https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2"

$ # Use akochan as engine
$ mjai-reviewer -e akochan -u "https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2"

$ # Alternatively, you can specify the log ID and player ID manually
$ mjai-reviewer -e mortal -t 2019050417gm-0029-0000-4f2a8622 -a 2

$ # Review a local tenhou.net/6 format log file, note that you must specify a player ID
$ mjai-reviewer -e mortal -i log.json -a 3

$ # Review 東2局1本場 and 東3局 only
$ mjai-reviewer -e mortal -k E2.1,E3 -u "https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2"

Use the --help argument for more details.

FAQ

See FAQ

Troubleshooting

(akochan) Assertion failed errors on Windows

Set environment variable OMP_NUM_THREADS=8.

Under cmd

> set OMP_NUM_THREADS=8

Under Powershell

> $env:OMP_NUM_THREADS = 8

Under MSYS2 bash

$ export OMP_NUM_THREADS=8

(akochan) libai.so not found on Linux

Try adding the directory of libai.so to env LD_LIBRARY_PATH.

Build

mjai-reviewer

Follow the instructions here to install Rust toolchains first, if you haven't yet.

$ cd ..
$ git clone https://github.com/Equim-chan/mjai-reviewer.git
$ cargo build --release

mjai-reviewer binary will be in target/release directory.

Engines

Mortal

See Mortal's documentation.

You also need a trained model file to actually use Mortal.

Akochan

$ git clone https://github.com/critter-mj/akochan.git
$ cd akochan

You have to edit Makefile and ai_src/Makfefile accordingly. Set up correct path for boost and some other options like -march=native of your choice.

On Windows MSYS2 with MinGW-w64 toolchain

$ pacman -Syu mingw-w64-x86_64-{toolchain,boost}

Edit Makefile:

LIBS = -lboost_system-mt -lws2_32 -L./ -lai -s

Edit ai_src/Makefile:

LIBS = -lboost_system-mt -lws2_32
$ cd ai_src
$ make
$ cd ..
$ make

On MacOS

$ brew install llvm libomp boost
$ cd ai_src
$ make -f Makefile_MacOS
$ cd ..
$ make -f Makefile_MacOS

On Arch Linux

$ sudo pacman -Syu base-devel boost
$ make -f Makefile_Linux
$ cd ..
$ make -f Makefile_Linux

Docker

Currently the docker image is not maintained and it only embeds akochan engine.

Build

$ git clone https://github.com/Equim-chan/mjai-reviewer.git
$ cd mjai-reviewer
$ git clone https://github.com/critter-mj/akochan.git
$ docker build -t mjai-reviewer:latest .

Usage

$ docker run --rm mjai-reviewer:latest -e akochan --no-open -t 2019050417gm-0029-0000-4f2a8622 -a 3 -o - > report.html
$ open report.html  # or just open in browser

License

Apache-2.0

Contributors

Contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].