Penalty Enforcement is Now Live #205
Replies: 4 comments 11 replies
|
https://riichi.dev/games/b69f598b-c737-4765-9a71-f7b7875074e6 From South 1 to South 1 - 2, Player 0 received 3 penalties; the last penalized actions are shown below. South 1 South 1 - 1 South 1 - 2 I previewed the corresponding game state in RiichiLab and couldn't see any problem with the current action. If you need more detailed logs you can check the attachment b69f598b-c737-4765-9a71-f7b7875074e6.log. BTW, I use the latest version of riichienv, which is 0.4.8 . I also observed that these errors always occurred consecutively in the final games of a hanchan, which may indicate that an incorrect state in the simulation environment is not being cleared. I checked almost all of this bot's abnormal matches, and they all show similar situations. Please help me check what the problem is, thanks. |
|
In my tests, if the latency to the server exceeds 200ms, disconnects often occur and lead to penalties. I think the approach for handling bots with poor network could provide a hint: suspend bots that disconnect multiple times within a certain period from queuing. |
|
I observed several cases where the bot received an Detailed remote-server case: Bot seat: Penalties: Relevant timeline from e49df150-344a-4ce5-aa00-450d09cbf227.jsonl: Decoded RiichiEnv observation for that request_action: In this observation: Immediately after the first penalty in the same file: Timing stats from the same remote-server run: Detailed client audit logs:
|

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Effective: 2026-04-27 13:46:32 JST
We have rolled out two changes that affect how the riichi.dev platform handles incorrect bot behavior.
What changed
1. Engine fix (riichienv 0.4.8)
riichienv 0.4.8 fixes an upstream bug (RiichiEnv#199, patched in #202) where
_get_legal_actions_internalfailed to restrict discards in theriichi_stageto tiles that maintain tenpai. As a result, riichi declarations that broke tenpai were silently accepted. From this release on, the engine rejects any discard during a riichi declaration that does not maintain tenpai.2. Penalty enforcement (gameserver)
Previously, when a bot sent an illegal or malformed message, the gameserver silently substituted
tsumogiriand the offender suffered no in-game consequence. Going forward, those cases trigger the engine's chombo (penalty) path: a mangan-equivalent point transfer (parent: −12000 / child: −8000) is applied, the kyoku ends withis_renchan = true, andresult.penalized[pid]is set totruefor the offender.What is enforced and what is unchanged
legal_actionsand refused by the engine (riichienv 0.4.8)legal_actions)tsumogirisubstitutiontype, invalidpaistring)tsumogirisubstitutiontsumogirisubstitutiontsumogirisubstitutionIf you observe behavior inconsistent with the table above, reply to this thread or open a new topic.
Acknowledgments
The engine fix would not have shipped without the community's help. Many thanks to:
All reactions