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-2022 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 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 #include "scip/type_misc.h"
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /**@addtogroup PublicBanditMethods
38  *
39  * @{
40  */
41 
42 /** select the next action */
43 SCIP_EXPORT
45  SCIP_BANDIT* bandit, /**< bandit algorithm data structure */
46  int* action /**< pointer to store the selected action */
47  );
48 
49 /** update the score of the selected action */
50 SCIP_EXPORT
52  SCIP_BANDIT* bandit, /**< bandit algorithm data structure */
53  int action, /**< index of action for which the score should be updated */
54  SCIP_Real score /**< observed gain of the i'th action */
55  );
56 
57 /** return the name of this bandit virtual function table */
58 SCIP_EXPORT
59 const char* SCIPbanditvtableGetName(
60  SCIP_BANDITVTABLE* banditvtable /**< virtual table for bandit algorithm */
61  );
62 
63 /** return the random number generator of a bandit algorithm */
64 SCIP_EXPORT
66  SCIP_BANDIT* bandit /**< bandit algorithm data structure */
67  );
68 
69 /** return number of actions of this bandit algorithm */
70 SCIP_EXPORT
72  SCIP_BANDIT* bandit /**< bandit algorithm data structure */
73  );
74 
75 /** @} */
76 
77 
78 #ifdef __cplusplus
79 }
80 #endif
81 
82 #endif
public methods for the epsilon greedy bandit selector
type definitions for miscellaneous datastructures
SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
Definition: bandit.c:144
const char * SCIPbanditvtableGetName(SCIP_BANDITVTABLE *banditvtable)
Definition: bandit.c:273
enum SCIP_Retcode SCIP_RETCODE
Definition: type_retcode.h:54
SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
Definition: bandit.c:165
#define SCIP_Real
Definition: def.h:177
int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
Definition: bandit.c:294
public methods for Exp.3
SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
Definition: bandit.c:284
common defines and data types used in all packages of SCIP
public methods for UCB bandit selection