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

cactionstatistics.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_ACTIONSTATISTIC_H
00033 #define C_ACTIONSTATISTIC_H
00034 
00035 
00036 #include "ril_debug.h"
00037 
00038 class CAction;
00039 class CAgentController;
00040 
00042 
00045 class CActionStatistics
00046 {
00047 public:
00048         CActionStatistics();
00049         virtual ~CActionStatistics(){};
00051         double probability;
00053         int equal;
00055         int superior;
00057     CAgentController *owner;
00059         CAction *action;
00060 
00062         void copy(CActionStatistics *stat);
00064         void reset();
00065 };
00066 
00068 class CActionStatisticsComparator
00069 {
00070 public:
00071         virtual ~CActionStatisticsComparator() {};
00073         virtual int compare(CActionStatistics *first, CActionStatistics *second) = 0;
00074 };
00075 
00076 
00078 class CGreedyASComparator : public CActionStatisticsComparator
00079 {
00080 public:
00081         virtual ~CGreedyASComparator() {};
00082         virtual int compare(CActionStatistics *first, CActionStatistics *second);
00083 };
00084 
00086 class CPEGreedyASComparator : public CActionStatisticsComparator
00087 {
00088 public:
00089         virtual ~CPEGreedyASComparator() {};
00090         virtual int compare(CActionStatistics *first, CActionStatistics *second);
00091 };
00092 
00094 class CPOASComparator: public CActionStatisticsComparator
00095 {
00096 private:
00097         CAgentController* owner;
00098 
00099 public:
00100         CPOASComparator(CAgentController *owner) {this->owner = owner;};
00101         virtual ~CPOASComparator() {};
00102 
00103         void setOwner(CAgentController *owner) {this->owner = owner;};
00104         CAgentController *getOwner() {return this->owner;};
00105         virtual int compare(CActionStatistics *first, CActionStatistics *second);
00106 };
00107 #endif
00108