Jimboom7 / AlphaJong

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

Some call issues #61

Closed cbrt729 closed 2 years ago

cbrt729 commented 2 years ago
  1. The following hand can get to a mangan tenpai by calling pon and discarding 5p. Since we only have to consider pon and kan in 3 player mode, the combination seems simple.
    ##### OWN TURN #####
    Debug String: 4p|33344588p45677s||111z||919m67z1p9s9p1m|27z9m2s1m4s1p63z24p|9m9p356z1m2z2p9s6z|0,0,0|3|1|21
    Right Player Tenpai Chance: 50.2%, Expected Hand Value: 17721
    Left Player Tenpai Chance: 11.5%, Expected Hand Value: 11823
    Strategy: General
    Consider call on 4p
    Could not find combination. Call declined!
  2. The AI accepted the call despite folding on the next discard. The log shows the left player's tenpai chance somehow increased on the discard phase.
    
    ##### OWN TURN #####
    Debug String: 7s6z|35678899p345s55z|||8888s|9m21z1p6s7z|26z91m3z9p|371z9m9s1m|0,0,0|2|2|33
    Right Player Tenpai Chance: 9.5%, Expected Hand Value: 8411
    Left Player Tenpai Chance: 17.9%, Expected Hand Value: 19394
    Strategy: General
    Consider call on 9p
    Combination found: 9p|9p
    Call accepted because it reduces shanten!
OWN TURN

Debug String: 7s6z|356788p345s55z|999p||8888s|9m21z1p6s7z|26z91m3z|371z9m9s1m|0,0,0|2|2|33 Right Player Tenpai Chance: 7.6%, Expected Hand Value: 8186 Left Player Tenpai Chance: 29.2%, Expected Hand Value: 19394 Strategy: General Would fold this hand above 553.67 danger for 3p discard. Tile Danger 599.66 of 🀛: 3p is too dangerous. Hand is very dangerous, full fold. Fold Tile Priorities: Overall: Value Open: <481> Closed Value: <481> Riichi Value: <2208> Shanten: <1> 🀆: 5z: Priority: <2.758> Efficiency: <0.020> Yaku Open: <0.002> Yaku Closed: <0.002> Dora: <1.000> Waits: <0.197> Danger: <53.87> 2 🀠: 8p: Priority: <13.420> Efficiency: <0.070> Yaku Open: <0.150> Yaku Closed: <0.150> Dora: <1.000> Waits: <0.704> Danger: <258.48> Discard: 5z

Jimboom7 commented 2 years ago

I hotfixes the second part of this issue in the master branch. It was a problem related to 3 player mode. I'm currently improving the decision to make calls overall. Once call-improvements is finished the first part of the issue will also be solved.