Scippy

SCIP

Solving Constraint Integer Programs

bandit_exp3.h
Go to the documentation of this file.
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2 /* */
3 /* This file is part of the program and library */
4 /* SCIP --- Solving Constraint Integer Programs */
5 /* */
6 /* Copyright (C) 2002-2021 Konrad-Zuse-Zentrum */
7 /* fuer Informationstechnik Berlin */
8 /* */
9 /* SCIP is distributed under the terms of the ZIB Academic License. */
10 /* */
11 /* You should have received a copy of the ZIB Academic License */
12 /* along with SCIP; see the file COPYING. If not visit scipopt.org. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file bandit_exp3.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for Exp.3 bandit algorithm
19  * @author Gregor Hendel
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_BANDIT_EXP3_H__
25 #define __SCIP_BANDIT_EXP3_H__
26 
27 
28 #include "blockmemshell/memory.h"
29 #include "scip/def.h"
30 #include "scip/type_bandit.h"
31 #include "scip/type_retcode.h"
32 #include "scip/type_scip.h"
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 /** include virtual function table for Exp.3 bandit algorithms */
40  SCIP* scip /**< SCIP data structure */
41  );
42 
43 /*
44  * callback methods for Exp.3 bandit algorithm to create a virtual function table
45  */
46 
47 /** callback to free bandit specific data structures */
48 SCIP_DECL_BANDITFREE(SCIPbanditFreeExp3);
49 
50 /** selection callback for bandit selector */
51 SCIP_DECL_BANDITSELECT(SCIPbanditSelectExp3);
52 
53 /** update callback for bandit algorithm */
54 SCIP_DECL_BANDITUPDATE(SCIPbanditUpdateExp3);
55 
56 /** reset callback for bandit algorithm */
57 SCIP_DECL_BANDITRESET(SCIPbanditResetExp3);
58 
59 /** direct bandit creation method for the core where no SCIP pointer is available */
61  BMS_BLKMEM* blkmem, /**< block memory data structure */
62  BMS_BUFMEM* bufmem, /**< buffer memory */
63  SCIP_BANDITVTABLE* vtable, /**< virtual function table for callback functions of Exp.3 */
64  SCIP_BANDIT** exp3, /**< pointer to store bandit algorithm */
65  SCIP_Real* priorities, /**< nonnegative priorities for each action, or NULL if not needed */
66  SCIP_Real gammaparam, /**< weight between uniform (gamma ~ 1) and weight driven (gamma ~ 0) probability distribution */
67  SCIP_Real beta, /**< gain offset between 0 and 1 at every observation */
68  int nactions, /**< the positive number of actions for this bandit algorithm */
69  unsigned int initseed /**< initial random seed */
70  );
71 
72 #ifdef __cplusplus
73 }
74 #endif
75 
76 #endif
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_DECL_BANDITUPDATE(SCIPbanditUpdateExp3)
Definition: bandit_exp3.c:135
type definitions for return codes for SCIP methods
SCIP_DECL_BANDITSELECT(SCIPbanditSelectExp3)
Definition: bandit_exp3.c:78
SCIP_DECL_BANDITRESET(SCIPbanditResetExp3)
Definition: bandit_exp3.c:210
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)
Definition: bandit_exp3.c:272
type definitions for SCIP&#39;s main datastructure
SCIP_RETCODE SCIPincludeBanditvtableExp3(SCIP *scip)
Definition: bandit_exp3.c:368
type definitions for bandit selection algorithms
SCIP_DECL_BANDITFREE(SCIPbanditFreeExp3)
Definition: bandit_exp3.c:58
#define SCIP_Real
Definition: def.h:163
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:429
memory allocation routines