Scippy

SCIP

Solving Constraint Integer Programs

Detailed Description

methods for Exp.3-IX bandit selection

Author
Antonia Chmiela

Definition in file bandit_exp3ix.c.

#include "scip/bandit.h"
#include "scip/bandit_exp3ix.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   "exp3ix"
 

Functions

 SCIP_DECL_BANDITFREE (SCIPbanditFreeExp3IX)
 
 SCIP_DECL_BANDITSELECT (SCIPbanditSelectExp3IX)
 
static SCIP_Real SCIPcomputeGamma (int nactions, int t)
 
 SCIP_DECL_BANDITUPDATE (SCIPbanditUpdateExp3IX)
 
 SCIP_DECL_BANDITRESET (SCIPbanditResetExp3IX)
 
SCIP_RETCODE SCIPbanditCreateExp3IX (BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_BANDITVTABLE *vtable, SCIP_BANDIT **exp3ix, SCIP_Real *priorities, int nactions, unsigned int initseed)
 
SCIP_RETCODE SCIPcreateBanditExp3IX (SCIP *scip, SCIP_BANDIT **exp3ix, SCIP_Real *priorities, int nactions, unsigned int initseed)
 
SCIP_Real SCIPgetProbabilityExp3IX (SCIP_BANDIT *exp3ix, int action)
 
SCIP_RETCODE SCIPincludeBanditvtableExp3IX (SCIP *scip)
 

Macro Definition Documentation

◆ BANDIT_NAME

#define BANDIT_NAME   "exp3ix"

Definition at line 42 of file bandit_exp3ix.c.

Referenced by SCIPcreateBanditExp3IX(), and SCIPincludeBanditvtableExp3IX().

Function Documentation

◆ SCIP_DECL_BANDITFREE()

SCIP_DECL_BANDITFREE ( SCIPbanditFreeExp3IX  )

callback to free bandit specific data structures

Definition at line 65 of file bandit_exp3ix.c.

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

◆ SCIP_DECL_BANDITSELECT()

SCIP_DECL_BANDITSELECT ( SCIPbanditSelectExp3IX  )

selection callback for bandit selector

Definition at line 85 of file bandit_exp3ix.c.

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

◆ SCIPcomputeGamma()

static SCIP_Real SCIPcomputeGamma ( int  nactions,
int  t 
)
static

compute gamma_t

Parameters
nactionsthe positive number of actions for this bandit algorithm
tcurrent iteration

Definition at line 139 of file bandit_exp3ix.c.

References SCIP_Real.

Referenced by SCIP_DECL_BANDITUPDATE().

◆ SCIP_DECL_BANDITUPDATE()

SCIP_DECL_BANDITUPDATE ( SCIPbanditUpdateExp3IX  )

update callback for bandit algorithm

Definition at line 148 of file bandit_exp3ix.c.

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

◆ SCIP_DECL_BANDITRESET()

SCIP_DECL_BANDITRESET ( SCIPbanditResetExp3IX  )

reset callback for bandit algorithm

Definition at line 196 of file bandit_exp3ix.c.

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

◆ SCIPbanditCreateExp3IX()

SCIP_RETCODE SCIPbanditCreateExp3IX ( BMS_BLKMEM blkmem,
BMS_BUFMEM bufmem,
SCIP_BANDITVTABLE vtable,
SCIP_BANDIT **  exp3ix,
SCIP_Real priorities,
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-IX
exp3ixpointer to store bandit algorithm
prioritiesnonnegative priorities for each action, or NULL if not needed
nactionsthe positive number of actions for this bandit algorithm
initseedinitial random seed

Definition at line 230 of file bandit_exp3ix.c.

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

Referenced by SCIPcreateBanditExp3IX().

◆ SCIPincludeBanditvtableExp3IX()

SCIP_RETCODE SCIPincludeBanditvtableExp3IX ( SCIP scip)

include virtual function table for Exp.3-IX bandit algorithms

Parameters
scipSCIP data structure

Definition at line 293 of file bandit_exp3ix.c.

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

Referenced by SCIPincludeCorePlugins().