Skip to content

Instantly share code, notes, and snippets.

@Equim-chan
Last active Jul 4, 2022
Embed
What would you like to do?
Should I release the pre-trained model of my mahjong AI?
简体中文

更新

2022-04-13

已经开源在了 https://github.com/Equim-chan/Mortal

我是否要发布训练好的麻将 AI 模型?

麻将社群,我需要你们的帮助。

背景

我是 akochan-reviewer 的作者,这是一个基于 critter 的 akochan 制作的麻将学习工具

我制作麻将牌谱检讨工具的初衷是希望它能成为一个 7x24 小时在线的教练来教导人类玩家,尤其是那些没法接触到高质量教学资源或者教练的人。这样的工具已经在国际象棋和围棋这样的游戏里存在了,而麻将也应当有一个。当我看到有人说他们从 akochan-reviewer 学到了什么的时候,我是挺欣慰的,即便 akochan 时常做出反常的行为。

akochan 举止怪异是一个我也无法修复的已知问题。出于对 akochan 存在的种种限制、不足、以及糟糕的性能的不满,我决定自己做一个全新的 AI。

费劲将近一年的心血之后,我从零开始完成了一个强度足够的麻将 AI 的 1.0 版本。它很强,根据它和 akochan 对战的统计数据可以得出它的水平已经超过 akochan,也包括了其他我所能拿到的 baseline,它可能和初版的 Suphx 强度相当。

这个 AI 兼容 akochan 的协议,也就是 mjai,所以我的 akochan-reviewer 能很轻易地支持以它为后端。

在接下来的几个月,我准备要将源代码公开至 GitHub,但我在犹豫是否要公开训练好的模型。

如果你感兴趣的话,这里有几张新 AI 的 1.0 版本(旧版本,现已被新版本击败)之间自我对战的牌谱:

理由

公开模型的理由

1. 有始有终

如果只有代码没有预先训练好的模型,对于一个深度学习项目来说总显得有点不太完整。如果模型也发布了的话,其他的研究员就无需自己训练模型了,节省了大量的时间和金钱。

2. 在本地运行的能力

正如我所做的 akochan-reviewer 一样,用户可以轻易地下载到预先构建好的版本,然后在本地跑。目前,我正在维护的 akochan-reviewer 的在线版本只有有限的功能,也无法检讨雀魂牌谱,而本地版本却有所有的功能,并且能读取下载好的雀魂牌谱,甚至还能输入任意自定义的牌谱。

3. 方便衍生作品

也许其他人比我有更好的方式去做麻将牌谱检讨机。发布模型的话,他们就可以轻易地发布或部署他们自己的检讨机或者其他正规的衍生作品,只要把模型嵌入。

4. 就算不发布,开挂的人自己也会训练模型

然后他们还能以此为理由卖得更贵。

也许在我把源代码公开的那一刻,我就已经输给了做挂的人。如果他们不惜一切代价都要搞的话,说不定我自己免费公开模型让他们难以获利还更好,尽管这理由听着挺蠢。

不公开模型的理由

开挂的人一定会利用它

这是我最大的担忧。

首先有个坏消息,这样的不当利用 已经 发生在了 akochan 上。一些脚本小子已经售卖基于 akochan 的雀魂 bot 有些时间了。尽管他们在描述里没提到 akochan 的名字,但有很多线索指向他们在用 akochan 或者 akochan 的改版。

我看到的时候心情很复杂。我对做挂卖挂的行为感到气愤,也为他们在卖偷来的东西感到失望。但突然间又感到一丝庆幸,还好他们没打上 akochan 的标签,不然吃瓜群众可能会误解是 akochan 开发者的授意。最后我只能感到悲哀,因为即便他们没有售卖、散布、制作外挂,终有一天也会冒出来另一群人在做类似的事,只要 AI 能够从公共途径获取到。

我并不反对制作天凤或者雀魂的个室 bot,相反,我觉得他们非常实用,无论是想玩但找不齐人,或者只是单纯好奇想和 AI 在自己熟悉的平台上比试比试。

可惜,人的恶是无法被阻止的。能被不当利用的东西一定会被不当利用。如果我发布了训练好的模型,我实在找不到什么方法能去避免它被利用去打段位战。更糟糕的是,我可能还会被受害者指责“在帮人做外挂”。很难想象会有多糟糕。

其他类似的项目是如何处理的?

国际象棋的 stockfish

stockfish 是个很有名的开源国际象棋 AI。如果你玩国际象棋,辛苦把你所知道的分享一下。

  • stockfish 有把在线象棋平台毁了吗?如果是的话是多大程度的影响?
  • 在线象棋平台如何避免人们使用 stockfish 来作弊?
  • 在线象棋的玩家对此怎么看?

NLP 的 GPT-3

这个不是游戏 AI,但它在现在这个上下文里算是个不错的例子。

OpenAI 的 GPT-3 的预训练模型,从来没有被公开发布过。根据我所听到的故事,是因为模型实在太强,太容易被滥用。当然也可能是因为商业价值太高。

最近,OpenAI 宣布了一系列的由 GPT-3 模型支持的在线服务。我觉得我也可以走类似的路子,提供些在线服务,比如牌谱检讨和去个室玩。这也是 NAGA 正在做的事情。

可能的解决方案

1. 不发布模型

最直接,但这很大程度上限制了这个项目能对麻将社群做的贡献。

2. 不发布模型,但是提供在线服务

听起来不错,但是开发和维护在线服务需要时间和钱,而且如果我哪天丧失了兴趣就没了。我可能需要做一些需要捐赠才能解锁的会员功能来支撑服务运行下去。但是做成收费的话又会丧失其之于 NAGA 的优势。

3. 发布模型,但是要付费

盗版的运作方式同样能放在这。同时,这也只让做外挂的人更难搞,并不是完全阻止。

… 更多?

请在下方评论。


如果你有任何想法,请在下方留言。谢谢。

Equim.

English

Updates

2022-04-13

The source code is now avilable on GitHub at https://github.com/Equim-chan/Mortal.

Should I release the pre-trained model of my mahjong AI?

Dear mahojng community, I need your help.

Background

I am the author of akochan-reviewer, a mahjong learning tool powered by critter's akochan.

My original intention for building mahjong reviewer was that it could serve as a 7x24 available coach that guides human players, especially for those without access to high-quality tutorial or coach resource. Such tools already exist in other games like chess and go, and mahjong should also have one. I am really happy to see people telling me they learn something from akochan-reviewer, even though akochan acts weird from time to time.

Akochan acts weird, this is one of the known issues, and I can't fix it as well. Out of dissatisfaction with the limitations, weaknesses and poor performance of akochan, I decided to make a brand new one myself.

After almost a year of hard work, I managed to build the 1.0 version of a powerful mahjong AI from scratch. It is very strong. Statistics from test plays conclude it is stronger than akochan and any other available baseline I have, and it's probably as strong as the early version of Suphx.

The AI is compatible with akochan's protocol, namely mjai, therefore it can serve as a backend for my akochan-reviewer very easily.

In the next several months, I am going to release the source code on GitHub, but I am hesitant to release the pre-trained model.

If you are interested, here are some games the new AI (version 1.0, weaker than the current version) played with each others:

Reasons

To release the model

1. Make the research complete

It feels a bit incomplete for a deep learning project to only release the code without a pre-trained model. If the model is released, other researchers won't have to reproduce the model on their own, which save a huge amount of time and money.

2. Ability of running locally

Just like akochan-reviewer I made, users can easily download a prebuilt all-in-one package and run it locally. At the moment, the online reviewer service I maintain has limited features and no access to mjsoul logs, whereas the local version has all the features and can read downloaded mjsoul logs and even any hand-crafted log.

3. Easier for derived works

Maybe somebody else have a better idea of making a mahjong reviewer than me. By releasing the pre-trained model, they can easily release or deploy their own reviewer or other legit derived works bundled with the AI.

4. Cheaters are going to train their own model anyways

And they will even sell it higher for such reason.

I may have already lost to cheaters by the time I release the code to the public. If they're going to do it at any cost, it might be even better for me to release the model for free to make them harder to profit, although the idea sounds a bit dumb.

Not to release the model

Cheaters will definitely exploit it

This is the biggest concern.

First of all I have some bad news, such exploit is already happening on akochan. Some script kiddies in the wild have been selling akochan bot for mjsoul for some time. Although they don't mention of the name "akochan" in the description, there are some indications that they are using akochan or a modified version of it.

I had very mixed feelings when I saw it. I was angry for the conduct of making and selling cheats itself, and also for them selling things they stole from others. But then I happened to feel a bit thankful for them not having tagged it with the name "akochan", which will be worse as people may think it is affiliated with akochan devs. And in the end, I was just sad. Even if those guys had not sold, distributed, or even developed the cheat, as long as the AI is publicly available, another group of people will eventually get their hands on it.

I am not against making tenhou or mjsoul bots that play in private lobbies, instead, I think they are very handy and useful when you want to play but can't find enough friends, or you are just curious and simply want to challenge the AI on the platform you are familiar with.

Unfortunately, there is no way to stop people from being evil. Things that can be exploited will be exploited. If I release the pre-trained model, I don't see a way to prevent it from being exploited to play in ranked lobbies. Even worse, I may become the one to be blamed by some victims for "assisting cheaters". I honestly can't imagine how horrible it will be.

How do other similar projects handle it?

stockfish for chess

Stockfish is a well-known open source chess AI. If you are a chess player, please share information you know about it.

  • Has and how has stockfish destroyed online chess?
  • How do online chess platforms keep people from cheating with stockfish?
  • How do online chess players think about it?

GPT-3 for NLP

This is not a game AI, but it serves as a good example in this context.

The trained model of GPT-3, by OpenAI, were never released to the public, according to the story I heard, because the model is so powerful that it can't be kept from being exploited. Of course it is also possible that it is because the commercial value of it is too high.

Recently, OpenAI announced a suite of online services backed by GPT-3. I believe I can go the similar way by not releasing the weights and instead offering online reviewer and private lobby bot services. Offering online services is also what NAGA is doing.

Possible solutions

1. Do not release the model at all

The straightforward way, but it greatly limits the project's ability to benefit the mahjong community.

2. Do not release the model, but offer an online service for review and bot for private lobby

Sounds good, but it takes time and money for me to develop and maintain the service, and it probably won't last forever if someday I lose my interest. I may need to make some features premium that require donations to unlock to keep the service alive. But if it becomes pay-to-use, it will lose its advantage over NAGA.

3. Release the model, but behind a paywall

We all know how piracy works and the same can apply to this. It only makes it harder for cheaters but does not completely make it impossible.

... more?

Please comment down bellow.


If you have any idea, please comment down bellow. Thank you.

Equim.

@Aci1
Copy link

Aci1 commented Feb 27, 2022

我覺得可以賣/送給貓糧工作室讓他們能先看怎麼應對這個搞反作弊,也能讓他們的電腦/人機強一點
至於要不要公開放出還是看你,畢竟這真的有可能會讓雀魂的對戰環境變差

@Ranossy
Copy link

Ranossy commented Feb 27, 2022

目前依靠akochan制作的bot大多活跃在金间和玉间,影响的主要是雀豪以上玩家的体验,这部分玩家对麻将认识已经有一定的水平。而且这类AI的特点之一是一二向听附近会有大量连续的长考,对局风格和实战数据也较为统一,因此还是比较容易识别出来的。

因为目前已经有了akochan,就算你不公开模型,现有的bot在官方找到控制方法前也不会消减。而公开一个更高水平模型的改变可能也仅仅是将bot的活跃范围扩散至王座间,而王座间玩家的水平自然更容易识别AI。所以公开模型其实不会对现状造成什么改变。

对于防止bot泛滥来说,更多的努力还是应该在游戏官方,而不在算法和模型上。就像当前围棋平台上一堆bot不会因为alpha-go没有公布算法就减少,但是alpha-go等高水平AI辅助复盘却让人类棋手的水平有了明显的提升。

总的来说,公布的好处应该是远大于坏处的。

@maotangtang
Copy link

maotangtang commented Mar 7, 2022

我在nga发了个帖子来讨论他们对你的看法,你可以去看一看
https://bbs.nga.cn/read.php?tid=30891426

@dnf63123848
Copy link

dnf63123848 commented Mar 18, 2022

作为一个雀魂普通玩家,我个人希望ai只用来讲谱而不是在段位场爆杀我。

@feiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

建议 做一个完整的麻将游戏 。

@Equim-chan
Copy link
Author

Equim-chan commented Mar 18, 2022

作为一个雀魂普通玩家,我个人希望ai只用来讲谱而不是在段位场爆杀我。

从技术角度上说这做不到。能讲谱一定能做成 bot。

@suwvjiang
Copy link

suwvjiang commented Mar 19, 2022

更建议与官方合作来公开发布和宣传这个AI。
作弊的事情是无法避免的,这是人性上的一个弱点。
历史的发展长河里,作弊是一直存在的,不以人的意志转移。
只依靠个人的力量,很难对抗作弊的黑暗组织。
必须要依靠反作弊的正义组织,才能与之抗衡。
而对反作弊最上心,最用心的,莫过于官方麻将组织了。
用魔法打败魔法,用组织打败组织!

@wyman0318
Copy link

wyman0318 commented Mar 22, 2022

我认为可以和猫粮交流下技术看如何应对作弊

@wyman0318
Copy link

wyman0318 commented Mar 22, 2022

跟猫粮或者其他厂商讨论下看看能不能让他们运营这个看谱的服务器,然后包装成只能看牌谱的网站,我个人是觉得可以收费

@Equim-chan
Copy link
Author

Equim-chan commented Mar 22, 2022

跟猫粮或者其他厂商讨论下看看能不能让他们运营这个看谱的服务器,然后包装成只能看牌谱的网站,我个人是觉得可以收费

我可以知会天凤与猫粮,但恐怕无法开展研发方面的合作。另外我比较希望我的成果能独立存在,不想增加依赖方。

@KiraYo4kage
Copy link

KiraYo4kage commented Apr 2, 2022

支持类似包月收费,naga太贵了,对于我这种狂打选手根本不够用

@Tennsoku
Copy link

Tennsoku commented Apr 2, 2022

如果不打算和角田猫粮合作变成平台嵌入的服务的话,我觉得从他们角度来说很大可能是不愿意看到你公开模型的。
如果做成付费服务不公开,只要功能性上能胜过NAGA,我认为还是会有相当部分的人愿意转投新的AI。
如何处理这个模型可能确实只能从各方利益出发分析了,然后选择你的屁股。个人角度来说我是希望能和平台方有合作,但是也理解作者想要保存成果的想法(何况就猫粮角田一贯的尿性,他们有没有精力和乐不乐意研发也是很大的问题);退而求其次的话做成收费服务也很好,只要有讲谱对练这种关键需求的服务,我是乐于交钱的。

@Tennsoku
Copy link

Tennsoku commented Apr 2, 2022

公开模型的话其实我觉得从作者角度来说是没有太大的责任的,虽然带来的影响是整个社区一起负担,但是平台方一定比你头大(笑)事先知会他们已经算仁至义尽了,怎么应对则是他们自己的事情

@b11p
Copy link

b11p commented Apr 8, 2022

我希望公开模型。我最近就在用 akochan-reviewer 看牌谱,获益良多。我平时用 Steam 上的客户端打,不想用第三方客户端,所以每次都要特意打开网页版下载牌谱,非常麻烦。为了减少麻烦,我自己部署了 tensoul,写了一点代码和 akochan-reviewer 粘在一起,这样就方便多了。如果没有公开模型,我肯定就没法这么做了。

如果不公开模型,做成在线服务,处理 IP 被雀魂 ban 这种事可能也很麻烦。公开了则可以让用户自行部署,我认为可以最大限度发挥模型的作用,同时你也能节省精力。甚至你还可以在 README 里推荐比较好的衍生服务和作品。

@LYJ19950412
Copy link

LYJ19950412 commented Apr 13, 2022

这个AI光发出来,训练模型不公开的话,使用者肯定是没有那个能力去自己训练模型的,即使用者也无法通过将本AI接入 akochan-reviewer来学习;而做外挂的,肯定有人脉支持他自己训练模型,看他做不做而已,所以这个AI公布之后,实际作用对于平常使用者有限,外挂肯定是无法避免的了,时间的问题而已,现在公布AI仅仅是有利于做外挂的,让他们能得到更强的AI做更强的外挂

@Equim-chan
Copy link
Author

Equim-chan commented Apr 14, 2022

这个AI光发出来,训练模型不公开的话,使用者肯定是没有那个能力去自己训练模型的,即使用者也无法通过将本AI接入 akochan-reviewer来学习;而做外挂的,肯定有人脉支持他自己训练模型,看他做不做而已,所以这个AI公布之后,实际作用对于平常使用者有限,外挂肯定是无法避免的了,时间的问题而已,现在公布AI仅仅是有利于做外挂的,让他们能得到更强的AI做更强的外挂

这个说法很好,我之前没有好好考虑到这一点。不过,仅凭现在公开的代码要去训练也不 trivial,因为我还没有公开数据集或者它们的获取方式,也没有说明训练的配置方式,而这些要外挂开发者去研究的话,都是需要额外的工作和时间的。训练本身的话确实可能比较 trivial,就像 Discord 群一位群友所说,it doesn't even need to be strong (to be used as a cheat)。

我之前计划的 timeline 是 akochan-reviewer 改造完毕,支持 Mortal 之后,就会公开模型。

@LYJ19950412
Copy link

LYJ19950412 commented Apr 15, 2022

您的AI不是有个官网吗,能否先将mortal的数据接入方式修改,使其与akochan的数据接入方式区别开来(因为现有的BOT基本都是使用akochan接入),然后将 Mortal及其训练好的模型、akochan-reviewer两者整合编译和加密之后,之后别人应该比较难获得您的训练模型吧(其实我也不是很懂这个),放到官网上供需要AI讲谱学习的使用者下载,而且exe方式也比较方便使用者使用,因为一般使用者也不会处理这么多软件方面的操作问题,而不是将训练模型直接公布,以后如果不想维护了,再把AI及对应的训练模型交给可信的人继续跟进或者直接为使用者提供最后更新的版本。

@Equim-chan
Copy link
Author

Equim-chan commented Apr 15, 2022

这做不到,混淆与加密只会减慢被滥用的速度而无法阻止。

关于后续,我会像 akochan-reviewer 的 release 页面一样,直接放一个全都编译好了的版本,开箱即用的。

@hansen0086
Copy link

hansen0086 commented Apr 17, 2022

都已经开源了开不开源模型是不是没有太大意义了?训练一个模型也就是租个服务器跑一段时间的问题啊。

@celie1
Copy link

celie1 commented Apr 17, 2022

Here is my two cents on this, considering those cheaters that are already profiteering on Akochan with monthly subscription from users (guarantee to get Saint and possible Celestial in Majsoul's Jade Room), I believe there wouldn't be much different even if a much stronger version like Suphx is available for exploitation, they would still be dominating in Jade Room, since Jade Room have the most PT-efficiency for achieving Celestial.

While those who use NAGA as a learning tools or can't afford to pay for NAGA will benefits from the available offline service.

@LYJ19950412
Copy link

LYJ19950412 commented May 18, 2022

我建议你还是不要公布模型为好,隔壁自动打牌bot作者和沆瀣一气的用bot给别人代练的黑心人,天天说说你做个开源AI,然后反手要比特币赞助,天天说你又立牌坊又装高大上,自己觊觎着新的强力AI,他们得不到你的mortal就骂,我也得知他们正在谋划着用隔壁的kanachan作为自动打牌bot的新AI,目前正在测试训练的功能,等新的40系显卡训练

@LYJ19950412
Copy link

LYJ19950412 commented May 18, 2022

Screenshot_2022_0518_182339

@Equim-chan
Copy link
Author

Equim-chan commented May 18, 2022

@LYJ19950412 感谢你的情报,我也转告了 kanachan 的作者 Cryolite。

我之前参考了你的建议,打算至少也要等我把 reviewer 改好,让一般的麻将玩家也能很顺手地使用 Mortal 检讨牌谱之后,才放出模型。这个决定基于几点原因:

  • 现在公开模型只会让开挂的更方便,一般玩家反而无法收益。
  • 如果只是拿来作弊,其实 AI 本身都不需要有多强。对于外挂制作者来说,可能没有必要为了从「能击败 95% 的人类」训练到「能击败 99% 的人类」而多付出数倍的训练资源。对只想不怀好意拿去在平台上作弊的人来说,自己训练出来的门槛也不算高。换言之,我最终是否放出模型不会造成什么决定性的影响,只是方不方便的问题。
  • 这是一个结构性问题。即便我和 Cryolite 都不公开我们的作品,以后也会有别人做一样的研究,届时他们也依然会面临相同的困境。我觉得迟早也要去面对这个问题。

@LYJ19950412
Copy link

LYJ19950412 commented May 19, 2022

其实更强力的AI,这方面,目前淘宝上有很多代练(雀魂代上分的),很多商家都是用bot打的(价目表到雀豪之后就没有的那些商家和部分说是能上魂天的商家,使用akochan的bot,可以打到雀圣3,甚至有人尝试过自动打到雀圣3的9000分然后开黑上魂天),虽然店铺里标榜着纯手打,群内就有这样的人,每天叫嚣着“反正bot也能上分,为什么要手打,我开着电脑就能赚钱,在家躺平等单子,让电脑自己帮我赚钱就好”之类的话,bot群里很多代练指望着有新的强力AI来突破瓶颈,让他们可以接那种“代上魂天”的单,继续为号主无视封号风险代上分(尽管雀魂近几个月不怎么管bot),以进一步提高收入,您的AI和akochan的接口应该是差不多的,所以说,您一旦公布模型,bot制作者可以较为轻易地升级自己的bot,使得代练bot能更快更好地完成号主的目标,甚至不需要付出多少实际劳动,显然bot代练商家和bot制作者恨不得您马上将您的训练模型公布,好让他们能进一步获取收益

@herjer
Copy link

herjer commented May 19, 2022

其实更强力的AI,这方面,目前淘宝上有很多代练(雀魂代上分的),很多商家都是用bot打的(价目表到雀豪之后就没有的那些商家和部分说是能上魂天的商家,使用akochan的bot,可以打到雀圣3,甚至有人尝试过自动打到雀圣3的9000分然后开黑上魂天),虽然店铺里标榜着纯手打,群内就有这样的人,每天叫嚣着“反正bot也能上分,为什么要手打,我开着电脑就能赚钱,在家躺平等单子,让电脑自己帮我赚钱就好”之类的话,bot群里很多代练指望着有新的强力AI来突破瓶颈,让他们可以接那种“代上魂天”的单,继续为号主无视封号风险代上分(尽管雀魂近几个月不怎么管bot),以进一步提高收入,您的AI和akochan的接口应该是差不多的,所以说,您一旦公布模型,bot制作者可以较为轻易地升级自己的bot,使得代练bot能更快更好地完成号主的目标,甚至不需要付出多少实际劳动,显然bot代练商家和bot制作者恨不得您马上将您的训练模型公布,好让他们能进一步获取收益

LYJ 先生您好,我是牌谱屋主机管理人 EDWARDH ,可以请您联系提供我一些相关的 bot 资料吗? https://twitter.com/EDWARDH_Jantama

我想这可以说是必然的发展,如果变成开源又是个可抽换的模组,必然变成外挂迅速进步而一般玩家受益甚少的状况。所有开源者几乎都出于善心,但"此项目仅用于学习研究使用,请勿滥用于正常游戏或各类活动,以免干扰游戏正常秩序"这种声明对于无耻的人是没有限制力的。

雀魂官方显然专心的事情也不在麻将的公平竞技性与最优化研究,不管 bot 实际上也是确实难管。 https://github.com/747929791/MajsoulAI
模拟的鼠标如果包含了迟延跟点击位置的随机性,那侦测 bot 的难度可以说是增加了好几个数量级。毕竟人也就是眼睛看了牌的组合,判断位置慢慢把手移过去的。就算没有这个自动化,作弊者屏幕上根据 AI 亮出建议打什么他就打什么,任何一个打工人都能办到。

问题的根源当然是用户想买一个雀豪买一个雀圣买一个魂天,有些只是自爽,有些则是要商业化。买一个魂天并不能让自己鸡打的比例下降。但这样的淘宝销售如果不管,那对于认真想改进自己的玩家是很大的打击。如果 Yostar 不管我会建议日本的天凤与雀魂玩家直接推荐日中分服,跨区对局本身的乐趣下降太多。更正确的说,发下来你都告诉我打三万平均 +1.2 pt,打九索平均 -0.3pt,那要我坐那干嘛? 我自己不这样打,也没兴趣跟宣称人打然后用 AI 作弊的人打。

当然我还是要说,并没有理由为了这些坏人而停下我们想帮 "想努力打好牌的人" 的脚步,请继续依自己的步调前进,我会建议用线上 Reviewer 的方式继续装在黑箱子里,打完后的牌谱愿意讨论,那 AI 可以客观而非结果论的依各家切牌推荐,但不需要即时给出建议。我对于 github 上能不能用这样的架构保持怀疑,但我会跟日本的天凤雀魂玩家努力沟通,也会尽量的拿出所需资源来。

@Sasy00
Copy link

Sasy00 commented May 21, 2022

Stockfish hasn't destroyed online chess tbh. I only play on chess.com and lichess.org so I will talk only with my (limited) knowledge of these sites. Basically the countermeasures for cheaters are

  1. Player reports: player can reports other player for cheating, then a team (or in chess.com case a program and a team) decides if they are a cheater or not
  2. in the case of chess.com, directly a program checking if they are cheating or not (idk how it works).

Also it is somewhat easy to spot if someone is cheating, there are a lot of tells that can make you pretty sure they are. For example if they always spend the same ammount of time for EVERY move then they are most likely cheating, because some moves such as taking back a piece in a trade should be done automatically without thinking (except some cases but they are rare) and some moves require lot of calculation to be made which requires more time than an average move. Also if while reviewing the game with an engine you see that opponent played always top 3 moves, even when the moves are really difficult to find because they are counterintuitive (random king moves when lots is happening is the best example), then there is a chance they are cheating. The easiest is when all these conditions are true ofc.

I'm not sure how to tell if someone is cheating on mahjong tho. While playing it is impossible because I can't know what choices they had, and even after playing I can't be sure.

Also I'd like to add that I play online chess since ~2014 and the ammount of cheaters I faced is well under the 50s.
Hope this helps, I'm looking forward to using this amazing tool!

@herjer
Copy link

herjer commented May 22, 2022

I think the conditions are a little different (not a native English speaker so I hope there are no misunderstandings or impolite words).
First of all, the biggest difference between playing chess and mahjong is the uncertainty.
In mahjong we can be sure that the same tile will not appear again (astronomical odds), however, the opening of the chess game and even many of the optimal solutions for specific situations have been improved by traditional human research.
It is almost inevitable in mahjong, combination 34s is better than 68s, but there is 33.3% probability 7s will come before 25s.
The reporting itself is not difficult, the focus is on detection and review.
Since the same hand does not appear again, humans or computers are evaluated in a likelihood method, while humans have much less computing power than computers.

In addition, mahjong is a four-player activity rather than a two-player zero-sum game.
Riichi Mahjong is particularly difficult because rankings may bring more value than raw scores.
I can easily add the friendliness of other players to determine my utility function, making it difficult to detect whether my judgment is based on what is good for me or what is good for "me and a particular position", even if I play the same card, under the uncertainty.

So I think the advice should be given only after 60 seconds of decision, no matter how quickly the hand is calculated by AI.

@Jesterboxboy
Copy link

Jesterboxboy commented Jun 15, 2022

I would say you should release the model as well. My reasoning is as follows:
1.) it's only a matter of time until someone does release a reasonable strong ai with a trained model or just a model for your ai anyway if you don't do it now.
2.) Online platforms will need to adapt, as has happened with all other games where stronger than human ais are available.

@luooooob
Copy link

luooooob commented Jun 28, 2022

我提供一个做决策的角度:

核心的问题是,你究竟是想要

一个 7x24 可用的教练来指导人类玩家,特别是对于那些无法获得高质量教程或教练资源的人

还是

一个非常酷的ai项目,用来验证和提高自己的代码水平和工程能力

如果你的目标是前者,那就应该只提供在线服务,naga收费明显过高了而且支付方式能劝退一堆人,市场还是很大的。但是市场的前提是不能把市场送人,什么扩展能力都可以给但是必须通过在线服务提供,绝对不能提供源码或二进制这种不受控制的东西。还能顺便防止有人用这个ai作弊

如果你的目标是后者的话,那确实应该全程开源,所有细节都展示出来,没啥需要遮掩的。公开源码了不公开模型没必要,甚至数据集也可以公开。我今天来就是要卷死各位或者被各位卷死,什么开挂代练没工夫管那些,也不需要考虑长期怎么办,比较简单粗暴。

@Equim-chan
Copy link
Author

Equim-chan commented Jul 4, 2022

@luooooob 我觉得这两个说法都偏极端了一些。前者并不是就不能开源了,因为开源能提升透明度,还能方便其他人学习、改善这个项目;后者也不是必须要公开模型,甚至都不一定需要开源,就像 AlphaGo 之类的作品一样,不开源对影响力没有太大影响。

但是我想提的一点是,麻将 AI 需要依赖玩家的生态存活。麻将的圈子相比围棋、象棋本来就不大,如果 AI 滥用作弊的情形变得更加普遍了,很多玩家可能会离开这个游戏,圈子会进一步萎缩。到时候 AI 可能都成了口诛笔伐的对象,更难发展下去了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment