0.9.5 • Published 6 years ago

@rl-js/configuration v0.9.5

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

rl-js configuration

Configuration utilities for rl-js: Reinforcement Learning in JavaScript.

istallation

npm install --save @rl-js/configuration

JSDOC

Classes

Interfaces

Hyperparameter

Interface defining hyperparameter configuration

Kind: global interface

hyperparameter.getName() ⇒ string

Kind: instance method of Hyperparameter
Returns: string - the name of the hyperparameter

hyperparameter.defaultValue() ⇒ *

Kind: instance method of Hyperparameter
Returns: * - the default value for the hyperparameter

hyperparameter.randomValue() ⇒ *

Kind: instance method of Hyperparameter
Returns: * - a randomly chosen value for the hyperparameter

hyperparameter.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Hyperparameter
Returns: array - an array of hyperparameter values

ParamTypeDescription
stepsnumberan integer number of steps to discretize the range into

ContinuousEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with a single continuous action and a continuous state space. The actions should be bounded by some range. The observation should be an array of numbers.

Kind: global interface
Extends: EnvironmentFactory

continuousEnvironmentFactory.getObservationCount() ⇒ number

Kind: instance method of ContinuousEnvironmentFactory
Returns: number - The size of the observation array for the environment

continuousEnvironmentFactory.getActionRange() ⇒ Array.<number>

Kind: instance method of ContinuousEnvironmentFactory
Returns: Array.<number> - An array whose first element represents the lower bound of the action, and the second element represents the upper bound.

DiscreteEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with discrete actions and a continuous state space. The actions should be an array of strings. The observation should be an array of numbers.

Kind: global interface
Extends: EnvironmentFactory

discreteEnvironmentFactory.getObservationCount() ⇒ number

Kind: instance method of DiscreteEnvironmentFactory
Returns: number - The size of the observation array for the environment

discreteEnvironmentFactory.getActions() ⇒ Array.<string>

Kind: instance method of DiscreteEnvironmentFactory
Returns: Array.<string> - The action set for the environment

TabularEnvironmentFactory ⇐ EnvironmentFactory

Interface for an EnvironmentFactory corresponding to an Environment with discrete actions and a discrete state space. The actions should be an array of strings.

Kind: global interface
Extends: EnvironmentFactory

tabularEnvironmentFactory.getStates() ⇒ Array.<string>

Kind: instance method of TabularEnvironmentFactory
Returns: Array.<string> - The state set for the environment

tabularEnvironmentFactory.getActions() ⇒ Array.<string>

Kind: instance method of TabularEnvironmentFactory
Returns: Array.<string> - The action set for the environment

AgentBuilder

Kind: global class

new AgentBuilder()

Class defining a builder for AgentFactories. Used for defining the configuration of the resulting Agent

agentBuilder.getName() ⇒ string

Kind: instance method of AgentBuilder
Returns: string - Display name of the Agent

agentBuilder.getId() ⇒ string

Kind: instance method of AgentBuilder
Returns: string - The unique identifier for the Agent

agentBuilder.getHyperparameterDefinitions() ⇒ object

Kind: instance method of AgentBuilder
Returns: object - The hyperparameter definitions and ranges for the Agent

agentBuilder.buildFactory() ⇒

Kind: instance method of AgentBuilder
Returns: A fully configured AgentFactory

agentBuilder.buildAgent() ⇒

Kind: instance method of AgentBuilder
Returns: A fully configured Agent

agentBuilder.setEnvironmentFactory(environmentFactory)

The EnvironmentFactory corresponding to the specific Environment that the AgentFactory should be built for.

Kind: instance method of AgentBuilder

ParamType
environmentFactoryEnvironmentFactory

agentBuilder.setHyperparameters(hyperparameters)

The specific set of hyperparameters for the agents constructed by the AgentFactory.

Kind: instance method of AgentBuilder

ParamType
hyperparametersHyperparameters

agentBuilder.clone() ⇒

Clone this AgentBuilder

Kind: instance method of AgentBuilder
Returns: AgentBuilder

AgentSuite

Kind: global class

new AgentSuite()

Class representing a suite of similar or related agents.

agentSuite.getName() ⇒ string

Kind: instance method of AgentSuite
Returns: string - Display name of the agent suite

agentSuite.getId() ⇒ string

Kind: instance method of AgentSuite
Returns: string - Unique ID of the agent suite

agentSuite.listAgents() ⇒ Array.<AgentBuilder>

Kind: instance method of AgentSuite
Returns: Array.<AgentBuilder> - An array of AgentBuilders

agentSuite.getAgentBuilder(id) ⇒ AgentBuilder

Kind: instance method of AgentSuite

ParamTypeDescription
idstringThe unique ID for the AgentBuilder

agentSuite.getEnvironmentType() ⇒ *

Get the type of the environments that agents in this suite can handle. E.g. DiscreteEnvironmentFactory, TabularEnvironmentFactory, etc.

Kind: instance method of AgentSuite
Returns: * - An EnvironmentFactory type

EnvironmentBuilder

Kind: global class

environmentBuilder.getId() ⇒ string

Kind: instance method of EnvironmentBuilder
Returns: string - The unique ID of the EnvironmentBuilder

environmentBuilder.getName() ⇒ string

Kind: instance method of EnvironmentBuilder
Returns: string - Display name of the EnvironmentBuilder

environmentBuilder.buildFactory() ⇒ EnvironmentFactory

Kind: instance method of EnvironmentBuilder
Returns: EnvironmentFactory - Get an instance of EnvironmentFactory

environmentBuilder.getHyperparameterDefinitions() ⇒ object

Kind: instance method of EnvironmentBuilder
Returns: object - The hyperparameter definitions and ranges for the Environment

environmentBuilder.setHyperparameters(hyperparameters)

The specific set of hyperparameters for the agents constructed by the EnvironmentFactory.

Kind: instance method of EnvironmentBuilder

ParamType
hyperparametersHyperparameters

environmentBuilder.buildEnvironment() ⇒ Environment

Kind: instance method of EnvironmentBuilder
Returns: Environment - Build an instance of the Environment

EnvironmentSuite

Kind: global class

new EnvironmentSuite()

Class representing a set of similar or related Environments

environmentSuite.getName() ⇒ string

Kind: instance method of EnvironmentSuite
Returns: string - The display name of the EnvironmentSuite

environmentSuite.getId() ⇒ string

Kind: instance method of EnvironmentSuite
Returns: string - The unique ID of the EnvironmentSuite

environmentSuite.getType() ⇒ *

Kind: instance method of EnvironmentSuite
Returns: * - A subclass of EnvironmentFactory corresponding to the EnvironmentType

environmentSuite.listEnvironments() ⇒ Array.<EnvironmentBuilder>

Kind: instance method of EnvironmentSuite
Returns: Array.<EnvironmentBuilder> - An array of the EnvironmentBuilders

environmentSuite.getEnvironmentBuilder(environmentName) ⇒

Kind: instance method of EnvironmentSuite
Returns: EnvironmentFactory

Param
environmentName

Discrete ⇐ Hyperparameter

Class representing a hyperparameter with a discrete set of possible values

Kind: global class
Extends: Hyperparameter

discrete.getName() ⇒ string

Kind: instance method of Discrete
Overrides: getName
Returns: string - the name of the hyperparameter

discrete.defaultValue() ⇒ *

Kind: instance method of Discrete
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

discrete.randomValue() ⇒ *

Kind: instance method of Discrete
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

discrete.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Discrete
Overrides: discretize
Returns: array - an array of hyperparameter values

ParamTypeDescription
stepsnumberan integer number of steps to discretize the range into

Exponential ⇐ Hyperparameter

Class representing a hyperparameter in logarithmic space

Kind: global class
Extends: Hyperparameter

exponential.getName() ⇒ string

Kind: instance method of Exponential
Overrides: getName
Returns: string - the name of the hyperparameter

exponential.defaultValue() ⇒ *

Kind: instance method of Exponential
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

exponential.randomValue() ⇒ *

Kind: instance method of Exponential
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

exponential.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Exponential
Overrides: discretize
Returns: array - an array of hyperparameter values

ParamTypeDescription
stepsnumberan integer number of steps to discretize the range into

Fixed ⇐ Hyperparameter

Class representing a Fixed hyperparameter

Kind: global class
Extends: Hyperparameter

fixed.getName() ⇒ string

Kind: instance method of Fixed
Overrides: getName
Returns: string - the name of the hyperparameter

fixed.defaultValue() ⇒ *

Kind: instance method of Fixed
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

fixed.randomValue() ⇒ *

Kind: instance method of Fixed
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

fixed.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Fixed
Overrides: discretize
Returns: array - an array of hyperparameter values

ParamTypeDescription
stepsnumberan integer number of steps to discretize the range into

Linear ⇐ Hyperparameter

Class reperesenting a hyperparameter in linear space

Kind: global class
Extends: Hyperparameter

linear.getName() ⇒ string

Kind: instance method of Linear
Overrides: getName
Returns: string - the name of the hyperparameter

linear.defaultValue() ⇒ *

Kind: instance method of Linear
Overrides: defaultValue
Returns: * - the default value for the hyperparameter

linear.randomValue() ⇒ *

Kind: instance method of Linear
Overrides: randomValue
Returns: * - a randomly chosen value for the hyperparameter

linear.discretize(steps) ⇒ array

Discretize the range into evenly spaced values

Kind: instance method of Linear
Overrides: discretize
Returns: array - an array of hyperparameter values

ParamTypeDescription
stepsnumberan integer number of steps to discretize the range into
0.9.5

6 years ago

0.9.3

6 years ago

0.9.0

6 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.3

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago