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 */
42 extern
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 */
49 extern
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 */
57 extern
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 */
63 extern
65  SCIP_BANDIT* bandit /**< bandit algorithm data structure */
66  );
67 
68 /** return number of actions of this bandit algorithm */
69 extern
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
SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
Definition: bandit.c:143
const char * SCIPbanditvtableGetName(SCIP_BANDITVTABLE *banditvtable)
Definition: bandit.c:272
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:53
SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
Definition: bandit.c:164
#define SCIP_Real
Definition: def.h:157
int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
Definition: bandit.c:293
public methods for Exp.3
SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
Definition: bandit.c:283
common defines and data types used in all packages of SCIP
public methods for UCB bandit selection