You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 8, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+29-4Lines changed: 29 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@ For now only **Python 3.5+** is supported.
4
4
5
5
# What do we have here?
6
6
7
+

8
+
7
9
## Mahjong hands calculation
8
10
9
11
We have a code which can calculate hand cost (han, fu, yaku and scores) based on the hand's tiles.
@@ -22,7 +24,7 @@ So, we can say that our own hand calculator works the same way that tenhou.net h
22
24
23
25
The example of usage you can find here: https://github.com/MahjongRepository/tenhou-python-bot/blob/master/project/validate_hand.py#L194
24
26
25
-
## Simple mahjong bot
27
+
## Mahjong bot
26
28
27
29
For research purposes we built a simple bot to play riichi mahjong on tenhou.net server.
28
30
@@ -31,20 +33,43 @@ For research purposes we built a simple bot to play riichi mahjong on tenhou.net
31
33
It can reach a tempai and call a riichi. It doesn't know about dora, yaku, defence and etc.
32
34
Only about tempai and riichi so far.
33
35
34
-
This version had played 335 games (hanchans) and achieved only first dan on the tenhou.net so far
36
+
This version had played 335 games (hanchans) and achieved only first dan (初段) on the tenhou.net so far
35
37
(and lost it later, and achieved it again...).
36
38
37
39
Rate was somewhere around R1350.
38
40
41
+
Stat:
42
+
39
43
|| Result |
40
44
| --- | --- |
41
45
| Average position | 2.78 |
42
46
| Win rate | 20.73% |
43
47
| Feed rate | 19.40% |
44
-
| Riichi rate| 36.17% |
48
+
| Riichi rate | 36.17% |
49
+
| Call rate | 0% |
45
50
46
51
So, even with the current simple logic it can play and win.
47
52
53
+
### 0.2.5 version
54
+
55
+
This version is much smarter than 0.0.x versions. It can open hand, go to defence and build hand effective (all supported features you can find in releases description).
56
+
57
+
This version had played 375 games (hanchans) and achieved second dan (二段).
58
+
59
+
Rate was somewhere around R1500.
60
+
61
+
Stat:
62
+
63
+
|| Result |
64
+
| --- | --- |
65
+
| Average position | 2.65 |
66
+
| Win rate | 18.60% |
67
+
| Feed rate | 10.59% |
68
+
| Riichi rate | 15.64% |
69
+
| Call rate | 34.89% |
70
+
71
+
For the next version I have a plan to improve win rate, probably bot should push with good hands more often.
72
+
48
73
# For developers
49
74
50
75
## How to run it?
@@ -67,4 +92,4 @@ This command will check the code style: `flake8 --config=../.flake8`
67
92
68
93
All PRs are welcomed anytime. Currently the project is in early stage and
69
94
I'm working on the different parts of it in the same time, so before making any
70
-
big changes it's better to check with me to avoid code duplication.
95
+
big changes it's better to check with me to avoid code duplication.
0 commit comments