Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WWYD Puzzles #53

Closed
yeanshu opened this issue May 13, 2022 · 1 comment
Closed

WWYD Puzzles #53

yeanshu opened this issue May 13, 2022 · 1 comment

Comments

@yeanshu
Copy link

yeanshu commented May 13, 2022

I ran some WWYD puzzles as testcases, and I found some discrepancies between the bot and the solutions.

34567m2388p5779s1p; dora 2p
Bot returns 5s, but should be 7s because of higher Pinfu chance.

678889m40579p33s8p; dora 9s
Bot returns 9m, but should be 5p because of higher tile acceptance.

112m223677888p06s; dora 1p
Bot returns 1m, but should be 2m because of higher tile acceptance.

556m133345678p22s; dora 7p
Bot returns 1p, but should be 5m again because of higher tile acceptance.

345m233444p0667s4m; dora 9s
Bot returns 4m, but should be 3p. Tile acceptance again.

Judging by the differences, it seems like maybe there's something off about the ukeire formula, or maybe Yakus are being weighted too heavily.

@Jimboom7
Copy link
Owner

Thank you for the feedback. I analyzed all of the puzzles you mentioned:

About 1 and 5:
These were caused by a minor inconsistency. When in 1 shanten the bot tried to also predict how many waits the final hand will have. But that feature was not accurate, so I disabled it and now it discards the tiles you mentioned.

About 2:
The bot tries to keep the second 5p to secure the red five dora, because as a pair it will almost certainly be kept in the hand, even if it does not improve into a triple. It's not easy to predict if other shapes will be kept or discarded (even a ryanmen shape might be eventually discarded if the hand is missing a pair later). As a human it's easy to see in this case, but for a bot it can be difficult and I'm not sure how to solve it.

About 3 and 4:
This is related to Yaku. By discarding 1m or 1p there is a chance for tanyao. It's arguable if this is actually the best choice, but it certainly is not a "wrong" discard.

Overall I just want to add that the bot is far from perfect. With this conventional algorithm it's basically impossible to balance all aspects of the game. In these examples it seems like maybe Yaku is weighted too heavily, but if I tune it down other cases might not work anymore. If you are unhappy with the default behavior you can modify the parameters to your liking.
I'm closing this issue for now. I put your second puzzle on my To-Do list and I will get to it eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants