Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for Exp.3 bandit selection

Author
Gregor Hendel

Definition in file bandit_exp3.c.

#include "scip/bandit.h"
#include "scip/bandit_exp3.h"
#include "scip/pub_bandit.h"
#include "scip/pub_message.h"
#include "scip/pub_misc.h"
#include "scip/scip_bandit.h"
#include "scip/scip_mem.h"
#include "scip/scip_randnumgen.h"

Go to the source code of this file.

Macros

#define BANDIT_NAME   "exp3"
 
#define NUMTOL   1e-6
 

Functions

 SCIP_DECL_BANDITFREE (SCIPbanditFreeExp3)
 
 SCIP_DECL_BANDITSELECT (SCIPbanditSelectExp3)
 
 SCIP_DECL_BANDITUPDATE (SCIPbanditUpdateExp3)
 
 SCIP_DECL_BANDITRESET (SCIPbanditResetExp3)
 
SCIP_RETCODE SCIPbanditCreateExp3 (BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_BANDITVTABLE *vtable, SCIP_BANDIT **exp3, SCIP_Real *priorities, SCIP_Real gammaparam, SCIP_Real beta, int nactions, unsigned int initseed)
 
SCIP_RETCODE SCIPcreateBanditExp3 (SCIP *scip, SCIP_BANDIT **exp3, SCIP_Real *priorities, SCIP_Real gammaparam, SCIP_Real beta, int nactions, unsigned int initseed)
 
void SCIPsetGammaExp3 (SCIP_BANDIT *exp3, SCIP_Real gammaparam)
 
void SCIPsetBetaExp3 (SCIP_BANDIT *exp3, SCIP_Real beta)
 
SCIP_Real SCIPgetProbabilityExp3 (SCIP_BANDIT *exp3, int action)
 
SCIP_RETCODE SCIPincludeBanditvtableExp3 (SCIP *scip)
 

Macro Definition Documentation

◆ BANDIT_NAME

#define BANDIT_NAME   "exp3"

Definition at line 33 of file bandit_exp3.c.

Referenced by SCIPcreateBanditExp3(), and SCIPincludeBanditvtableExp3().

◆ NUMTOL

#define NUMTOL   1e-6

Definition at line 34 of file bandit_exp3.c.

Referenced by SCIP_DECL_BANDITRESET(), and SCIP_DECL_BANDITUPDATE().

Function Documentation

◆ SCIP_DECL_BANDITFREE()

SCIP_DECL_BANDITFREE ( SCIPbanditFreeExp3  )

callback to free bandit specific data structures

Definition at line 58 of file bandit_exp3.c.

References BMSfreeBlockMemory, BMSfreeBlockMemoryArray, NULL, SCIP_OKAY, SCIPbanditGetData(), SCIPbanditGetNActions(), and SCIPbanditSetData().

◆ SCIP_DECL_BANDITSELECT()

SCIP_DECL_BANDITSELECT ( SCIPbanditSelectExp3  )

selection callback for bandit selector

Definition at line 78 of file bandit_exp3.c.

References NULL, SCIP_OKAY, SCIP_Real, SCIPbanditGetData(), SCIPbanditGetNActions(), SCIPbanditGetRandnumgen(), and SCIPrandomGetReal().

◆ SCIP_DECL_BANDITUPDATE()

SCIP_DECL_BANDITUPDATE ( SCIPbanditUpdateExp3  )

update callback for bandit algorithm

Definition at line 135 of file bandit_exp3.c.

References EPSZ, exp(), NULL, NUMTOL, SCIP_OKAY, SCIP_Real, SCIPbanditGetData(), and SCIPbanditGetNActions().

◆ SCIP_DECL_BANDITRESET()

SCIP_DECL_BANDITRESET ( SCIPbanditResetExp3  )

reset callback for bandit algorithm

Definition at line 210 of file bandit_exp3.c.

References NULL, NUMTOL, SCIP_OKAY, SCIP_Real, SCIPbanditGetData(), and SCIPbanditGetNActions().

◆ SCIPbanditCreateExp3()

SCIP_RETCODE SCIPbanditCreateExp3 ( BMS_BLKMEM blkmem,
BMS_BUFMEM bufmem,
SCIP_BANDITVTABLE vtable,
SCIP_BANDIT **  exp3,
SCIP_Real priorities,
SCIP_Real  gammaparam,
SCIP_Real  beta,
int  nactions,
unsigned int  initseed 
)

direct bandit creation method for the core where no SCIP pointer is available

Parameters
blkmemblock memory data structure
bufmembuffer memory
vtablevirtual function table for callback functions of Exp.3
exp3pointer to store bandit algorithm
prioritiesnonnegative priorities for each action, or NULL if not needed
gammaparamweight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution
betagain offset between 0 and 1 at every observation
nactionsthe positive number of actions for this bandit algorithm
initseedinitial random seed

Definition at line 272 of file bandit_exp3.c.

References BMSallocBlockMemory, BMSallocBlockMemoryArray, NULL, SCIP_ALLOC, SCIP_CALL, SCIP_OKAY, and SCIPbanditCreate().

Referenced by SCIPcreateBanditExp3().

◆ SCIPincludeBanditvtableExp3()

SCIP_RETCODE SCIPincludeBanditvtableExp3 ( SCIP scip)

include virtual function table for Exp.3 bandit algorithms

Parameters
scipSCIP data structure

Definition at line 368 of file bandit_exp3.c.

References BANDIT_NAME, NULL, SCIP_CALL, SCIP_OKAY, and SCIPincludeBanditvtable().

Referenced by SCIPincludeCorePlugins().