#NEWLINE# def __init__( self , size , opponent = None , **args ) : #NEWLINE# #INDENT# EpisodicTask . __init__ ( self , GomokuGame ( ( size , args ) ) ) #NEWLINE# self . setArgs ( ** args ) #NEWLINE# if ( opponent == None ) : #NEWLINE# #INDENT# opponent = RandomGomokuPlayer ( self . env ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isclass ( opponent ) : #NEWLINE# #INDENT# opponent = opponent ( self . env ) #NEWLINE# #UNINDENT# #UNINDENT# if ( not self . opponentStart ) : #NEWLINE# #INDENT# opponent . color = GomokuGame . WHITE #NEWLINE# #UNINDENT# self . opponent = opponent #NEWLINE# self . minmoves = 9 #NEWLINE# self . maxmoves = ( self . env . size [ 0 ] * self . env . size [ 1 ] ) #NEWLINE# self . reset ( )