# abstract new PersistableAgent(Tmodel, Tconfig)
Parameters:
Name | Type | Description |
---|---|---|
Tmodel |
The type of the model to load |
|
Tconfig |
The type of the config to save |
Extends
Methods
# abstract config() → {object|undefined}
get the configuration of the agent
- Inherited From:
object
|
undefined
# abstract evalStep(state) → {string}
Method to select an action for prediction
Parameters:
Name | Type | Description |
---|---|---|
state |
object
|
The current game state |
- Inherited From:
- The action to select next
string
# abstract feed(prevState, takenAction, newState, payoff, contextInfo) → {Promise.<void>}
this method feed the new game state and reward back for the agent to update their algorithm
Parameters:
Name | Type | Description |
---|---|---|
prevState |
object
|
The previous game state |
takenAction |
string
|
The action that was taken. |
newState |
object
|
The new game state |
payoff |
number
|
The gained payoff for the agent |
contextInfo |
object
|
Through this object, additional information can be provided. |
- Inherited From:
Promise.<void>
# abstract load(fileManager, optionsnullable) → {Promise.<void>}
load the Model
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fileManager |
FileStrategy
|
FileManager Strategy |
|
options |
object
|
<nullable> |
the options zo use for loading |
Promise.<void>
# abstract loadConfig(fileManager, optionsnullable) → {Promise.<void>}
load the config
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fileManager |
FileStrategy
|
FileManager Strategy |
|
options |
object
|
<nullable> |
the options zo use for loading |
Promise.<void>
# abstract save(fileManager, optionsnullable) → {Promise.<void>}
Save the model
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fileManager |
FileStrategy
|
FileManager Strategy |
|
options |
object
|
<nullable> |
the options to use for saving the agent |
Promise.<void>
# abstract saveConfig(fileManager, optionsnullable) → {Promise.<void>}
Save the Config
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
fileManager |
FileStrategy
|
FileManager Strategy |
|
options |
object
|
<nullable> |
the options to use for saving the agent |
Promise.<void>
# abstract setConfig(confignullable, randomSeednullable) → {void}
Set The configuration of the agent after initailizing.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
config |
object
|
<nullable> |
The config object |
randomSeed |
number
|
<nullable> |
The random Seed |
- Inherited From:
void
# abstract step(state) → {string}
Method for selecting a new action for training
Parameters:
Name | Type | Description |
---|---|---|
state |
object
|
The current game state |
- Inherited From:
- The action to select next
string
# abstract trainingInitialized() → {boolean}
Get whether the agent was correctly initialized for training.
- Inherited From:
boolean