class_docstr: Discrete state and action fake environment.
class_docstr_tok: ["Discrete","state","and","action","fake","environment","."]
docstr: Initialize the environment.
code: def __init__(
      self,
      *,
      num_actions: int = 1,
      num_observations: int = 1,
      action_dtype=np.int32,
      obs_dtype=np.int32,
      obs_shape: Sequence[int] = (),
      discount_spec: Optional[types.NestedSpec] = None,
      reward_spec: Optional[types.NestedSpec] = None,
      **kwargs,
  ):
      """Initialize the environment."""
      observations_spec = specs.BoundedArray(
          shape=obs_shape,
          dtype=obs_dtype,
          minimum=obs_dtype(0),
          maximum=obs_dtype(num_observations - 1),
      )
  
      super().__init__(
          num_actions=num_actions,
          action_dtype=action_dtype,
          observation_spec=observations_spec,
          discount_spec=discount_spec,
          reward_spec=reward_spec,
          **kwargs,
      )
  
imports: import threading
  from typing import List, Mapping, Optional, Sequence, Callable, Iterator
  from acme import core
  from acme import specs
  from acme import types
  from acme import wrappers
  import dm_env
  import numpy
  import reverb
  from rlds import rlds_types
  import tensorflow
  import tree
label_desc: Use image node_id 1 to create a new DiscreteEnvironment object from inherited base classes: _BaseDiscreteEnvironment with example: obj = DiscreteEnvironment()