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

[py] 人間がプレイできるエージェントを作る #981

Merged
merged 8 commits into from
Oct 13, 2021

Conversation

OkanoShinri
Copy link
Collaborator

#972 の実装。

@sotetsuk
Copy link
Collaborator

sotetsuk commented Oct 12, 2021

mjx以下のスクリプトは消してください!
ライブラリなのでスクリプトは置かないでくださいー

@OkanoShinri

@OkanoShinri
Copy link
Collaborator Author

Enterキー連打して一局分通してみたものです。

出力例

##########################
#round:1 wall:68 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m1 m2 m4 p3 p4 s3 s4 s4 s5 ew ew sw wd p8       




WEST [ 25000 ] player_2

# # # # # # # # # # # # #       




NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       




EAST [ 25000 ] player_1

# # # # # # # # # # # # #       

gd  



[?] Select your action: 0:DISCARD-m1
 > 0:DISCARD-m1
   1:DISCARD-m2
   2:DISCARD-m4
   3:DISCARD-p3
   4:DISCARD-p4
   5:DISCARD-s3
   6:DISCARD-s4
   7:DISCARD-s5
   8:DISCARD-ew
   9:DISCARD-sw
   10:DISCARD-wd
   11:TSUMOGIRI-p8

##########################
#round:1 wall:66 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m2 m4 p3 p4 p8 s3 s4 s4 s5 ew ew sw wd       

m1  


WEST [ 25000 ] player_2

# # # # # # # # # # # # #       

ww  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  


EAST [ 25000 ] player_1

# # # # # # # # # # # # #       

gd  



[?] Select your action: 0:PON-ew ew ew
 > 0:PON-ew ew ew
   1:PASS

##########################
#round:1 wall:66 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m2 m4 p3 p4 p8 s3 s4 s4 s5 sw wd       ewewewM

m1  


WEST [ 25000 ] player_2

# # # # # # # # # # # # #       

ww  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  


EAST [ 25000 ] player_1

# # # # # # # # # # # # #       

gd  



[?] Select your action: 0:DISCARD-m2
 > 0:DISCARD-m2
   1:DISCARD-m4
   2:DISCARD-p3
   3:DISCARD-p4
   4:DISCARD-p8
   5:DISCARD-s3
   6:DISCARD-s4
   7:DISCARD-s5
   8:DISCARD-sw
   9:DISCARD-wd

##########################
#round:1 wall:63 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m4 p3 p4 p8 s3 s4 s4 s5 sw wd s8       ewewewM

m1  m2  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  


EAST [ 25000 ] player_1

# # # # # # # # # # # # #       

gd  s1  



[?] Select your action: 0:DISCARD-m4
 > 0:DISCARD-m4
   1:DISCARD-p3
   2:DISCARD-p4
   3:DISCARD-p8
   4:DISCARD-s3
   5:DISCARD-s4
   6:DISCARD-s5
   7:DISCARD-sw
   8:DISCARD-wd
   9:TSUMOGIRI-s8

##########################
#round:1 wall:61 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

p3 p4 p8 s3 s4 s4 s5 s8 sw wd       ewewewM

m1  m2  m4  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  



[?] Select your action: 0:CHI-s3 s4 s5
 > 0:CHI-s3 s4 s5
   1:PASS

##########################
#round:1 wall:61 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

p3 p4 p8 s4 s5 s8 sw wd       s5s3s4L ewewewM

m1  m2  m4  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  



[?] Select your action: 0:DISCARD-p3
 > 0:DISCARD-p3
   1:DISCARD-p4
   2:DISCARD-p8
   3:DISCARD-s4
   4:DISCARD-s8
   5:DISCARD-sw
   6:DISCARD-wd

##########################
#round:1 wall:57 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

p4 p8 s4 s5 s8 sw wd sw       s5s3s4L ewewewM

m1  m2  m4  p3  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  



[?] Select your action: 0:DISCARD-p4
 > 0:DISCARD-p4
   1:DISCARD-p8
   2:DISCARD-s4
   3:DISCARD-s5
   4:DISCARD-s8
   5:DISCARD-sw
   6:DISCARD-wd
   7:TSUMOGIRI-sw

##########################
#round:1 wall:53 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

p8 s4 s5 s8 sw sw wd m7       s5s3s4L ewewewM

m1  m2  m4  p3  p4  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* 


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  



[?] Select your action: 0:DISCARD-p8
 > 0:DISCARD-p8
   1:DISCARD-s4
   2:DISCARD-s5
   3:DISCARD-s8
   4:DISCARD-sw
   5:DISCARD-wd
   6:TSUMOGIRI-m7

##########################
#round:1 wall:49 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m7 s4 s5 s8 sw sw wd nw       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  



[?] Select your action: 0:DISCARD-m7
 > 0:DISCARD-m7
   1:DISCARD-s4
   2:DISCARD-s5
   3:DISCARD-s8
   4:DISCARD-sw
   5:DISCARD-wd
   6:TSUMOGIRI-nw

##########################
#round:1 wall:45 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

s4 s5 s8 sw sw nw wd s3       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* 



[?] Select your action: 0:DISCARD-s4
 > 0:DISCARD-s4
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-s3

##########################
#round:1 wall:41 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

s3 s5 s8 sw sw nw wd p4       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* 


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* 



[?] Select your action: 0:DISCARD-s3
 > 0:DISCARD-s3
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-p4

##########################
#round:1 wall:37 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

p4 s5 s8 sw sw nw wd m7       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* 


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* 



[?] Select your action: 0:DISCARD-p4
 > 0:DISCARD-p4
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-m7

##########################
#round:1 wall:33 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m7 s5 s8 sw sw nw wd m2       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* 


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* 



[?] Select your action: 0:DISCARD-m7
 > 0:DISCARD-m7
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-m2

##########################
#round:1 wall:29 Dora:sw #
##########################
SOUTH [ 25000 ] player_0

m2 s5 s8 sw sw nw wd s1       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  m7  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* rd* 


NORTH [ 25000 ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* wd* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* wd* 



[?] Select your action: 0:DISCARD-m2
 > 0:DISCARD-m2
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-s1

###################################
#round:1 riichi:1 wall:25 Dora:sw #
###################################
SOUTH [ 25000 ] player_0

s1 s5 s8 sw sw nw wd gd       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  m7  m2  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* rd* p9  


NORTH [ 24000, riichi ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* wd* m9r 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* wd* s3* 



[?] Select your action: 0:DISCARD-s1
 > 0:DISCARD-s1
   1:DISCARD-s5
   2:DISCARD-s8
   3:DISCARD-sw
   4:DISCARD-nw
   5:DISCARD-wd
   6:TSUMOGIRI-gd

###################################
#round:1 riichi:1 wall:21 Dora:sw #
###################################
SOUTH [ 25000 ] player_0

s5 s8 sw sw nw wd gd gd       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  m7  m2  
s1  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* rd* p9  
s5  


NORTH [ 24000, riichi ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* wd* m9r 
m6* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* wd* s3* 
m3* 



[?] Select your action: 0:DISCARD-s5
 > 0:DISCARD-s5
   1:DISCARD-s8
   2:DISCARD-sw
   3:DISCARD-nw
   4:DISCARD-wd
   5:DISCARD-gd
   6:TSUMOGIRI-gd

###################################
#round:1 riichi:1 wall:17 Dora:sw #
###################################
SOUTH [ 25000 ] player_0

s8 sw sw nw wd gd gd m5       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  m7  m2  
s1  s5  


WEST [ 25000 ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* rd* p9  
s5  nw* 


NORTH [ 24000, riichi ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* wd* m9r 
m6* s5* 


EAST [ 25000 ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* wd* s3* 
m3* m4* 



[?] Select your action: 0:DISCARD-s8
 > 0:DISCARD-s8
   1:DISCARD-sw
   2:DISCARD-nw
   3:DISCARD-wd
   4:DISCARD-gd
   5:TSUMOGIRI-m5

######################################################
#round:1 riichi:1 wall:17 Dora:sw  UraDora:gd     RON#
######################################################
SOUTH [ 25000(0) ] player_0

m5 sw sw nw wd gd gd       s5s3s4L ewewewM

m1  m2  m4  p3  p4  p8  
m7  s4  s3  p4  m7  m2  
s1  s5  s8  


WEST [ 23000(-2000) ] player_2

# # # # # # # # # #       m2m3m4L

ww  nw  rd  m9  m1* p1  
s1  m3* s2* s1* rd* p9  
s5  nw* p6* 


NORTH [ 27000(+3000), riichi ] player_3

# # # # # # # # # # # # #       

ew  rd  s7  m1  rd* m3  
p8  s2* s8* m5* wd* m9r 
m6* s5* 


EAST [ 25000(0) ] player_1

# # # # # # # # # #       s7s8s9L

gd  s1  s5  m2  m4  p7  
s7* ww* p5* s9* wd* s3* 
m3* m4* 



@sotetsuk
Copy link
Collaborator

sotetsuk commented Oct 13, 2021

  • 盤面の見せ方、richを使うか否かも選択できてほしいですね。

@OkanoShinri
Copy link
Collaborator Author

rich

スクリーンショット 2021-10-13 185820

@OkanoShinri OkanoShinri merged commit 8a3c0e8 into master Oct 13, 2021
@OkanoShinri OkanoShinri deleted the okano/feat/human-control-agent branch October 13, 2021 10:25
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

Successfully merging this pull request may close these issues.

2 participants