class_docstr: Buffer to store the data from the games played by the MCTS agent.
docstr: Initializes the buffer.
  
  Args:
      device (str): Name of the torch device to use.
      max_buffer_size (int): Maximum size of the buffer.
docstr_tok: ["Initializes","the","buffer",".","Args",":","device","(","str",")",":","Name","of","the","torch","device","to","use",".","max_buffer_size","(","int",")",":","Maximum","size","of","the","buffer","."]
code: def __init__(self, device: str, max_buffer_size: int):
      """Initializes the buffer.
  
      Args:
          device (str): Name of the torch device to use.
          max_buffer_size (int): Maximum size of the buffer.
      """
      self.num_games = 0
      self.temp_dir = tempfile.mkdtemp("game_data_buffer")
      self.game_data = {}
      self.max_buffer_size = max_buffer_size
      self.device = device
  
imports: import json
  import os
  import shutil
  import tempfile
  from pathlib import Path
  from typing import List, Tuple
  import numpy
  import torch
  from torch.utils.data import Dataset
  from open_alpha_tensor.core.data.generation import generate_synthetic_data
  from open_alpha_tensor.core.data.utils import get_scalars, map_triplet_to_action
label_desc: Use image node_id 1 to create a new GameDataBuffer object from inherited base classes: Dataset with example: obj = GameDataBuffer(device, max_buffer_size)