class_docstr: AlphaZero-style learning.
class_docstr_tok: ["AlphaZero-style","learning","."]
code: def __init__(
      self,
      network: snt.Module,
      optimizer: snt.Optimizer,
      dataset: tf.data.Dataset,
      discount: float,
      logger: Optional[loggers.Logger] = None,
      counter: Optional[counting.Counter] = None,
  ):
      # Logger and counter for tracking statistics / writing out to terminal.
      self._counter = counting.Counter(counter, "learner")
      self._logger = logger or loggers.TerminalLogger(
          "learner", time_delta=30.0
      )
  
      # Internalize components.
      # TODO(b/155086959): Fix type stubs and remove.
      self._iterator = iter(dataset)  # pytype: disable=wrong-arg-types
      self._optimizer = optimizer
      self._network = network
      self._variables = network.trainable_variables
      self._discount = np.float32(discount)
  
file_path: acme/acme/agents/tf/mcts/learning.py
imports: from typing import List, Optional
  import acme
  from acme.tf import utils
  from acme.utils import counting
  from acme.utils import loggers
  import numpy
  import sonnet
  import tensorflow
label_desc: Use image node_id 1 to create a new AZLearner object from inherited base classes: acme with example: obj = AZLearner(network, optimizer, dataset, discount, logger, counter)