Skip to content

Latest commit

 

History

History
402 lines (224 loc) · 10.5 KB

qagent.md

File metadata and controls

402 lines (224 loc) · 10.5 KB

Globals / QAgent /

Class: QAgent

Hierarchy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

+ new QAgent(config: QAgentConfig, qmatrix?: QMatrix, name?: string): QAgent

Overrides AbstractAgent.constructor

Defined in reimprove/algorithms/q/qagent.ts:20

Parameters:

Name Type
config QAgentConfig
qmatrix? QMatrix
name? string

Returns: QAgent


Properties

Protected agentConfig

agentConfig: AgentConfig

Inherited from AbstractAgent.agentConfig

Defined in reimprove/algorithms/abstract_agent.ts:10


Private currentState

currentState: QState

Defined in reimprove/algorithms/q/qagent.ts:17


Private history

history: Array<QTransition>

Defined in reimprove/algorithms/q/qagent.ts:15


Private lossOnAlreadyVisited

lossOnAlreadyVisited: boolean

Defined in reimprove/algorithms/q/qagent.ts:20


Private previousTransition

previousTransition: QTransition

Defined in reimprove/algorithms/q/qagent.ts:16


Private qmatrix

qmatrix: QMatrix

Defined in reimprove/algorithms/q/qagent.ts:19


Accessors

AgentConfig

get AgentConfig(): QAgentConfig

Overrides AbstractAgent.AgentConfig

Defined in reimprove/algorithms/q/qagent.ts:138

Returns: QAgentConfig

set AgentConfig(config: QAgentConfig): void

Overrides AbstractAgent.AgentConfig

Defined in reimprove/algorithms/q/qagent.ts:142

Parameters:

Name Type
config QAgentConfig

Returns: void


CurrentState

get CurrentState(): QState

Defined in reimprove/algorithms/q/qagent.ts:134

Returns: QState

set CurrentState(state: QState): void

Defined in reimprove/algorithms/q/qagent.ts:130

Parameters:

Name Type
state QState

Returns: void


History

get History(): QTransition[]

Defined in reimprove/algorithms/q/qagent.ts:126

Returns: QTransition[]


Name

get Name(): string

Inherited from AbstractAgent.Name

Defined in reimprove/algorithms/abstract_agent.ts:19

Returns: string

set Name(name: string): void

Inherited from AbstractAgent.Name

Defined in reimprove/algorithms/abstract_agent.ts:20

Parameters:

Name Type
name string

Returns: void


QMatrix

get QMatrix(): QMatrix

Defined in reimprove/algorithms/q/qagent.ts:118

Returns: QMatrix

set QMatrix(qmatrix: QMatrix): void

Defined in reimprove/algorithms/q/qagent.ts:122

Parameters:

Name Type
qmatrix QMatrix

Returns: void


Methods

finalState

finalState(reward: number, state?: QState): void

Defined in reimprove/algorithms/q/qagent.ts:101

Parameters:

Name Type
reward number
state? QState

Returns: void


getStatesGraph

getStatesGraph(): object

Defined in reimprove/algorithms/q/qagent.ts:146

Returns: object


getTrackingInformation

getTrackingInformation(): AgentTrackingInformation

Overrides AbstractAgent.getTrackingInformation

Defined in reimprove/algorithms/q/qagent.ts:54

Returns: AgentTrackingInformation


infer

infer(): QTransition

Overrides AbstractAgent.infer

Defined in reimprove/algorithms/q/qagent.ts:63

Returns: QTransition


isPerforming

isPerforming(): boolean

Defined in reimprove/algorithms/q/qagent.ts:72

Returns: boolean


learn

learn(data?: QStateData): void

Defined in reimprove/algorithms/q/qagent.ts:76

Parameters:

Name Type
data? QStateData

Returns: void


reset

reset(): void

Overrides AbstractAgent.reset

Defined in reimprove/algorithms/q/qagent.ts:150

Returns: void


restart

restart(): void

Defined in reimprove/algorithms/q/qagent.ts:58

Returns: void


Protected setAgentConfig

setAgentConfig(config: AgentConfig): void

Inherited from AbstractAgent.setAgentConfig

Defined in reimprove/algorithms/abstract_agent.ts:17

Parameters:

Name Type
config AgentConfig

Returns: void


setLossOnAlreadyVisitedState

setLossOnAlreadyVisitedState(toggle: boolean): void

Defined in reimprove/algorithms/q/qagent.ts:154

Parameters:

Name Type
toggle boolean

Returns: void


updateMatrix

updateMatrix(data: QStateData): void

Defined in reimprove/algorithms/q/qagent.ts:84

Parameters:

Name Type
data QStateData

Returns: void


Static Private bestAction

bestAction(...values: QTransition[]): QTransition

Defined in reimprove/algorithms/q/qagent.ts:106

Parameters:

Name Type
...values QTransition[]

Returns: QTransition