class_docstr: Discrete action fake environment.
class_docstr_tok: ["Discrete","action","fake","environment","."]
docstr: Initialize the environment.
code: def __init__(
      self,
      *,
      num_actions: int = 1,
      action_dtype=np.int32,
      observation_spec: types.NestedSpec,
      discount_spec: Optional[types.NestedSpec] = None,
      reward_spec: Optional[types.NestedSpec] = None,
      **kwargs,
  ):
      """Initialize the environment."""
      if reward_spec is None:
          reward_spec = specs.Array((), np.float32)
  
      if discount_spec is None:
          discount_spec = specs.BoundedArray((), np.float32, 0.0, 1.0)
  
      actions = specs.DiscreteArray(num_actions, dtype=action_dtype)
  
      super().__init__(
          spec=specs.EnvironmentSpec(
              observations=observation_spec,
              actions=actions,
              rewards=reward_spec,
              discounts=discount_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 _BaseDiscreteEnvironment object from inherited base classes: Environment with example: obj = _BaseDiscreteEnvironment()