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()
  
file_path: PARL/examples/AlphaZero/Coach.py
imports: import os
  import sys
  import parl
  from actor import Actor
  from random import shuffle
  from parl.utils import logger
  from parl.utils import visualdl
  from pickle import Pickler, Unpickler
  from alphazero_agent import create_agent
  from utils import split_group, get_test_dataset
label_desc: Use image node_id 1 to create a new Coach object  with example: obj = Coach(game, args)