Author: Rohan () ''' import os import ray from gymnasium.spaces import Box, Discrete from ray import tune from import DQNConfig from .dqn_torch_model import DQNTorchModel from import PettingZooEnv from import ModelCatalog from .fcnet import Full圜onnectedNetwork as TorchFC from import try_import_torch from _utils import FLOAT_MAX from import register_env from pettingzoo.classic import leduc_holdem_v4 torch, nn = try_import_torch () class TorchMaskedActions ( DQNTorchModel ): '''PyTorch version of above ParametricActionsModel.''' def _init_ ( self, obs_space : Box, action_space : Discrete, num_outputs, model_config, name, ** kw, ): DQNTorchModel.
'''Uses Ray's RLLib to train agents to play Leduc Holdem.