1    	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2    	/*                                                                           */
3    	/*                  This file is part of the program and library             */
4    	/*         SCIP --- Solving Constraint Integer Programs                      */
5    	/*                                                                           */
6    	/*  Copyright (c) 2002-2023 Zuse Institute Berlin (ZIB)                      */
7    	/*                                                                           */
8    	/*  Licensed under the Apache License, Version 2.0 (the "License");          */
9    	/*  you may not use this file except in compliance with the License.         */
10   	/*  You may obtain a copy of the License at                                  */
11   	/*                                                                           */
12   	/*      http://www.apache.org/licenses/LICENSE-2.0                           */
13   	/*                                                                           */
14   	/*  Unless required by applicable law or agreed to in writing, software      */
15   	/*  distributed under the License is distributed on an "AS IS" BASIS,        */
16   	/*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
17   	/*  See the License for the specific language governing permissions and      */
18   	/*  limitations under the License.                                           */
19   	/*                                                                           */
20   	/*  You should have received a copy of the Apache-2.0 license                */
21   	/*  along with SCIP; see the file LICENSE. If not visit scipopt.org.         */
22   	/*                                                                           */
23   	/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
24   	
25   	/**@file   pub_bandit.h
26   	 * @ingroup PublicBanditMethods
27   	 * @brief  public methods for bandit algorithms
28   	 * @author Gregor Hendel
29   	 */
30   	
31   	/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
32   	
33   	#ifndef __SCIP_PUB_BANDIT_H__
34   	#define __SCIP_PUB_BANDIT_H__
35   	
36   	#include "scip/def.h"
37   	#include "scip/pub_bandit_epsgreedy.h"
38   	#include "scip/pub_bandit_exp3.h"
39   	#include "scip/pub_bandit_exp3ix.h"
40   	#include "scip/pub_bandit_ucb.h"
41   	#include "scip/type_misc.h"
42   	
43   	#ifdef __cplusplus
44   	extern "C" {
45   	#endif
46   	
47   	/**@addtogroup PublicBanditMethods
48   	 *
49   	 * @{
50   	 */
51   	
52   	/** select the next action */
53   	SCIP_EXPORT
54   	SCIP_RETCODE SCIPbanditSelect(
55   	   SCIP_BANDIT*          bandit,             /**< bandit algorithm data structure */
56   	   int*                  action              /**< pointer to store the selected action */
57   	   );
58   	
59   	/** update the score of the selected action */
60   	SCIP_EXPORT
61   	SCIP_RETCODE SCIPbanditUpdate(
62   	   SCIP_BANDIT*          bandit,             /**< bandit algorithm data structure */
63   	   int                   action,             /**< index of action for which the score should be updated */
64   	   SCIP_Real             score               /**< observed gain of the i'th action */
65   	   );
66   	
67   	/** return the name of this bandit virtual function table */
68   	SCIP_EXPORT
69   	const char* SCIPbanditvtableGetName(
70   	   SCIP_BANDITVTABLE*    banditvtable        /**< virtual table for bandit algorithm */
71   	   );
72   	
73   	/** return the random number generator of a bandit algorithm */
74   	SCIP_EXPORT
75   	SCIP_RANDNUMGEN* SCIPbanditGetRandnumgen(
76   	   SCIP_BANDIT*          bandit              /**< bandit algorithm data structure */
77   	   );
78   	
79   	/** return number of actions of this bandit algorithm */
80   	SCIP_EXPORT
81   	int SCIPbanditGetNActions(
82   	   SCIP_BANDIT*          bandit              /**< bandit algorithm data structure */
83   	   );
84   	
85   	/** @} */
86   	
87   	
88   	#ifdef __cplusplus
89   	}
90   	#endif
91   	
92   	#endif
93