Giter Site home page Giter Site logo

equim-chan / mjai-reviewer Goto Github PK

View Code? Open in Web Editor NEW
959.0 12.0 108.0 639 KB

🔍🀄️ Review mahjong game log with mjai-compatible mahjong AI.

Home Page: https://mjai.ekyu.moe

License: Apache License 2.0

Rust 90.12% Shell 0.67% Dockerfile 0.57% CSS 2.12% JavaScript 1.13% Fluent 5.39%
mahjong riichi tenhou mahjongsoul jantama mahjong-ai

mjai-reviewer's Introduction

mjai-reviewer

GitHub Workflow Status dependency status GitHub top language Lines of code GitHub code size in bytes License

Donate

Review your mahjong gameplay with the help of mjai-compatible mahjong AI engines, including Mortal and akochan.

Try it online | Demo result page

It is recommended to just use the web app, 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, which were previously known as akochan-reviewer. If you prefer the old version, check out v0 branch.

Guide on reviewing mahjong soul logs locally

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

mjai-reviewer's People

Contributors

akouryy avatar cjeon avatar critter-mj avatar equim-chan avatar euophrys avatar incertia avatar jayson-huang avatar nikaidou-shinku avatar wengzhe avatar wongjustin99 avatar yuarasino avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mjai-reviewer's Issues

(Partially) Re-enable akochan for Mahjong Soul

I am maintainer of 雀魂牌譜屋. Since my server caches log data for recent matches (usually for 1 ~ 2 days), I think akochan can use these data to allow reviewing recent matches. What do you think? If you like this idea, I can message you an HTTP endpoint for getting log data. :)

Points distribution presets for MajSoul

While you can currently import a MajSoul game, the point distribution presets only has Tenhou options. It would be nice to have the option to choose MajSoul presets or at the very least to manually enter the point distribution.

East game of Mahjong Soul Logs doesn't acknowledged as East game.

For example, East game log generated by log extractor contains word "East" on rule.disp.

However, in akochan-reviewer, only word '東' is checked whether the game is Tonpuu (East) game; if not, the log is examined as Hanchan (South) game.

For workaround, I manually modify log file to add word '東' in rule.disp. But, it would be better if akochan-review could recognize word 'East' as Tonpuu (East) game.

failed to build using docker on Mac M1

When I follow the docker build instruction using M1 mac, I got the following error:

$ docker build -t akochan-reviewer:latest .
[+] Building 1.2s (10/15)                                                       
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 37B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 34B                                           0.0s
 => [internal] load metadata for docker.io/library/rust:1.45.2             0.9s
 => [ 1/11] FROM docker.io/library/rust:1.45.2@sha256:582bedbe2d3b7ada087  0.0s
 => [internal] load build context                                          0.1s
 => => transferring context: 65.68kB                                       0.1s
 => CACHED [ 2/11] RUN set -ex   && apt-get update && apt-get install -y   0.0s
 => CACHED [ 3/11] WORKDIR /akochan-reviewer                               0.0s
 => CACHED [ 4/11] COPY akochan akochan                                    0.0s
 => CACHED [ 5/11] WORKDIR /akochan-reviewer/akochan/ai_src                0.0s
 => ERROR [ 6/11] RUN set -ex   && make -f Makefile_Linux libai.so   && c  0.2s
------
 > [ 6/11] RUN set -ex   && make -f Makefile_Linux libai.so   && cp libai.so ../:
#8 0.188 + make -f Makefile_Linux libai.so
#8 0.196 g++ tehai_cal_work.cpp -c -g -MMD -MP -std=c++11 -O3 -fopenmp -pthread -fPIC -DNPROCS=8 -mcmodel=medium -pedantic -Wignored-qualifiers -Wreturn-type -Wmaybe-uninitialized -Wbool-compare -Wshadow -Wunused-but-set-variable -Wunused-variable -lboost_system -o obj/tehai_cal_work.o
#8 0.198 g++: error: unrecognized argument in option '-mcmodel=medium'
#8 0.198 g++: note: valid arguments to '-mcmodel=' are: large small tiny
#8 0.198 make: *** [Makefile_Linux:34: obj/tehai_cal_work.o] Error 1
------
executor failed running [/bin/sh -c set -ex   && make -f Makefile_Linux libai.so   && cp libai.so ../]: exit code: 2

and I change akochan-reviewer/akochan/ai_src/Makefile_Linux line3, -mcmodel=medium to -mcmodel=small
I got error:

docker build -t akochan-reviewer:latest .
[+] Building 3.4s (10/15)                                                                                                             
 => [internal] load build definition from Dockerfile                                                                             0.0s
 => => transferring dockerfile: 37B                                                                                              0.0s
 => [internal] load .dockerignore                                                                                                0.0s
 => => transferring context: 34B                                                                                                 0.0s
 => [internal] load metadata for docker.io/library/rust:1.45.2                                                                   1.7s
 => [ 1/11] FROM docker.io/library/rust:1.45.2@sha256:582bedbe2d3b7ada087ba37cd22ab266f085e58f019201d95972d4413e1e4651           0.0s
 => [internal] load build context                                                                                                0.1s
 => => transferring context: 67.48kB                                                                                             0.0s
 => CACHED [ 2/11] RUN set -ex   && apt-get update && apt-get install -y     libboost-all-dev   && apt-get clean && rm -rf /var  0.0s
 => CACHED [ 3/11] WORKDIR /akochan-reviewer                                                                                     0.0s
 => [ 4/11] COPY akochan akochan                                                                                                 0.1s
 => [ 5/11] WORKDIR /akochan-reviewer/akochan/ai_src                                                                             0.0s
 => ERROR [ 6/11] RUN set -ex   && make -f Makefile_Linux libai.so   && cp libai.so ../                                          1.3s
------                                                                                                                                
 > [ 6/11] RUN set -ex   && make -f Makefile_Linux libai.so   && cp libai.so ../:                                                     
#10 0.201 + make -f Makefile_Linux libai.so                                                                                           
#10 0.209 g++ tehai_cal_work.cpp -c -g -MMD -MP -std=c++11 -O3 -fopenmp -pthread -fPIC -DNPROCS=8 -mcmodel=small -pedantic -Wignored-qualifiers -Wreturn-type -Wmaybe-uninitialized -Wbool-compare -Wshadow -Wunused-but-set-variable -Wunused-variable -lboost_system -o obj/tehai_cal_work.o                                                                                                                    
#10 1.139 In file included from tehai_cal_work.hpp:5,
#10 1.139                  from tehai_cal_work.cpp:1:
#10 1.139 tehai_action.hpp:8:14: error: enumerator value '-1' is outside the range of underlying type 'char'
#10 1.139   AT_DAHAI = -1,
#10 1.139               ^
#10 1.139 In file included from tehai_cal_work.hpp:5,
#10 1.139                  from tehai_cal_work.cpp:1:
#10 1.139 tehai_action.hpp:30:16: error: enumerator value '-100' is outside the range of underlying type 'char'
#10 1.139      AT_NULL = -100,
#10 1.139                 ^~~
#10 1.295 make: *** [Makefile_Linux:34: obj/tehai_cal_work.o] Error 1
------
executor failed running [/bin/sh -c set -ex   && make -f Makefile_Linux libai.so   && cp libai.so ../]: exit code: 2

I guess this Makefile_Linux is for x86 and docker on M1 Mac will pull rust:1.45.2 container for arm

Can we do anything to fix this?

system.exe has stopped working (can't read majsoul log)

Like Issue #39, I was trying to review a Majsoul log, but this happened with two different log files. Then a window pop-up "System.exe has stopped working"

22:29:32.971615 src\main.rs:506 converting to mjai events...
22:29:32.972468 src\main.rs:600 players: 大型犬, 夜室泥霸霸, Rhdimer, catcat
22:29:32.972665 src\main.rs:601 target: catcat
22:29:32.972911 src\main.rs:602 review has started, this may take several minutes...
22:29:33.414583 src\review.rs:238       reviewing kyoku=0 honba=0 junme=0 (0.31%)
22:29:33.904226 src\review.rs:238       reviewing kyoku=0 honba=0 junme=0 (0.51%)
22:29:34.381490 src\review.rs:238       reviewing kyoku=0 honba=0 junme=0 (0.72%)
22:29:34.860264 src\review.rs:238       reviewing kyoku=0 honba=0 junme=1 (0.82%)
22:29:35.339958 src\review.rs:400       review entry created: Agree (0/0/1, 100.000)
22:29:35.340575 src\review.rs:238       reviewing kyoku=0 honba=0 junme=1 (1.13%)
22:29:35.819750 src\review.rs:238       reviewing kyoku=0 honba=0 junme=1 (1.34%)
22:29:36.294420 src\review.rs:238       reviewing kyoku=0 honba=0 junme=1 (1.54%)
22:29:36.777391 src\review.rs:238       reviewing kyoku=0 honba=0 junme=2 (1.65%)
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263

Enhancement: Display pai images of tehai instead of text

Description

It is easier to understand that the image of the "tehai" is displayed than the sentence "自家が ? を引いた時——".

It is difficult because akochan-viewer needs to save the state of the "tehai", but I think it will be a very good change if possible.

Feature Image

スクリーンショット 2020-03-10 21 09 03

Implementation method

  • Save the state of the "tehai" on akochan-viewer side
  • Replace each tile with image and display

About parameters

I'm trying this project recently,and have found some unexpected(not good) moves generated by akochan.For example,sometime (mostly when player is rank 3) it can't distinguish the diffirence between moves.
  2m 3m 3m 5m 7p 1s 2s 3s 6s 6s 7s 8s 9s E
  [6s] 期望[-55.90, -55.90, 0.002%, -137.63]
  [3m]期望[-55.90, -55.90, 0.002%, -137.63]
  [2s] 期望[-55.90, -55.90, 0.001%, -137.63]
  [8s] 期望[-55.90, -55.90, 0.001%, -137.63]
  [7s] 期望[-55.90, -55.90, 0.001%, -137.63]
  [2m] 期望[-55.90, -55.90, 0.001%, -137.63]
  [7p] 期望[-55.90, -55.90, 0.002%, -137.63]
  [1s] 期望[-55.90, -55.90, 0.001%, -137.63]
  [3s] 期望[-55.90, -55.90, 0.002%, -137.63]
  [9s] 期望[-55.90, -55.90, 0.001%, -137.63]
  [5m] 期望[-55.90, -55.90, 0.002%, -137.63]
  [E] 期望[-55.90, -55.90, 0.000%, -137.63]
It seems that akochan's behavior is highly depended on parameters in "setup_mjai.json".Can you give me some advices on how to set these parameters to improve it? thank you very much! #

Incorrect final place calculation

./akochan-reviewer.exe --lang en -e -n 0.005 "https://tenhou.net/0/?log=2021090521gm-0089-0000-14bd4f18&tw=2"

Last turn of the game:
image

Akochan thinks that I will surely win after ron. In reality I lost by 100 points.
image

Error: failed to review log

I was running akochan-reviewer to review Mahjong Soul Logs by following your instruction (https://github.com/Equim-chan/akochan-reviewer/blob/master/mjsoul.adoc) on Windows and failed.

running log:

➤ ./akochan-reviewer.exe -i 2021_12_6_Gold_Room_South.json -a 2
23:12:36.474591 src\main.rs:506 converting to mjai events...
23:12:36.475222 src\main.rs:600 players: 风条语顺, 钻石水果糖, Retr0MKII, 〓のなめ〓
23:12:36.475253 src\main.rs:601 target: Retr0MKII
23:12:36.475279 src\main.rs:602 review has started, this may take several minutes...
23:12:36.555729 src\review.rs:219 reviewing kyoku=0 honba=0 junme=0 (0.32%)
23:12:36.613702 src\review.rs:219 reviewing kyoku=0 honba=0 junme=0 (0.54%)
23:12:36.662356 src\review.rs:219 reviewing kyoku=0 honba=0 junme=1 (0.65%)
23:12:36.709961 src\review.rs:361 review entry created: Agree (0/0/1, 100.000)
23:12:36.710043 src\review.rs:219 reviewing kyoku=0 honba=0 junme=1 (0.97%)
23:12:36.759089 src\review.rs:219 reviewing kyoku=0 honba=0 junme=1 (1.18%)
23:12:36.806939 src\review.rs:219 reviewing kyoku=0 honba=0 junme=1 (1.40%)
23:12:36.855841 src\review.rs:219 reviewing kyoku=0 honba=0 junme=2 (1.51%)
Error: failed to review log

Caused by:
failed to read from akochan: unexpected EOF

I tried on both ver 0.7.1 and 0.6.0 and both failed, however I run it on another PC(Windows) and it works. Maybe I miss some enviroment or something on my first PC?

Thanks for your patience. Have a nice day!

downloadlogs script modification for NAGA

Can the Mahjong Soul downloadlogs script be modified to output a format that is compatible with NAGA's new custom game analysis function?

I took the JSON output from a Mahjong Soul replay using these constants:
const NAMEPREF = 0; //2 for english, 1 for sane amount of weeb, 0 for japanese
const VERBOSELOG = false; //dump mjs records to output - will make the file too large for tenhou.net/5 viewer
const PRETTY = false; //make the written log somewhat human readable

and manually extracted each round to modify it to the below format using Notepad:
https://dl.dropboxusercontent.com/s/eslbmbxzmyv1zjv/nagaformat.txt?dl=0

After fixing the yaku name to 自風 東 in Round [7,0,0] to get past NAGA's yaku name validator (https://naga.dmv.nico/static/js/tenhou_edit.js), a successful analysis report was generated:

https://naga.dmv.nico/htmls/32c05196730e76909bd0d40e15821342c05f58c90d0c8fe7b8dad0ec02604db9v2_0_0.html?tw=0

About 四槓散了

Hello Equim chan,
I occasionally found that akochan could not handle 四槓散了流局 properly.
I was using cmd
akochan-reviewer --pt 60,15,0,-90 -n 0.02 "https://tenhou.net/0/?log=2021052820gm-0089-0000-ef9e065c&tw=3"
where the address is https://tenhou.net/0/?log=2021052820gm-0089-0000-ef9e065c&tw=3
四槓散了 occured at 東4局1本場

And Akochan printed that
Error: failed to review log

Caused by:
0: invalid state in event
1: unexpected event: Ryukyoku { deltas: Some([0, 0, 0, 0]) }

error: linker `link.exe` not found

C:\Users\fan\Desktop\阿卡\akochan-reviewer>cargo build --release
Compiling winapi v0.3.9
Compiling proc-macro2 v1.0.32
Compiling syn v1.0.82
Compiling memchr v2.4.1
error: linker link.exe not found

Error: failed to render HTML report

Akochan reviewer version: v0.4.4

How to reproduce error:

akochan-reviewer.exe https://tenhou.net/0/?log=2020102101gm-00c1-0000-b7d8700d&tw=2

Error message:

1: Failed to render 'report.html'
2: Function call 'pretty_round' failed
3: Variable `metadata.score` was used in a math operation but is not a number

Service unavailable?

docker version doesn't work with:

Error: failed to download mahjong soul log 220329-ce1da608-fc05-4560-bcfa-ff0185f91f92_a829847388

Caused by:
    get mahjong soul log: 503 Service Unavailable

じゃんたま東風戦の牌譜検討について

こんにちは。日本語で失礼いたします。

じゃんたまの東風戦の牌譜をローカルでakochanに検討させているのですが、オーラスのpt期待値を見るに南場が残っている想定で検討されているように思いました。

東風戦の想定で検討させることは可能でしょうか?前提からして間違っていたらごめんなさい。

Error: failed to review log

Hi, I tried to build your latest by following your wiki and end up having this error. But I tried your release v0.6.0 it works fine.

14:24:50.434253 src\main.rs:602 review has started, this may take several minutes...
14:24:50.444842 src\review.rs:219       reviewing kyoku=0 honba=0 junme=1 (0.17%)
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Error: failed to review log

Caused by:
    failed to read from akochan: unexpected EOF

got "failed to read from akochan: unexpected EOF" error on Windows10

I got "failed to read from akochan: unexpected EOF" error on Windows10 with akochan-reviewer windows binary v.0.6.0.

I need your help.

Situation

  • the error occurred when I run following command on cmd.
> akochan-reviewer "https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2"

22:32:02.690380 src\main.rs:507 converting to mjai events...
22:32:02.691797 src\main.rs:603 players: カレーセット, 二宮蘭子, ⓝSuphx, 渡部惠子
22:32:02.692318 src\main.rs:604 target: ⓝSuphx
22:32:02.693135 src\main.rs:605 review has started, this may take several minutes...
22:32:02.705276 src\review.rs:221       reviewing kyoku=0 honba=0 junme=0 (0.95%)
22:32:03.183592 src\review.rs:221       reviewing kyoku=0 honba=0 junme=0 (1.58%)
22:32:03.631826 src\review.rs:221       reviewing kyoku=0 honba=0 junme=1 (1.90%)
22:32:04.078816 src\review.rs:374       review entry created: Agree (0/0/1, 100.000)
22:32:04.079945 src\review.rs:221       reviewing kyoku=0 honba=0 junme=1 (2.85%)
22:32:04.532977 src\review.rs:221       reviewing kyoku=0 honba=0 junme=1 (3.48%)
22:32:04.984261 src\review.rs:221       reviewing kyoku=0 honba=0 junme=1 (4.11%)
22:32:05.436933 src\review.rs:221       reviewing kyoku=0 honba=0 junme=2 (4.43%)
22:32:05.881838 src\review.rs:374       review entry created: Agree (0/0/2, 100.000)
22:32:05.883035 src\review.rs:221       reviewing kyoku=0 honba=0 junme=2 (5.38%)
22:32:06.331310 src\review.rs:221       reviewing kyoku=0 honba=0 junme=2 (6.01%)
22:32:06.780102 src\review.rs:221       reviewing kyoku=0 honba=0 junme=2 (6.65%)
22:32:07.228143 src\review.rs:221       reviewing kyoku=0 honba=0 junme=3 (6.96%)
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Error: failed to review log

Caused by:
    failed to read from akochan: unexpected EOF
  • same error occurred on mahjongsoul.
> akochan-reviewer "https://game.mahjongsoul.com/?paipu=190425-146daa2a-68c2-4b7e-a8d7-2b5c71b54b00_a458023588"

22:43:29.293640 src\main.rs:507 converting to mjai events...
22:43:29.295242 src\main.rs:603 players: jan, 吼姆拉, 二宮蘭子, おむつみなと
22:43:29.295651 src\main.rs:604 target: 二宮蘭子
22:43:29.295982 src\main.rs:605 review has started, this may take several minutes...
22:43:29.307962 src\review.rs:221       reviewing kyoku=0 honba=0 junme=0 (0.26%)
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Assertion failed: tehai_bit.count_hai(hai-5) >= tehai_state.get_aka_in_side(hai/10 - 1), file tehai_ana.cpp, line 263
Error: failed to review log

Caused by:
    failed to read from akochan: unexpected EOF

Fail to locate my file

I am a beginner with computer and very interested in this AI, so I have just gone through the tutor and already built akochan and akochan-reviewer under my home dir.
By the way, my system is macOS 12.2.1 and when I was building akochan using make statement, my terminal gave me a lot of warnings, I don't know if this is relevant.
The problem is when I run '~/akochan-reviewer/target/release/akochan-reviewer -I -a 0' under home dir, this error occurs.
18:16:18.042392 src/main.rs:506 converting to mjai events...
Error: failed to canonicalize tactics_config path "tactics.json"

Caused by:
No such file or directory (os error 2)
But I can find my "tactics.json file" under /akochan-reviewer.
And when I run '
/akochan-reviewer/target/release/akochan-reviewer -I -a 0' under another dir, it will give me another error.
18:43:20.950012 src/main.rs:506 converting to mjai events...
Error: failed to canonicalize akochan_dir path "akochan"

Caused by:
No such file or directory (os error 2)
Can anyone tell me why this happen and how can I run this AI successfully on my Mac.

Error in reading majsoul log.

雀魂7月28日更新后,现在读取牌谱会失败。
7月28日雀魂アップデート後、現在読み方エラー発生します。
Now reading Majsoul log leads error after Majsoul updated on 28th July.

Suggestion: Show value lost on a mistake

It would be nice to be able to see at a glance how much "points" a mistake has cost vs. the move recommended by Akochan. It would help to quickly find big blunders vs. minor mistakes.

You can currently do the math manually, but it would be more convenient to have the value somewhere easily accessible.

Unspecified in-file doesn't open stdin

Running this command:
docker run --rm akochan-reviewer:latest --no-open -i - -a 1 -o - > report.html

Results in this error:

src/main.rs:334 parsing tenhou log...
Error: failed to parse tenhou log

Caused by:
    EOF while parsing a value at line 1 column 0

According to the readme, it should read from stdin in this case.

What is a proper url to download tenhou logs?

Akochan does it somehow, but I can't get it to work locally trying to do this:

curl "https://tenhou.net/5/mjlog2json.cgi?log=2022041620gm-0009-0000-ff59f844&tw=1&tw=1" -H 'Content-Type: application/json' --data-raw '{ "Referer": "https://tenhou.net/"}' > ~/test.html

The idea is that I want to be able to save logs and then feed them to akochan later with -i command instead of relying on logs still being available and using akochan's fetcher.

Failed to download mahjong soul log

Online page failed to read any mahjong soul url. Local build says cause by: get mahjong soul log: 503 Service Unavailable. The server is fine for normal players, could be the recent event update?

unable to build and run

seems like there are missing files in the repository

22:47:30.309285 src/main.rs:338	parsing tenhou log...
22:47:30.316264 src/main.rs:370	converting to mjai events...
Error: failed to canonicalize akochan_exe path "/home/incertia/akochan-reviewer/akochan/system.exe"

Caused by:
    No such file or directory (os error 2)

and also this is only runnable on windows

failed to read from akochan: unexpected EOF

I run akochan-reviewer in Ubuntu and got this error:

system.exe: error while loading shared libraries: libai.so: cannot open shared object file: No such file or directory
Error: failed to review log

Caused by:
    failed to read from akochan: unexpected EOF

Add a new horizontal layout for the report

Hi, I am new to mahjong and find akochan-reviewer is useful for learning. Thanks a lot for this project!

However, I found it is a litter hard to check the review result and the tenhou replaying at the same time. There is only limited space if I don't collapse the tenhou replay iframe.

I try to add a horizontal layout to place the tenhou replay to the left and the review result to the right side. Here are my changes https://github.com/JaySon-Huang/akochan-reviewer/tree/hori_style

I am thinking of merging it back to this repo. Would you mind accepting the layout change?

A preview for the report with horizontal layout:
chankan.json.html.zip
image

What is the reason that akochan can't produce the review?

Hi, I'm MacOS 10.13 user, and I guess I successfully build both of akochan-reviewer and akochan.

But, when I test it, I confront the following issue.

$./akochan-reviewer -e "https://tenhou.net/0/?log=2019050417gm-0029-0000-4f2a8622&tw=2"
02:20:15.116799 src/main.rs:506	converting to mjai events...
02:20:15.249825 src/main.rs:600	players: カレーセット, 二宮蘭子, ⓝSuphx, 渡部惠子
02:20:15.249899 src/main.rs:601	target: ⓝSuphx
02:20:15.249946 src/main.rs:602	review has started, this may take several minutes...
02:20:15.253346 src/review.rs:219	reviewing kyoku=0 honba=0 junme=0 (0.95%)
02:20:15.376649 src/review.rs:219	reviewing kyoku=0 honba=0 junme=0 (1.58%)
02:20:15.482680 src/review.rs:219	reviewing kyoku=0 honba=0 junme=1 (1.90%)
02:20:15.603575 src/review.rs:361	review entry created: Agree (0/0/1, 100.000)
02:20:15.603706 src/review.rs:219	reviewing kyoku=0 honba=0 junme=1 (2.85%)
02:20:15.717992 src/review.rs:219	reviewing kyoku=0 honba=0 junme=1 (3.48%)
02:20:15.850804 src/review.rs:219	reviewing kyoku=0 honba=0 junme=1 (4.11%)
02:20:15.996262 src/review.rs:219	reviewing kyoku=0 honba=0 junme=2 (4.43%)
02:20:16.137382 src/review.rs:361	review entry created: Agree (0/0/2, 100.000)
02:20:16.137500 src/review.rs:219	reviewing kyoku=0 honba=0 junme=2 (5.38%)
02:20:16.259466 src/review.rs:219	reviewing kyoku=0 honba=0 junme=2 (6.01%)
02:20:16.372626 src/review.rs:219	reviewing kyoku=0 honba=0 junme=2 (6.65%)
02:20:16.488840 src/review.rs:219	reviewing kyoku=0 honba=0 junme=3 (6.96%)
Error: failed to review log

Caused by:
    failed to read from akochan: unexpected EOF

I use Rust to build the akochan-reviewer.
I don't know this is the right place to ask the solution..

ADD
I guess this is because there is some segmentation fault issue in Akochan, not reviewer

Missing Shouminkan turn

./akochan-reviewer.exe --lang en -e -n 0.005 "https://tenhou.net/0/?log=2021082908gm-0089-0000-369d5ba3&tw=0"
In South 4:
image
The review jumps from Turn 2 to Turn 5, the turn when I made pon into kan is missing.

Error when trying to analyse Jantama logs

Windows 10でリリースv0.6.0が雀魂牌譜に限り動作不能になりました。URLを入力してしばらく置いていくとHTTP 500というエラーコードが出てしまう。できれば修復作業お願いします。
Error HTTP 500 appears for Jantama logs using release v0.6.0 on Windows 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.