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-2025 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"
    40#include "scip/pub_bandit_ucb.h"
    41#include "scip/type_misc.h"
    42
    43#ifdef __cplusplus
    44extern "C" {
    45#endif
    46
    47/**@addtogroup PublicBanditMethods
    48 *
    49 * @{
    50 */
    51
    52/** select the next action */
    53SCIP_EXPORT
    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 */
    60SCIP_EXPORT
    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 */
    68SCIP_EXPORT
    69const char* SCIPbanditvtableGetName(
    70 SCIP_BANDITVTABLE* banditvtable /**< virtual table for bandit algorithm */
    71 );
    72
    73/** return the random number generator of a bandit algorithm */
    74SCIP_EXPORT
    76 SCIP_BANDIT* bandit /**< bandit algorithm data structure */
    77 );
    78
    79/** return number of actions of this bandit algorithm */
    80SCIP_EXPORT
    82 SCIP_BANDIT* bandit /**< bandit algorithm data structure */
    83 );
    84
    85/** @} */
    86
    87
    88#ifdef __cplusplus
    89}
    90#endif
    91
    92#endif
    common defines and data types used in all packages of SCIP
    #define SCIP_Real
    Definition: def.h:156
    SCIP_RETCODE SCIPbanditUpdate(SCIP_BANDIT *bandit, int action, SCIP_Real score)
    Definition: bandit.c:174
    int SCIPbanditGetNActions(SCIP_BANDIT *bandit)
    Definition: bandit.c:303
    SCIP_RANDNUMGEN * SCIPbanditGetRandnumgen(SCIP_BANDIT *bandit)
    Definition: bandit.c:293
    SCIP_RETCODE SCIPbanditSelect(SCIP_BANDIT *bandit, int *action)
    Definition: bandit.c:153
    const char * SCIPbanditvtableGetName(SCIP_BANDITVTABLE *banditvtable)
    Definition: bandit.c:282
    public methods for the epsilon greedy bandit selector
    public methods for Exp.3
    public methods for Exp.3-IX
    public methods for UCB bandit selection
    type definitions for miscellaneous datastructures
    enum SCIP_Retcode SCIP_RETCODE
    Definition: type_retcode.h:63