Giter Site home page Giter Site logo

latorc / mahjongcopilot Goto Github PK

View Code? Open in Web Editor NEW
232.0 2.0 37.0 22.82 MB

雀魂游戏实时 AI 指导 / In-game step-by-step AI Assistant for Maj-soul

Home Page: https://mjcopilot.com

License: GNU General Public License v3.0

Python 99.61% Batchfile 0.39%
mahjong-ai majsoul

mahjongcopilot's People

Contributors

ccervus avatar d4kpps8v avatar latorc avatar yegetables avatar zxis233 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

mahjongcopilot's Issues

主程序无法启动

主程序偶然会发生无法初始化的问题,一旦出现无法初始化的问题接下去如何操作均无法再次正常启动主程序

2024-04-21 10:54:41,265 INFO [MainThread]settings.py:65 | Settings initialized and saved to settings.json
2024-04-21 10:54:41,622 INFO [BotThread]bot_manager.py:221 | Starting mitm proxy server, port=10999, upstream_proxy=sock5://localhost:7890
2024-04-21 10:54:41,622 INFO [BotThread]bot_manager.py:223 | Installing MITM certificate
2024-04-21 10:54:41,632 DEBUG [BotThread]mitm.py:180 | Certificate file: E:\MahjongCopilot\mitm_config\mitmproxy-ca-cert.cer
2024-04-21 10:54:41,665 INFO [UpdateHTML]updater.py:57 | Loading help html from https://mjcopilot.com/help
2024-04-21 10:54:41,726 INFO [BotThread]bot_manager.py:225 | MITM certificate installed
2024-04-21 10:54:41,726 ERROR [BotThread]bot_manager.py:263 | Bot Manager Thread Exception: Event loop is closed
Traceback (most recent call last):
File "bot_manager.py", line 225, in run
File "logging_init
.py", line 1489, in info
File "logging_init_.py", line 1634, in log
File "logging_init
.py", line 1644, in handle
File "logging_init_.py", line 1706, in callHandlers
File "logging_init_.py", line 978, in handle
File "mitmproxy\log.py", line 221, in emit
File "asyncio\base_events.py", line 806, in call_soon_threadsafe
File "asyncio\base_events.py", line 519, in _check_closed
RuntimeError: Event loop is closed
2024-04-21 10:54:42,546 DEBUG [Check_update]updater.py:105 | Check update: Local version=0.5.5, Web version=0.5.5
2024-04-21 10:54:42,546 ERROR [Check_update]updater.py:113 | Event loop is closed

提示GUI更换字体

看到readme中的GUI可以正常显示麻将的彩色Emoji,请问使用的是哪一款字体?
是否可以在Python中进行指定?

建议不要打出后就清空 AI 提示,改成对局结束后再清空比较好

第 327 行 self.ai_guide_var.set("") 能不能不要这么快清空 AI 提示,比如我想自己先决定打什么,打出了之后再看看 AI 会怎么选择,这时却发现被清空了,很难受
改成对局结束后再清空比较好

# Update AI guide from Reaction
pending_reaction = self.bot_manager.get_pending_reaction()
if pending_reaction:
ai_guide_str, options = mjai_reaction_2_guide(pending_reaction, 3, self.st.lan())
ai_guide_str += '\n'
for tile_str, weight in options:
ai_guide_str += f" {tile_str:8} {weight*100:4.0f}%\n"
self.ai_guide_var.set(ai_guide_str)
else:
self.ai_guide_var.set("")

如果可以的话我可以提一个 PR

ImportError

ImportError: DLL load failed while importing libriichi
请问如何解决

还有requirement.txt里少了个numpy

自动播放错误?

开启自动播放后,玩家无法以较高频率打出一张牌,时间限制到期。 相关区域的日志粘贴如下。

2024-04-10 22:41:25,588 INFO [BotThread]game_state.py:594 | Bot out: {'type': 'dahai', 'actor': 2, 'pai': '9s', 'tsumogiri': True, 'meta': {'q_values': [-7.6980696, -6.8152075, -0.17997062, -5.668787, -5.942912, -4.8249125, -8.440149, -0.06938946, -7.593259, -3.0436797, -0.22938383], 'mask_bits': 13225183494, 'is_greedy': True, 'batch_size': 1, 'eval_time_ns': 67163400, 'shanten': 3, 'at_furiten': False}}
2024-04-10 22:41:25,589 DEBUG [Auto_dahai_9s]automation.py:230 | Start executing task: Auto_dahai_9s, Automating action dahai 9s (step = 8)
2024-04-10 22:41:27,506 DEBUG [Auto_dahai_9s]automation.py:243 | Finished executing task: Auto_dahai_9s
2024-04-10 22:41:29,008 INFO [BotThread]bot_manager.py:457 | Retry automating pending reaction: dahai
2024-04-10 22:41:29,008 DEBUG [Auto_dahai_9s]automation.py:230 | Start executing task: Auto_dahai_9s, Automating action dahai 9s (step = 8)
2024-04-10 22:41:30,926 DEBUG [Auto_dahai_9s]automation.py:243 | Finished executing task: Auto_dahai_9s
2024-04-10 22:41:32,426 INFO [BotThread]bot_manager.py:457 | Retry automating pending reaction: dahai
2024-04-10 22:41:32,426 DEBUG [Auto_dahai_9s]automation.py:230 | Start executing task: Auto_dahai_9s, Automating action dahai 9s (step = 8)
2024-04-10 22:41:34,567 DEBUG [Auto_dahai_9s]automation.py:243 | Finished executing task: Auto_dahai_9s
2024-04-10 22:41:36,070 INFO [BotThread]bot_manager.py:457 | Retry automating pending reaction: dahai
2024-04-10 22:41:36,070 DEBUG [Auto_dahai_9s]automation.py:230 | Start executing task: Auto_dahai_9s, Automating action dahai 9s (step = 8)
2024-04-10 22:41:37,753 DEBUG [Auto_dahai_9s]automation.py:243 | Finished executing task: Auto_dahai_9s
2024-04-10 22:41:38,590 DEBUG [MainThread]bot_manager.py:158 | Bot Manager disabling automation

游戏窗口大小会变来变去

在结束一局游戏时,会自动循环点击确定的位置。这时候每自动点击一次,窗口大小就会变小再恢复一次,不知道是什么原因。而且就算回到主界面后不点击,还是会每2秒就缩放一次。

开启自动打牌时超时切换自动模式

不知道是不是必须一直焦点在游戏里造成的,反正如果时不时切出去干点别的忘了切回去再回去看的时候就显示变成自动模式了,反正X+20秒肯定是没了

三麻功能如何使用

我把三麻文件重命名为 mortal_3p.pth 放入 models 文件夹以及 libriichi3p.pyd 放入 libriichi3p 文件夹之后报错。显示找不到 libriichi3p-3.11-x86_64-pc-windows-msvc.pyd 文件。把文件改成这个名称后仍然报错
WARNING [BotThread]bot_local.py:38 | Cannot import libriichi3p: dynamic module does not define module export function (PyInit_libriichi3p)
已经测试过在 Akagi 上正常使用。

MITM证书导入成功但程序未识别

已尝试管理员身份运行MahjongCopilot.exe和手动安装mitmproxy-ca-cert.cer到本地计算机受信任的根证书颁发机构,证书显示导入成功,但打开Copilot右下角仍是红叉?请问是证书未能正确安装吗?

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.