Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlgorithmicEnv

Abstract environment for algorithms.

Action: A tuple containing [ the move over the input, whether to write to the output, the predicted character ]

Observations: The character under the read cursor. A total of base + 1 with an extra out-of-bounds character.

The environment terminates immediately when an incorrect item is written or when the entire output is successfully outputted.

Hierarchy

Implements

Index

Constructors

constructor

  • new AlgorithmicEnv(movements: string[], base?: number): AlgorithmicEnv
  • Parameters

    • movements: string[]

      The possible movements that the agent can make.

    • Optional base: number

      Number of distinct characters.

    Returns AlgorithmicEnv

Properties

MIN_LENGTH

MIN_LENGTH: number

MOVEMENTS

MOVEMENTS: string[]

action_space

action_space: DiscreteTuple

agentActions

agentActions: number[]

base

base: number

charmap

charmap: string[]

cursor

cursor: number

done

done: boolean

inputData

inputData: any

observation_space

observation_space: Discrete

reward

reward: number

reward_range

reward_range: Discrete

target

target: []

targetLength

targetLength: number

Methods

close

  • close(): void
  • Returns void

Abstract genInputData

  • genInputData(size: number): any
  • Parameters

    • size: number

    Returns any

getStrObs

  • getStrObs(): string
  • Returns string

Abstract move

  • Parameters

    Returns void

render

  • render(): void
  • Returns void

renderHTML

  • renderHTML(): string
  • Returns string

reset

  • reset(): tf.Tensor
  • Returns tf.Tensor

seed

  • seed(seed: number): void
  • Parameters

    • seed: number

    Returns void

Abstract setTarget

  • setTarget(input_data: any): void
  • Parameters

    • input_data: any

    Returns void

step

  • step(action: actionSpace): [tf.Tensor, number, boolean, __type]
  • Parameters

    Returns [tf.Tensor, number, boolean, __type]

Abstract toObs

  • toObs(): tf.Tensor
  • Returns tf.Tensor

Generated using TypeDoc