class_docstr: Behavior descriptor extractor for the Ant locomotion task.
class_docstr_tok: ["Behavior","descriptor","extractor","for","the","Ant","locomotion","task","."]
code: def __init__(self, logger):
      # Each BD represents the quantized foot-ground contact time ratio.
      bd_spec = [
          ("feet1_contact", 10),
          ("feet2_contact", 10),
          ("feet3_contact", 10),
          ("feet4_contact", 10),
      ]
      bd_state_spec = [
          ("feet_contact_times", jnp.ndarray),
          ("step_cnt", jnp.int32),
          ("valid_mask", jnp.int32),
      ]
      super(AntBDExtractor, self).__init__(
          bd_spec, bd_state_spec, BDExtractorState
      )
      self._logger = logger
  
imports: import sys
  from typing import Optional
  from typing import Tuple
  from typing import Union
  import jax
  import jax.numpy
  from flax.struct import dataclass
  from evojax.task.base import VectorizedTask
  from evojax.task.base import TaskState
  from evojax.task.base import BDExtractor
label_desc: Use image node_id 1 to create a new AntBDExtractor object from inherited base classes: BDExtractor with example: obj = AntBDExtractor(logger)