Giter VIP home page Giter VIP logo

akochan_ui's Introduction

Execute

Execute main.py

$ python main.py

Read an mjai-log

You can read an mjai-log in log directory by

File > Open

Play a game

You need to copy following from akochan(https://github.com/critter-mj/akochan)

ai.dll (windows)
libai.so (linux)
system.exe
setup_mjai.json
params

Then you can play a game by

AI > Start Game

and input random seed (non-negative integer).

Convert Tenhou-log to mjai-log

  1. Create a directory named 'tenhou_rawlog'
  2. download scraw20XX.zip from https://tenhou.net/sc/raw/ and put extracted directory('scraw20XX') in 'tenhou_rawlog' directory
  3. Clone and build akochan-reviewer in root directory
    git clone https://github.com/Equim-chan/akochan-reviewer.git
    cd akochan-reviewer
    cargo build
  1. Run. Output will be saved in tenhou_mjailog directory.
    python main.py --tenhou_convlog --year 20XX

Dump feature for supervised learning

    python main.py --dump_feature --input_logdir logdir --input_regex log*.json --output_npzdir outdir

Note that system.exe from akochan is required. This command assumes that logfiles log001.json, log002.json, ... are in directory logdir. Output files are saved in directory outdir.

Check supervised model

    python main.py --check_model --log_line XX

Supervised model shows probability of each action at line XX(1-indexed) of log/haifu_log_1001_0.json.

    python main.py --check_model --log_line XX --player_id P

A player P(one of 0,1,2,3), chooses action at line XX of log/haifu_log_1001_0.json.

Input arguments from text file

The argument '--argfile xx.txt' is expanded with the contents of xx.txt. That is, the command

    python main.py --dump_feature --input_logdir logdir --input_regex log*.json --output_npzdir outdir

is equivalent with

    python main.py --dump_feature --argfile xx.txt --output_npzdir outdir

when the contents of xx.txt is the following.

--input_logdir logdir
--input_regex log*.json

Note that '--dump_feature' and '--output_npzdir outdir' can be included in xx.txt.

Used materials

Images : https://majandofu.com/mahjong-images

akochan_ui's People

Contributors

critter-mj avatar lawrencelea avatar wacha1112 avatar hyskylord avatar rick0000 avatar

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.