Giter Site home page Giter Site logo

akagi's Introduction


Akagi

「死ねば助かるのに………」- 赤木しげる



Ask me anything about this at Discord

中文
Report Bug . Request Feature

About The Project

"The purpose of this project is to provide people with a convenient way to real-time understand their performance in Majsoul game matches and to learn and improve from it. This project is intended for educational purposes only, and the author is not responsible for any actions taken by users using this project. Majsoul officials may detect abnormal behavior, and any consequences such as account suspension are not related to the author."

image

Akagi.mp4

Usage

Flowchart

Flow

Setup

Installation.

YouTube Video for you to follow.

You will need:

  1. A mortal.pth. (Get one from Discord server if you don't have one.)
  2. A libriichi that match your system. (Get it here)
  3. (Optional, Recommend) Use Windows Terminal to open client.py for a nice looking TUI.
  4. (Optional) If you want to use Steam, Majsoul Plus, or anything other client, proxy the client using tools like proxifier.

Get mortal.pth at Discord

  1. Go to #verify and click the ✅ reaction.
  2. Go to #bot-zip
  3. Download a bot you like.
  4. Extract the zip.
  5. And mortal.pth is there.

Akagi:

Download install_akagi.ps1 at Release

  1. Put install_akagi.ps1 at the location you want to install Akagi.
  2. Open Powershell as Administrator
  3. cd in to the directory
  4. Run: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
  5. Run: install_akagi.ps1
  6. Open mitmproxy if this is your first time using it.
  7. Close it.
  8. Go to your user home directory ~/.mitmproxy
  9. Install the certificate.
  10. Put libriichi into ./Akagi/mjai/bot and rename it as libriichi
  11. Put mortal.pth into ./Akagi/mjai/bot

settings.json

  • Unlocker: Decide to use MajsoulUnlocker or not.
  • v10: If your Majsoul client in still in v0.10.x and you want to use MajsoulUnlocker, set it to true.
  • Autoplay: Autoplay.
  • Helper: To use mahjong-helper or not
  • Autohu: Auto Ron.
  • Port:
    • MITM: The MITM Port, you should redirect Majsoul connection to this port.
    • XMLRPC: The XMLRPC Port.
    • MJAI: The port bind to MJAI bot container.
  • Playwright:
    • enable: Enable the playwright
    • width: width of the viewport of playwright
    • height: height of the viewport of playwright
  • The rest are the setting for MajsoulUnlocker.

Instructions

Main Screen

image

You can see that there are two flows here, usually the top one is the "Lobby" websocket flow, and the bottom one is the "Game" websocket flow which appears after you join a match.

Click on the bottom flow to start. (It can take a while, click once and wait, don't click it for multiple times)

Flow Screen

image

After you are in the Flow Screen, this is what you should see. On top left is the LiqiProto Message we captured using MITM. The LiqiProto Message is then transcribe to mjai format and send to the bot(AI).

On top right is the MJAI Messages, this is the message our bot sent back to us, indicating the action we should do.

Then below is our tehai, it is composed using unicode characters.

Bottom left is the settings.

Bottom right is the bot's action.

How to keep your account safe

Following guide can minimum the probility of account suspension.

  1. Don't use steam, use web instead.
  2. Use safe_code.js from Majsoul Mod Plus
  3. Don't use MajsoulUnlocker as it modifies websocket.
  4. Don't use autoplay, play it yourself.
  5. Try to use stickers often.
  6. Don't completely follow what bot told you to do.
  7. Don't play 24hr a day using autoplay.

There is no way to guarantee 100% no account suspension currently.

TODO

  • 3 Player Mahjong
    • Already done, but not planned to release yet.
  • Change Setting inside application.
  • Autoplay
    • Auto use stickers to make opponent think we are not a bot.
    • Add random time in settings.json to let user choose time they want.
  • Mix multiple AI's decision to make we more like a human but not a perfect bot.
  • Reduce Startup time of the bot. (Maybe start it before match begin?)
  • Intergrade with MajsoulUnlocker
  • Don't use MITM at all for the gameplay, use image recognition.
    • Decide use what model
    • Training data generation
    • Train it
    • Delta Score Recognition.
    • Ryukyoku Recognition.
    • Implement
  • Easier installation.

Need Help!

  1. Any PR is welcomed.
  2. Tell me if the MajsoulUnlocker is working well, is there any trace about we modified the message leaked to Majsoul server?
  3. A stable and safe way to autoplay.
  4. Report any bug you encounter.
  5. Share your bot.zip if it is good.

Authors

Support me

Donating is optional, and the full functionality of this program is avaliable even without a donation.

ETH Mainnet: 0x83095C4355E43bDFe9cEf2e439F371900664D41F

Paypal or Others: Contact me on Discord.

You can find me at Discord.

What can I get after donating?

Firstly, thank you very much for your willingness to support the author.

I will prioritize the opinions of donors, such as feature requests and bug fixes.

Next, you can find me on Discord, where I will assign you a donor role.

See Also

Special Thanks

Equim-chan/Mortal

Majsoul Mod Plus

mahjong-helper

MahjongRepository/mahjong_soul_api

smly/mjai.app

LICENSE

“Commons Clause” License Condition v1.0

The Software is provided to you by the Licensor under the License, as defined below, subject to the following condition.

Without limiting other conditions in the License, the grant of rights under the License will not include, and the License does not grant to you, the right to Sell the Software.

For purposes of the foregoing, “Sell” means practicing any or all of the rights granted to you under the License to provide to third parties, for a fee or other consideration (including without limitation fees for hosting or consulting/ support services related to the Software), a product or service whose value derives, entirely or substantially, from the functionality of the Software. Any license notice or attribution required by the License must also include this Commons Clause License Condition notice.

Software: Akagi

License: GNU Affero General Public License version 3 with Commons Clause

Licensor: shinkuan

akagi's People

Contributors

shinkuan avatar constellation39 avatar iamyou 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.