@rl-js/configuration
v0.9.5
Published
Configuration utilities for rl-js: Reinforcement Learning in JavaScript
Downloads
5
Readme
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
- .defaultValue() ⇒ *
- .randomValue() ⇒ *
- .discretize(steps) ⇒ array
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
| Param | Type | Description | | --- | --- | --- | | steps | number | an 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 ⇐ EnvironmentFactory
- .getObservationCount() ⇒ number
- .getActionRange() ⇒ Array.<number>
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 ⇐ EnvironmentFactory
- .getObservationCount() ⇒ number
- .getActions() ⇒ Array.<string>
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 ⇐ EnvironmentFactory
- .getStates() ⇒ Array.<string>
- .getActions() ⇒ Array.<string>
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
| Param | Type | | --- | --- | | environmentFactory | EnvironmentFactory |
agentBuilder.setHyperparameters(hyperparameters)
The specific set of hyperparameters for the agents constructed by the AgentFactory.
Kind: instance method of AgentBuilder
| Param | Type | | --- | --- | | hyperparameters | Hyperparameters |
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
| Param | Type | Description | | --- | --- | --- | | id | string | The 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
- .getName() ⇒ string
- .buildFactory() ⇒ EnvironmentFactory
- .getHyperparameterDefinitions() ⇒ object
- .setHyperparameters(hyperparameters)
- .buildEnvironment() ⇒ Environment
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
| Param | Type | | --- | --- | | hyperparameters | Hyperparameters |
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 ⇐ Hyperparameter
- .getName() ⇒ string
- .defaultValue() ⇒ *
- .randomValue() ⇒ *
- .discretize(steps) ⇒ array
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
| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |
Exponential ⇐ Hyperparameter
Class representing a hyperparameter in logarithmic space
Kind: global class
Extends: Hyperparameter
- Exponential ⇐ Hyperparameter
- .getName() ⇒ string
- .defaultValue() ⇒ *
- .randomValue() ⇒ *
- .discretize(steps) ⇒ array
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
| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |
Fixed ⇐ Hyperparameter
Class representing a Fixed hyperparameter
Kind: global class
Extends: Hyperparameter
- Fixed ⇐ Hyperparameter
- .getName() ⇒ string
- .defaultValue() ⇒ *
- .randomValue() ⇒ *
- .discretize(steps) ⇒ array
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
| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |
Linear ⇐ Hyperparameter
Class reperesenting a hyperparameter in linear space
Kind: global class
Extends: Hyperparameter
- Linear ⇐ Hyperparameter
- .getName() ⇒ string
- .defaultValue() ⇒ *
- .randomValue() ⇒ *
- .discretize(steps) ⇒ array
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
| Param | Type | Description | | --- | --- | --- | | steps | number | an integer number of steps to discretize the range into |