Skip to content
This repository has been archived by the owner on Oct 16, 2019. It is now read-only.

バグのない麻雀表示機能を目指して #21

Closed
index30 opened this issue Jun 19, 2015 · 9 comments
Closed

バグのない麻雀表示機能を目指して #21

index30 opened this issue Jun 19, 2015 · 9 comments

Comments

@index30
Copy link
Contributor

index30 commented Jun 19, 2015

目下最大のバグの5枚表示をなんとかします

@ryosan-470
Copy link
Owner

どっかのアニメのタイトルみたい

頑張って欲しい

@index30
Copy link
Contributor Author

index30 commented Jun 19, 2015

順子の方は判定頑張ってくれてるので刻子をなんとかしなきゃ(使命感)

@bobkuro
Copy link

bobkuro commented Jun 19, 2015

ひとまず拾えた:bug:一覧

2015-06-19 10 04 31
2015-06-19 10 02 41
2015-06-19 10 02 31
2015-06-19 10 02 19
2015-06-19 10 02 03

@bobkuro
Copy link

bobkuro commented Jun 19, 2015

貼り忘れ
2015-06-19 10 07 25

@ryosan-470
Copy link
Owner

@sga0221 の Javaコードhttps://bitbucket.org/otake_kosuke/mahjang_gochiusa/src/3f1f72bfa4681f719b679bccc2c7e38b01d56b25/Main.java?at=master
を何回かテストした結果, 2~300回に1回の割合で同じ牌が5個以上出る現象が確認されました.

個人的にコードを書き直す(関数切り分け, コード内テストの作成)をしたいのでできたらBitbucketのコード自体をGitHubに移行していただけませんか?

とりあえず再実装する場合, 基本的にはJavaで書くつもりですがもしもJavaに嫌気が差したらPythonで速さを求めるようであればC++で再実装する予定です. お願いします

@ryosan-470 ryosan-470 added survey and removed wontfix labels Jun 21, 2015
ryosan-470 added a commit that referenced this issue Jun 24, 2015
チートイ、国士無双の確率操作 赤ドラ実装 一発機能と煽り追加 #21
index30 added a commit to index30/gochiusa-bot that referenced this issue Jun 24, 2015
ryosan-470 added a commit that referenced this issue Jun 24, 2015
赤ドラがきちんと表示されていない問題の修正 #21
@ryosan-470
Copy link
Owner

sgaのJavaコードをPythonコードに書きなおしました.

https://github.com/jtwp470/gochiusa-majong-java/blob/tango-mahjong/mahjong.py

このディレクトリ下にあるresult.txtは1.6MBありますが開くと途中以下のようなデバッグセクションがあり5個以上牌があるときの手札とランダムで選ばれた数字の組み合わせがそれぞれ残されているのでこれらとソースコードを照らしあわせてどういう条件の時にエラーとなっているか発見するのに役立ててください.(私はこれを再実装するだけで疲れました)

以下はresultの上数行を取ってきたものです.

0: ['4sou', '4sou', '2man', '3man', '4man', '6man', '7man', '8man', '8man', '8man', '8man', '5man', '6man', '7man']
1: ['3sou', '3sou', '5man', '6man', '7man', '7man', '7man', '7man', '3man', '4man', '5man', '2man', '2man', '2man']
2: ['5sou', '5sou', '6man', '6man', '6man', '3man', '3man', '3man', '5man', '5man', '5man', '2man', '3man', '4man']
3: ['6sou', '6sou', '5man', '6man', '7man', '4man', '4man', '4man', '6man', '7man', '8man', '5man', '6man', '7man']
4: ['8sou', '8sou', '5man', '6man', '7man', '5man', '5man', '5man', '7man', '7man', '7man', '3man', '3man', '3man']
5: ['9sou', '9sou', '1man', '2man', '3man', '4man', '5man', '6man', '2man', '3man', '4man', '6man', '6man', '6man']
6: ['6sou', '6sou', '3man', '4man', '5man', '1man', '2man', '3man', '8man', '8man', '8man', '5man', '6man', '7man']
7: ['8sou', '8sou', '2man', '3man', '4man', '1man', '1man', '1man', '7man', '8man', '9man', '8man', '8man', '8man']
8: ['1sou', '1sou', '7man', '8man', '9man', '4man', '4man', '4man', '1man', '1man', '1man', '3man', '4man', '5man']
9: Error OCCURED
===== DEBUG =====
{'6man': 1, '9man': 3, '5man': 1, '2man': 1, '2sou': 2, '4man': 5, '3man': 1}
['2sou', '2sou', '4man', '4man', '4man', '4man', '5man', '6man', '2man', '3man', '4man', '9man', '9man', '9man']
[1, 'kotsu()', 3, 'shuntsu()', 7, 'shuntsu()', 5, 'kotsu()', 8]
===== MAKE AGAIN =====
['2sou', '2sou', '4man', '4man', '4man', '6man', '7man', '8man', '6man', '6man', '6man', '2man', '2man', '2man']
['2sou', '2sou', '4man', '4man', '4man', '6man', '7man', '8man', '6man', '6man', '6man', '2man', '2man', '2man']
10: ['6sou', '6sou', '9man', '9man', '9man', '2man', '3man', '4man', '3man', '3man', '3man', '7man', '7man', '7man']
11: ['8sou', '8sou', '6man', '6man', '6man', '4man', '4man', '4man', '2man', '2man', '2man', '3man', '3man', '3man']
12: ['3sou', '3sou', '7man', '8man', '9man', '5man', '6man', '7man', '5man', '6man', '7man', '8man', '8man', '8man']
13: ['4sou', '4sou', '2man', '2man', '2man', '6man', '6man', '6man', '7man', '8man', '9man', '4man', '5man', '6man']
14: ['4sou', '4sou', '6man', '6man', '6man', '5man', '6man', '7man', '9man', '9man', '9man', '8man', '8man', '8man']
15: ['4sou', '4sou', '7man', '7man', '7man', '7man', '8man', '9man', '2man', '2man', '2man', '4man', '5man', '6man']
16: ['5sou', '5sou', '1man', '1man', '1man', '4man', '5man', '6man', '7man', '8man', '9man', '5man', '6man', '7man']
17: ['7sou', '7sou', '9man', '9man', '9man', '5man', '6man', '7man', '1man', '1man', '1man', '5man', '6man', '7man']
18: ['8sou', '8sou', '2man', '3man', '4man', '9man', '9man', '9man', '1man', '2man', '3man', '4man', '5man', '6man']
19: ['7sou', '7sou', '6man', '7man', '8man', '6man', '7man', '8man', '6man', '7man', '8man', '1man', '1man', '1man']
20: ['1sou', '1sou', '4man', '4man', '4man', '2man', '3man', '4man', '5man', '6man', '7man', '8man', '8man', '8man']
21: ['6sou', '6sou', '7man', '8man', '9man', '2man', '3man', '4man', '2man', '3man', '4man', '7man', '7man', '7man']
22: ['7sou', '7sou', '6man', '6man', '6man', '3man', '4man', '5man', '7man', '8man', '9man', '5man', '5man', '5man']
23: ['6sou', '6sou', '3man', '4man', '5man', '2man', '2man', '2man', '7man', '8man', '9man', '2man', '3man', '4man']
24: ['3sou', '3sou', '6man', '6man', '6man', '2man', '2man', '2man', '5man', '5man', '5man', '7man', '7man', '7man']
25: ['6sou', '6sou', '9man', '9man', '9man', '2man', '2man', '2man', '7man', '7man', '7man', '2man', '3man', '4man']
26: ['1sou', '1sou', '4man', '5man', '6man', '7man', '8man', '9man', '9man', '9man', '9man', '3man', '3man', '3man']
27: ['3sou', '3sou', '6man', '6man', '6man', '1man', '2man', '3man', '1man', '1man', '1man', '7man', '7man', '7man']
28: ['3sou', '3sou', '4man', '4man', '4man', '2man', '2man', '2man', '3man', '4man', '5man', '3man', '3man', '3man']
29: ['5sou', '5sou', '3man', '4man', '5man', '6man', '7man', '8man', '4man', '5man', '6man', '7man', '7man', '7man']
30: Error OCCURED
===== DEBUG =====
{'6man': 1, '9man': 1, '2man': 1, '7man': 2, '8man': 5, '5sou': 2, '4man': 1, '3man': 1}
['5sou', '5sou', '6man', '7man', '8man', '2man', '3man', '4man', '8man', '8man', '8man', '7man', '8man', '9man']
[4, 'shuntsu()', 9, 'shuntsu()', 5, 'kotsu()', 7, 'shuntsu()', 10]
===== MAKE AGAIN =====
['7sou', '7sou', '4man', '4man', '4man', '8man', '8man', '8man', '6man', '6man', '6man', '5man', '5man', '5man']
['7sou', '7sou', '4man', '4man', '4man', '8man', '8man', '8man', '6man', '6man', '6man', '5man', '5man', '5man']
31: ['8sou', '8sou', '3man', '4man', '5man', '4man', '4man', '4man', '9man', '9man', '9man', '3man', '3man', '3man']

@ryosan-470
Copy link
Owner

個人的にはこのバグをなくすのは難しいと思うので諦めてチェック機能を入れてもし5個以上吐いている場合はやり直しという実装にしたほうが楽かなぁと思いました

@ytmt365
Copy link
Contributor

ytmt365 commented Jul 3, 2015

5枚使いを防止する & その他少し機能を追加したものを(ほとんど一から)実装中です.できたら投げます

ytmt365 added a commit to ytmt365/gochiusa-bot that referenced this issue Jul 3, 2015
ytmt365 added a commit to ytmt365/gochiusa-bot that referenced this issue Jul 3, 2015
ytmt365 added a commit to ytmt365/gochiusa-bot that referenced this issue Jul 3, 2015
ryosan-470 added a commit that referenced this issue Jul 4, 2015
麻雀役吐き出し機能の再実装 #21
@ryosan-470
Copy link
Owner

🙆‍♀️

Thanks to all contributors, debuggers and consumers!

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

No branches or pull requests

4 participants