Scippy

SCIP

Solving Constraint Integer Programs

bandit_ucb.h File Reference

Detailed Description

internal methods for UCB bandit algorithm

Author
Gregor Hendel

Definition in file bandit_ucb.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 SCIPincludeBanditvtableUcb (SCIP *scip)
 
 SCIP_DECL_BANDITFREE (SCIPbanditFreeUcb)
 
 SCIP_DECL_BANDITSELECT (SCIPbanditSelectUcb)
 
 SCIP_DECL_BANDITUPDATE (SCIPbanditUpdateUcb)
 
 SCIP_DECL_BANDITRESET (SCIPbanditResetUcb)
 
SCIP_RETCODE SCIPbanditCreateUcb (BMS_BLKMEM *blkmem, BMS_BUFMEM *bufmem, SCIP_BANDITVTABLE *vtable, SCIP_BANDIT **ucb, SCIP_Real *priorities, SCIP_Real alpha, int nactions, unsigned int initseed)
 

Function Documentation

◆ SCIPincludeBanditvtableUcb()

SCIP_RETCODE SCIPincludeBanditvtableUcb ( SCIP scip)

include virtual function table for UCB bandit algorithms

Parameters
scipSCIP data structure

Definition at line 364 of file bandit_ucb.c.

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

Referenced by SCIPincludeCorePlugins().

◆ SCIP_DECL_BANDITFREE()

SCIP_DECL_BANDITFREE ( SCIPbanditFreeUcb  )

callback to free bandit specific data structures

Definition at line 125 of file bandit_ucb.c.

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

◆ SCIP_DECL_BANDITSELECT()

SCIP_DECL_BANDITSELECT ( SCIPbanditSelectUcb  )

selection callback for bandit selector

Definition at line 146 of file bandit_ucb.c.

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

◆ SCIP_DECL_BANDITUPDATE()

SCIP_DECL_BANDITUPDATE ( SCIPbanditUpdateUcb  )

update callback for bandit algorithm

Definition at line 218 of file bandit_ucb.c.

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

◆ SCIP_DECL_BANDITRESET()

SCIP_DECL_BANDITRESET ( SCIPbanditResetUcb  )

reset callback for bandit algorithm

Definition at line 241 of file bandit_ucb.c.

References dataReset(), NULL, SCIP_CALL, SCIP_OKAY, SCIPbanditGetData(), and SCIPbanditGetNActions().

◆ SCIPbanditCreateUcb()

SCIP_RETCODE SCIPbanditCreateUcb ( BMS_BLKMEM blkmem,
BMS_BUFMEM bufmem,
SCIP_BANDITVTABLE vtable,
SCIP_BANDIT **  ucb,
SCIP_Real priorities,
SCIP_Real  alpha,
int  nactions,
unsigned int  initseed 
)

internal method to create and reset UCB bandit algorithm

Parameters
blkmemblock memory
bufmembuffer memory
vtablevirtual function table for UCB bandit algorithm
ucbpointer to store bandit algorithm
prioritiesnonnegative priorities for each action, or NULL if not needed
alphaparameter to increase confidence width
nactionsthe positive number of actions for this bandit algorithm
initseedinitial random seed

Definition at line 305 of file bandit_ucb.c.

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

Referenced by SCIPcreateBanditUcb().