Question about feature index 4 and 30
Closed this issue · 2 comments
Hi, I'm interested in the difference between the feature index 4 and 30.
The definitions are
- Index: 4:
If player 0 has discarded t 1 in this game
- Index 30:
If player 0 has discarded >= 1 t
My questions are
- Q1: Are those two features supposed to be the same? or not?
- Q2: If not, what is the difference?
I supposed those two are the same but I found some situations where those two are different:
Example 1
index 4
[False **True** False False False False False False False False False False
False False False False False False True False False False False False
False False False False False False False False False False]
index 30
[False **False** False False False False False False False False False False
False False False False False False True False False False False False
False False False False False False False False False False]
-----------------------------------
[Player 0 (this agent)]
点数:25000
自风东
手牌:1m 1m 2m 1p 2p 3p 4p 6p 7p 8p 0s 6s 7s 1p
牌河:1s1h
No立|门清
...
1 step later
index 4
[False **True** False False False False False False False False False False
False False False False False False True False False False False False
False False False False False False False False False False]
index 30
[False **True** False False False False False False False False False False
False False False False False False True False False False False False
False False False False False False False False False False]
-----------------------------------
[Player 0 (this agent)]
点数:25000
自风东
手牌:1m 1m 1p 1p 2p 3p 4p 6p 7p 8p 0s 6s 7s
牌河:1s1h 2m7h
No立|门清
...
Example 2
index 4
[False False False False False False False False False True False False
False False False False False False False False False False False False
False False False False False False False **True** False False]
index 30
[False False False False False False False False False True False False
False False False False False False False False False False False False
False False False False False False False **False** False False]
-----------------------------------
[Player 0 (this agent)]
点数:25000
自风东
手牌:3m 4m 5m 7m 8m 2p 3p 4p 1s 2s 3s 8s 5z 9m
牌河:1p1h
No立|门清
...
1 step later
index 4
[False False False True False True False False False True False False
False False False False False False False False False False False False
False False True False False False False **True** False False]
index 30
[False False False True False True False False False True False False
False False False False False False False False False False False False
False False True False False False False **True** False False]
-----------------------------------
[Player 0 (this agent)]
点数:24000
自风东
手牌:3m 4m 5m 7m 8m 9m 2p 3p 4p 1s 2s 3s 8s
牌河:1p1h 5z5hr 9s9r- 4m13r 6m17r
立|门清
...
Hi Sotetsu,
Thanks for your interests!
First let me answer these two questions shortly, then I will explain the logic behind.
Q1: Are those two features supposed to be the same? or not?
They are mostly the same. Only at the step of deciding Riichi, they might be different.
Q2: If not, what is the difference?
At the step of deciding Riichi, if tile t has not been discarded before. Index 4 will be True and index 30 will be False.
The reason is that the action of Riichi is divided into two steps in Pymahjong. Pymahjong will first ask which tile to discard (step1) -- and if Riichi is possible with this tile discarded, pymahjong will then ask whether to announce Riichi (step2).
The difference of index 4 and 30 will happen on step 2 of Riichi, because the tile has not been discarded yet into the river (index 30), while we want the agent to realize 振てん with this tile in index 4.
By the way, are you still working on Mahjong AI after Suphx?
Let me know if you have any further question!
Thank you for your kind response! @FrostHan
I got the difference between the features.
By the way, are you still working on Mahjong AI after Suphx?
Yeah, I'm still interested in Mahjong AI but I don't have enough time to develop it recently 😂
I'll ask you when I have further questions! Thanks!