AxGEPAComponentSelector
Constructors
Constructor
new AxGEPAComponentSelector(targets: readonly AxGEPAComponentTarget[], initialState?: Readonly<Record<string, AxGEPAComponentBanditState>>): AxGEPAComponentSelector;Parameters
| Parameter | Type |
|---|---|
targets | readonly AxGEPAComponentTarget[] |
initialState? | Readonly<Record<string, AxGEPAComponentBanditState>> |
Returns
AxGEPAComponentSelector
Methods
getState()
getState(id: string):
| undefined
| AxGEPAComponentBanditState;Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
| undefined
| AxGEPAComponentBanditState
pick()
pick(iteration: number, rand: () => number): AxGEPAComponentTarget;Parameters
| Parameter | Type |
|---|---|
iteration | number |
rand | () => number |
Returns
recordProposal()
recordProposal(id: string): void;Parameters
| Parameter | Type |
|---|---|
id | string |
Returns
void
recordResult()
recordResult(
id: string,
accepted: boolean,
iteration: number): void;Parameters
| Parameter | Type |
|---|---|
id | string |
accepted | boolean |
iteration | number |
Returns
void
snapshot()
snapshot(): Record<string, AxGEPAComponentBanditState>;Returns
Record<string, AxGEPAComponentBanditState>