Jimboom7 / AlphaJong

A Mahjong AI for Mahjong Soul
GNU General Public License v3.0
396 stars 54 forks source link

能否加入随机延迟出牌?出牌太快、时间太固定容易被认成AI #71

Closed Nanfacius closed 2 years ago

ghost commented 2 years ago

I oppose this kinds of change. If you don't want to be caught as a bot, don't use a bot.

Jimboom7 commented 2 years ago

I'm also against it. Some points:

Nanfacius commented 2 years ago

I'm also against it. Some points:

  • On slower computers the bot uses up most of the 5 seconds anyway, there is not much room for variation.
  • There already is a minor random delay, because different hands require different time to compute. Imo that's enough.
  • Until now the bot has never been caught and I doubt that "standard" anti-bot measures can detect it.
  • On the other hand, if the MajongSoul team really wants to detect this bot specifically they could easily take a look at this repository and find a certain way to detect it - a random delay would not stop them.

Thanks for your response. I think you are right. What concerns me is that it takes nearly no time to compute each hand on my computer. I can't imagine how slow a computer can be if 5 seconds is not enough. Though the MajhongSoul team might not have incentive to detect this bot, other players would suspect that I'm using a bot because I act too quickly.

Jimboom7 commented 2 years ago

@Nanfacius If you really need more randomness you can look for the following lines:

showCrtActionMsg("Calculating best move...");
setTimeout(mainOwnTurn, 200 + (Math.random() * 200));

The delay is currently 200ms (first value) + a random value between 0ms and 200ms (last value). You can change these numbers to your liking, but I'll keep them as they are for default.