Scippy

SCIP

Solving Constraint Integer Programs

pub_bandit.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 pub_bandit.h
17  * @ingroup PublicBanditMethods
18  * @brief public methods for bandit algorithms
19  * @author Gregor Hendel
20  */
21 
22 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
23 
24 #ifndef __SCIP_PUB_BANDIT_H__
25 #define __SCIP_PUB_BANDIT_H__
26 
27 #include "scip/def.h"
29 #include "scip/pub_bandit_exp3.h"
30 #include "scip/pub_bandit_ucb.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /**@addtogroup PublicBanditMethods
37  *
38  * @{
39  */
40 
41 /** select the next action */
44  SCIP_BANDIT* bandit, /**< bandit algorithm data structure */
45  int* action /**< pointer to store the selected action */
46  );
47 
48 /** update the score of the selected action */
51  SCIP_BANDIT* bandit, /**< bandit algorithm data structure */
52  int action, /**< index of action for which the score should be updated */
53  SCIP_Real score /**< observed gain of the i'th action */
54  );
55 
56 /** return the name of this bandit virtual function table */
58 const char* SCIPbanditvtableGetName(
59  SCIP_BANDITVTABLE* banditvtable /**< virtual table for bandit algorithm */
60  );
61 
62 /** return the random number generator of a bandit algorithm */
65  SCIP_BANDIT* bandit /**< bandit algorithm data structure */
66  );
67 
68 /** return number of actions of this bandit algorithm */
71  SCIP_BANDIT* bandit /**< bandit algorithm data structure */
72  );
73 
74 /* @} */
75 
76 
77 #ifdef __cplusplus
78 }
79 #endif
80 
81 #endif
public methods for the epsilon greedy bandit selector
#define SCIP_EXPORT
Definition: def.h:98
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_EXPORT SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
Definition: bandit.c:143
SCIP_EXPORT const char * SCIPbanditvtableGetName(SCIP_BANDITVTABLE *banditvtable)
Definition: bandit.c:272
SCIP_EXPORT SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
Definition: bandit.c:164
SCIP_EXPORT SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
Definition: bandit.c:283
SCIP_EXPORT int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
Definition: bandit.c:293
#define SCIP_Real
Definition: def.h:164
public methods for Exp.3
common defines and data types used in all packages of SCIP
public methods for UCB bandit selection