Reinforcement Learning Toolbox 2.0
last updated:
General
Documentation
Manual
Tutorial
Class Reference
Master Thesis
Examples
Related Papers
Downloads
Links
News
mailto:webmaster
Main Page     Class Hierarchy   Compound List   File List   Compound Members   File Members

chistory.h

Go to the documentation of this file.
00001 // Copyright (C) 2003
00002 // Gerhard Neumann (gneumann@gmx.net)
00003 // Stephan Neumann (sneumann@gmx.net) 
00004 //                
00005 // This file is part of RL Toolbox.
00006 // http://www.igi.tugraz.at/ril_toolbox
00007 //
00008 // All rights reserved.
00009 // 
00010 // Redistribution and use in source and binary forms, with or without
00011 // modification, are permitted provided that the following conditions
00012 // are met:
00013 // 1. Redistributions of source code must retain the above copyright
00014 //    notice, this list of conditions and the following disclaimer.
00015 // 2. Redistributions in binary form must reproduce the above copyright
00016 //    notice, this list of conditions and the following disclaimer in the
00017 //    documentation and/or other materials provided with the distribution.
00018 // 3. The name of the author may not be used to endorse or promote products
00019 //    derived from this software without specific prior written permission.
00020 // 
00021 // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
00022 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00023 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
00024 // IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
00025 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
00026 // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
00027 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
00028 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
00029 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
00030 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00031 
00032 #ifndef C_HISTORY_H
00033 #define C_HISTORY_H
00034 
00035 #include "cbaseobjects.h"
00036 #include "clearndataobject.h"
00037 #include "cagentlistener.h"
00038 
00039 class CStateCollectionImpl;
00040 class CStateModifier;
00041 class CStateProperties;
00042 class CAction;
00043 class CActionDataSet;
00044 
00046 class CStep : public CStateObject, public CActionObject
00047 {
00048 public:
00049         CStateCollectionImpl *oldState;
00050         CStateCollectionImpl *newState;
00051 
00052         CAction *action;
00053         CActionDataSet *actionData;
00054 
00055         CStep(CStateProperties *properties, std::list<CStateModifier*> *modifiers, CActionSet *actions);
00056         ~CStep();
00057 };
00058 
00060 
00066 class CStepHistory : virtual public CStateModifiersObject, virtual public CLearnDataObject, public CActionObject
00067 {
00068 public:
00069 
00070         CStepHistory(CStateProperties *properties, CActionSet *actions);
00071         virtual ~CStepHistory() {};
00072 
00073         virtual int getNumSteps() = 0;
00074 
00076         virtual void getStep(int index, CStep *step) = 0;
00077 };
00078 
00079 
00081 
00088 class CBatchStepUpdate : public CSemiMDPListener
00089 {
00090 protected:
00091         int numUpdates;
00092         CSemiMDPListener *listener;
00093         CStepHistory *steps;
00094 
00095         CStep *step;
00096 
00097         CActionDataSet *dataSet;
00098 public:
00099         CBatchStepUpdate(CSemiMDPListener *listener, CStepHistory *logger, int numUpdatesPerStep, int numUpdatesPerEpisode, std::list<CStateModifier *> *modifiers);
00100         virtual ~CBatchStepUpdate();
00101 
00102         virtual void newEpisode();
00103         virtual void nextStep(CStateCollection *oldState, CAction *action, CStateCollection *nextState);
00104 
00106 
00109         virtual void simulateSteps(CSemiMDPListener *listener, int num);
00111 
00112         virtual void simulateAllSteps(CSemiMDPListener *listener);
00113 
00114 };
00115 
00116 // ende
00117 
00118 #endif
00119 
00120 
00121