42#define BANDIT_NAME "exp3ix"
106 weightsum = banditdata->weightsum;
107 weights = banditdata->weights;
118 for(
i = 0;
i < nactions - 1; ++
i )
123 prob = weights[
i] / weightsum;
169 weights = banditdata->weights;
170 weightsum = banditdata->weightsum;
171 newweightsum = weightsum;
173 etaparam = 2.0 * gammaparam;
179 lossestim = (1.0 - score) / (prob + gammaparam);
184 weights[
selection] *= exp(-etaparam * lossestim);
187 banditdata->weightsum = newweightsum;
190 banditdata->iter += 1;
208 weights = banditdata->weights;
213 for(
i = 0;
i < nactions; ++
i )
216 banditdata->weightsum = (
SCIP_Real)nactions;
219 banditdata->iter = 1;
237 unsigned int initseed
245 banditdata->iter = 1;
260 unsigned int initseed
286 assert(banditdata->weightsum > 0.0);
289 return banditdata->weights[action] / banditdata->weightsum;
300 SCIPbanditFreeExp3IX, SCIPbanditSelectExp3IX, SCIPbanditUpdateExp3IX, SCIPbanditResetExp3IX) );
void SCIPbanditSetData(SCIP_BANDIT *bandit, SCIP_BANDITDATA *banditdata)
SCIP_RETCODE SCIPbanditCreate(SCIP_BANDIT **bandit, SCIP_BANDITVTABLE *banditvtable, BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_Real *priorities, int nactions, unsigned int initseed, SCIP_BANDITDATA *banditdata)
SCIP_BANDITDATA * SCIPbanditGetData(SCIP_BANDIT *bandit)
internal methods for bandit algorithms
static SCIP_Real SCIPcomputeGamma(int nactions, int t)
SCIP_RETCODE SCIPincludeBanditvtableExp3IX(SCIP *scip)
SCIP_RETCODE SCIPbanditCreateExp3IX(BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_BANDITVTABLE *vtable, SCIP_BANDIT **exp3ix, SCIP_Real *priorities, int nactions, unsigned int initseed)
internal methods for Exp.3-IX bandit algorithm
int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
SCIP_Real SCIPgetProbabilityExp3IX(SCIP_BANDIT *exp3ix, int action)
SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
SCIP_BANDITVTABLE * SCIPfindBanditvtable(SCIP *scip, const char *name)
SCIP_RETCODE SCIPincludeBanditvtable(SCIP *scip, SCIP_BANDITVTABLE **banditvtable, const char *name, SCIP_DECL_BANDITFREE((*banditfree)), SCIP_DECL_BANDITSELECT((*banditselect)), SCIP_DECL_BANDITUPDATE((*banditupdate)),)
SCIP_RETCODE SCIPcreateBanditExp3IX(SCIP *scip, SCIP_BANDIT **exp3ix, SCIP_Real *priorities, int nactions, unsigned int initseed)
BMS_BUFMEM * SCIPbuffer(SCIP *scip)
SCIP_Real SCIPrandomGetReal(SCIP_RANDNUMGEN *randnumgen, SCIP_Real minrandval, SCIP_Real maxrandval)
unsigned int SCIPinitializeRandomSeed(SCIP *scip, unsigned int initialseedvalue)
assert(minobj< SCIPgetCutoffbound(scip))
#define BMSfreeBlockMemory(mem, ptr)
#define BMSallocBlockMemory(mem, ptr)
#define BMSallocBlockMemoryArray(mem, ptr, num)
#define BMSfreeBlockMemoryArray(mem, ptr, num)
struct BMS_BufMem BMS_BUFMEM
struct BMS_BlkMem BMS_BLKMEM
BMS_BLKMEM * SCIPblkmem(SCIP *scip)
public methods for bandit algorithms
public methods for message output
public data structures and miscellaneous methods
public methods for bandit algorithms
public methods for memory management
public methods for random numbers
#define SCIP_DECL_BANDITUPDATE(x)
#define SCIP_DECL_BANDITFREE(x)
struct SCIP_Bandit SCIP_BANDIT
struct SCIP_BanditData SCIP_BANDITDATA
#define SCIP_DECL_BANDITSELECT(x)
struct SCIP_BanditVTable SCIP_BANDITVTABLE
#define SCIP_DECL_BANDITRESET(x)
struct SCIP_RandNumGen SCIP_RANDNUMGEN
enum SCIP_Retcode SCIP_RETCODE