Detailed Description
internal methods for epsilon greedy bandit selection
Definition in file bandit_epsgreedy.h.
#include "blockmemshell/memory.h"
#include "scip/def.h"
#include "scip/type_bandit.h"
#include "scip/type_retcode.h"
#include "scip/type_scip.h"
Go to the source code of this file.
Functions | |
SCIP_RETCODE | SCIPincludeBanditvtableEpsgreedy (SCIP *scip) |
SCIP_DECL_BANDITFREE (SCIPbanditFreeEpsgreedy) | |
SCIP_DECL_BANDITSELECT (SCIPbanditSelectEpsgreedy) | |
SCIP_DECL_BANDITUPDATE (SCIPbanditUpdateEpsgreedy) | |
SCIP_DECL_BANDITRESET (SCIPbanditResetEpsgreedy) | |
SCIP_RETCODE | SCIPbanditCreateEpsgreedy (BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_BANDITVTABLE *vtable, SCIP_BANDIT **epsgreedy, SCIP_Real *priorities, SCIP_Real eps, SCIP_Bool preferrecent, SCIP_Real decayfactor, int avglim, int nactions, unsigned int initseed) |
Function Documentation
◆ SCIPincludeBanditvtableEpsgreedy()
SCIP_RETCODE SCIPincludeBanditvtableEpsgreedy | ( | SCIP * | scip | ) |
creates the epsilon greedy bandit algorithm includes it in SCIP
- Parameters
-
scip SCIP data structure
Definition at line 339 of file bandit_epsgreedy.c.
References BANDIT_NAME, SCIP_CALL, SCIP_OKAY, and SCIPincludeBanditvtable().
Referenced by SCIPincludeCorePlugins().
◆ SCIP_DECL_BANDITFREE()
SCIP_DECL_BANDITFREE | ( | SCIPbanditFreeEpsgreedy | ) |
callback to free bandit specific data structures
Definition at line 69 of file bandit_epsgreedy.c.
References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, NULL, SCIP_OKAY, SCIPbanditGetData(), SCIPbanditGetNActions(), and SCIPbanditSetData().
◆ SCIP_DECL_BANDITSELECT()
SCIP_DECL_BANDITSELECT | ( | SCIPbanditSelectEpsgreedy | ) |
selection callback for bandit algorithm
Definition at line 92 of file bandit_epsgreedy.c.
References EPSGREEDY_SMALL, NULL, SCIP_OKAY, SCIP_Real, SCIPbanditGetData(), SCIPbanditGetNActions(), SCIPbanditGetRandnumgen(), SCIPrandomGetInt(), and SCIPrandomGetReal().
◆ SCIP_DECL_BANDITUPDATE()
SCIP_DECL_BANDITUPDATE | ( | SCIPbanditUpdateEpsgreedy | ) |
update callback for bandit algorithm
Definition at line 155 of file bandit_epsgreedy.c.
References NULL, SCIP_OKAY, SCIP_Real, and SCIPbanditGetData().
◆ SCIP_DECL_BANDITRESET()
SCIP_DECL_BANDITRESET | ( | SCIPbanditResetEpsgreedy | ) |
reset callback for bandit algorithm
Definition at line 191 of file bandit_epsgreedy.c.
References BMSclearMemoryArray, EPSGREEDY_SMALL, NULL, SCIP_OKAY, SCIP_Real, SCIPbanditGetData(), SCIPbanditGetNActions(), SCIPbanditGetRandnumgen(), SCIPrandomGetReal(), and w.
◆ SCIPbanditCreateEpsgreedy()
SCIP_RETCODE SCIPbanditCreateEpsgreedy | ( | BMS_BLKMEM * | blkmem, |
BMS_BUFMEM * | bufmem, | ||
SCIP_BANDITVTABLE * | vtable, | ||
SCIP_BANDIT ** | epsgreedy, | ||
SCIP_Real * | priorities, | ||
SCIP_Real | eps, | ||
SCIP_Bool | preferrecent, | ||
SCIP_Real | decayfactor, | ||
int | avglim, | ||
int | nactions, | ||
unsigned int | initseed | ||
) |
internal method to create and reset epsilon greedy bandit algorithm
- Parameters
-
blkmem block memory bufmem buffer memory vtable virtual function table with epsilon greedy callbacks epsgreedy pointer to store the epsilon greedy bandit algorithm priorities nonnegative priorities for each action, or NULL if not needed eps parameter to increase probability for exploration between all actions preferrecent should the weights be updated in an exponentially decaying way? decayfactor the factor to reduce the weight of older observations if exponential decay is enabled avglim nonnegative limit on observation number before the exponential decay starts, only relevant if exponential decay is enabled nactions the positive number of possible actions initseed initial random seed
Definition at line 243 of file bandit_epsgreedy.c.
References BMSallocBlockMemory, BMSallocBlockMemoryArray, eps, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPbanditCreate().
Referenced by SCIPcreateBanditEpsgreedy().