aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
IPlanningStrategy.h
Go to the documentation of this file.
1 /**
2  *
3  * Copyright (c) 2005-2021 by Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4  * info_at_agrum_dot_org
5  *
6  * This library is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with this library. If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 
22 /**
23  * @file
24  * @brief Headers of the Planning Strategy interface.
25  *
26  * @author Pierre-Henri WUILLEMIN(@LIP6) and Jean-Christophe MAGNAN and Christophe
27  * GONZALES(@AMU)
28  */
29 
30 
31 // =========================================================================
32 #ifndef GUM_SDYNA_PLANNING_STRATEGY_H
33 #define GUM_SDYNA_PLANNING_STRATEGY_H
34 // =========================================================================
35 #include <string>
36 // =========================================================================
37 #include <agrum/tools/core/types.h>
38 // =========================================================================
39 #include <agrum/FMDP/planning/actionSet.h>
40 // =========================================================================
41 
42 namespace gum {
43 
44  /**
45  * @class IPlanningStrategy IPlanningStrategy.h
46  * <agrum/FMDP/SDyna/IPlanningStrategy.h>
47  * @brief Interface for manipulating FMDP planer
48  * @ingroup fmdp_group
49  *
50  */
51  template < typename GUM_SCALAR >
53  // ###################################################################
54  /// @name Constructor & destructor.
55  // ###################################################################
56  /// @{
57  public:
58  // ==========================================================================
59  /// Destructor (virtual and empty since it's an interface)
60  // ==========================================================================
61  virtual ~IPlanningStrategy() {}
62 
63  /// @}
64 
65  // ###################################################################
66  /// @name Initialization
67  // ###################################################################
68  /// @{
69  public:
70  // ==========================================================================
71  /// Initializes the learner
72  // ==========================================================================
73  virtual void initialize(const FMDP< GUM_SCALAR >* fmdp) = 0;
74 
75  /// @}
76 
77 
78  // ###################################################################
79  /// @name Incremental methods
80  // ###################################################################
81  /// @{
82  public:
83  // ==========================================================================
84  /**
85  * Starts a new planning
86  * @param nbIte : the maximal number of value iteration performed in this
87  * planning
88  */
89  // ==========================================================================
90  virtual void makePlanning(Idx nbIte) = 0;
91 
92  // ==========================================================================
93  /// Returns optimalPolicy computed so far current size
94  // ==========================================================================
96 
97  /// @}
98 
99 
100  // ###################################################################
101  /// @name Miscelleanous methods
102  // ###################################################################
103  /// @{
104  public:
105  // ==========================================================================
106  /// Returns vFunction computed so far current size
107  // ==========================================================================
108  virtual Size vFunctionSize() = 0;
109 
110  // ==========================================================================
111  /// Returns optimalPolicy computed so far current size
112  // ==========================================================================
113  virtual Size optimalPolicySize() = 0;
114 
115  // ==========================================================================
116  /// Returns a string describing the optimal policy in a dot format
117  // ==========================================================================
118  virtual std::string optimalPolicy2String() = 0;
119 
120  /// @}
121  };
122 } // namespace gum
123 #endif // GUM_SDYNA_LEARNING_STRATEGY_H
virtual void initialize(const FMDP< GUM_SCALAR > *fmdp)=0
Initializes the learner.
virtual std::string optimalPolicy2String()=0
Returns a string describing the optimal policy in a dot format.
INLINE void emplace(Args &&... args)
Definition: set_tpl.h:643
virtual ~IPlanningStrategy()
Destructor (virtual and empty since it&#39;s an interface)
virtual Size optimalPolicySize()=0
Returns optimalPolicy computed so far current size.
virtual void makePlanning(Idx nbIte)=0
Starts a new planning.
virtual const MultiDimFunctionGraph< ActionSet, SetTerminalNodePolicy > * optimalPolicy()=0
Returns optimalPolicy computed so far current size.
virtual Size vFunctionSize()=0
Returns vFunction computed so far current size.
<agrum/FMDP/SDyna/IPlanningStrategy.h>