Scippy

SCIP

Solving Constraint Integer Programs

bandit_ucb.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-2019 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 scip.zib.de. */
13 /* */
14 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15 
16 /**@file bandit_ucb.h
17  * @ingroup INTERNALAPI
18  * @brief internal methods for UCB 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_UCB_H__
25 #define __SCIP_BANDIT_UCB_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 UCB bandit algorithms */
39 extern
41  SCIP* scip /**< SCIP data structure */
42  );
43 
44 /*
45  * Callback methods of bandit algorithm
46  */
47 
48 /** callback to free bandit specific data structures */
49 extern
50 SCIP_DECL_BANDITFREE(SCIPbanditFreeUcb);
51 
52 /** selection callback for bandit selector */
53 extern
54 SCIP_DECL_BANDITSELECT(SCIPbanditSelectUcb);
55 
56 /** update callback for bandit algorithm */
57 extern
58 SCIP_DECL_BANDITUPDATE(SCIPbanditUpdateUcb);
59 
60 /** reset callback for bandit algorithm */
61 extern
62 SCIP_DECL_BANDITRESET(SCIPbanditResetUcb);
63 
64 /** internal method to create and reset UCB bandit algorithm */
65 extern
67  BMS_BLKMEM* blkmem, /**< block memory */
68  BMS_BUFMEM* bufmem, /**< buffer memory */
69  SCIP_BANDITVTABLE* vtable, /**< virtual function table for UCB bandit algorithm */
70  SCIP_BANDIT** ucb, /**< pointer to store bandit algorithm */
71  SCIP_Real* priorities, /**< nonnegative priorities for each action, or NULL if not needed */
72  SCIP_Real alpha, /**< parameter to increase confidence width */
73  int nactions, /**< the positive number of actions for this bandit algorithm */
74  unsigned int initseed /**< initial random seed */
75  );
76 
77 #ifdef __cplusplus
78 }
79 
80 #endif
81 
82 #endif
SCIP_DECL_BANDITFREE(SCIPbanditFreeUcb)
Definition: bandit_ucb.c:115
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
type definitions for return codes for SCIP methods
SCIP_DECL_BANDITRESET(SCIPbanditResetUcb)
Definition: bandit_ucb.c:231
SCIP_DECL_BANDITUPDATE(SCIPbanditUpdateUcb)
Definition: bandit_ucb.c:208
type definitions for SCIP&#39;s main datastructure
type definitions for bandit selection algorithms
SCIP_RETCODE SCIPincludeBanditvtableUcb(SCIP *scip)
Definition: bandit_ucb.c:354
SCIP_DECL_BANDITSELECT(SCIPbanditSelectUcb)
Definition: bandit_ucb.c:136
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)
Definition: bandit_ucb.c:295
#define SCIP_Real
Definition: def.h:157
common defines and data types used in all packages of SCIP
struct BMS_BlkMem BMS_BLKMEM
Definition: memory.h:426
memory allocation routines