class_docstr: This class executes the self-play, learning and evaluating.
class_docstr_tok: ["This","class","executes","the","self-play",",","learning","and","evaluating","."]
code: def __init__(self, game, args):
      self.game = game
      self.args = args
  
      # neural network of current generation
      self.current_agent = create_agent(self.game)
      # neural network of previous generation
      self.previous_agent = create_agent(self.game)
  
      # history of examples from args.numItersForTrainExamplesHistory latest iterations
      self.trainExamplesHistory = []
  
      self.test_dataset = get_test_dataset()
  
imports: import os
  import sys
  import pickle
  from pickle import Pickler, Unpickler
  from random import shuffle
  from parl.utils import tensorboard
  import numpy
  from tqdm import tqdm
  import parl
  from parl.utils import logger
  from actor import Actor
  from utils import split_group, get_test_dataset
  from alphazero_agent import create_agent
label_desc: Use image node_id 1 to create a new Coach object  with example: obj = Coach(game, args)