Tuesday, August 11, 2020

Training Tool - Akochan Reviewer

Akochan Reviewer is a tool that leverages the akochan mahjong AI to analyze replays. It looks at rank point EV, rather than round/hand EV, and covers efficiency, calling, riichi decisions, and push/pull. It's designed for Tenhou replays, but can work with rounds from Mahjong Soul and anything else if you're willing to put in some work.

You can download akochan reviewer from the GitHub page if you're on Windows. Download the zip under the "Assets" section in the latest release and extract it to a memorable location. If you're on Linux or Mac, you'll have to follow the instructions on the main page.

In the folder, there's a tactics.json file. Open this in any text editor and find the line "jun_pt". Replace these numbers with the rank point numbers for your Tenhou (or Mahjong Soul) rank for the most accurate analysis, or just set them to 7-dan rates (90, 45, 0, -135). If you don't know, you can find them on the wiki.

Open a command line or powershell window in the folder. On Windows the easiest way is to hold Shift and right click in the folder, then select Open Powershell Window Here. Then, you can run analysis on replays like so:

./akochan-reviewer.exe --no-open --lang en -t 2019050417gm-0029-0000-4f2a8622 -a 3 -o report.html

You may get an error like, "Assertion failed etc etc." In Powershell, you can fix this by entering:

$env:OMP_NUM_THREADS = 8

Let's say you have a replay you want to analyze, like http://tenhou.net/3/?log=2009061705gm-0009-0000-0b284b2e&tw=1. You put the code between the ?log= and the & after the -t, and put the number after &tw= in front of the -a, so this replay would be:

./akochan-reviewer.exe --no-open --lang en -t 2009061705gm-0009-0000-0b284b2e -a 1 -o report.html

Once the analysis finishes, there will be a report.html file inside the akochan folder. I'm unable to see the tile images if I open it in Firefox, so I open them in Chrome. Here's an example of the analysis for a decision.

The "pt EV" column says what akochan predicts your rank points will change by if you make that decision. So, here, she thinks the difference between 1p and 7p is an entire rank point. Sometimes, especially with early honor order, the difference in pt EV will be like, 0.01 or less. You can probably ignore anything under .1 safely.

By default, the report only contains the decisions you made that differed from akochan's choice. If you want to see every decision, you can add "-f" to the command.

Now, this only works with Tenhou URLs, but you can get her to review other things. You just have to recreate the round in tenhou.net/6/. You can save some time by making all of the opponents' starting hands be full of 1m. Here's an example, with the West player being someone we don't care about and the North player being us:

If you've never read paifu in this form, the first row is the starting hand, the second row is the draws, the third row is the discards, and the fourth row is the ending hand. A down arrow in the third row means tsumogiri. Using this, you can recreate the round you want to analyze by clicking the squares and choosing the tiles. When done, click "Edit as Text" at the very top and copy the code. Create a new file of type json in the akochan-reviewer folder, such as "replay.json" and paste the code in there.

If you're using Docker, you'll have to run the build again to get the file into Docker. Then, instead of "-t 2009061705gm-0009-0000-0b284b2e" in the command, you use "-i replay.json".

./akochan-reviewer.exe --no-open -i replay.json -a 1 -o report.html

A lot of work, but hey, it's doable. 土用 (8-dan) says that he thinks the bot's decisions are around an 8-dan level, so it could help you out.

3 comments:

  1. Love these posts about cool mahjong tools, these helped me out a lot. I was wondering what the difference between this and the Hitori Simulator you showcased a while back in terms of pros and cons. They seem to be both very useful but I was wondering what your thoughts were.

    ReplyDelete
    Replies
    1. Oops, been a while since this comment. Anyway, HMS is quick and easy, but it's only single player mahjong. It doesn't consider calls or other players at all, and also doesn't have red dora. Akochan considers the opponents, and looks at more than EV. HMS is more like a level up from the efficiency trainer, while akochan is like a coach who refuses to ever answer why.

      Delete
  2. How to play Blackjack, and other popular casino games - Dr. Maryland
    To win at a blackjack game, 제주도 출장마사지 every dealer must either be chosen 파주 출장마사지 from one of the casino tables and then 대전광역 출장안마 put a bet 평택 출장마사지 into his hand. 여주 출장마사지

    ReplyDelete