资源简介

一个不错的基于遗传算法的自动学习分类器系统,可以学习一下。

资源截图

代码片段和文件信息

/*
 * The XCS Library 
 * A C++ framework to apply and develop learning classifier systems
 * Copyright (C) 2002-2009 Pier Luca Lanzi
 * 
 * Pier Luca Lanzi 
 * Dipartimento di Elettronica e Informazione
 * Politecnico di Milano
 * Piazza Leonardo da Vinci 32
 * I-20133 MILANO - ITALY
 * pierluca.lanzi@polimi.it/lanzi@elet.polimi.it
 *
 * This file is part of the XCSLIB library.
 *
 * xcslib is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation either version 3 of the License or
 * (at your option) any later version.
 *
 * xcslib is distributed in the hope that it will be useful
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * A copy of the license is available at http://www.gnu.org/licenses/gpl.html
 * 
 * If you use this code please cite the following technical report:
 *
 * P.L. Lanzi and D. Loiacono (2009) “XCSLib: The XCS Classifier System Library“ 
 * Technical Report No. 2009005 Illinois Genetic Algorithms Laboratory
 * University of Illinois at Urbana-Champaign 117 Transportation Building
 * 104 S. Mathews Avenue Urbana IL 61801
 * 
 * Available at http://www.illigal.uiuc.edu/pub/papers/IlliGALs/2009005.pdf
 *
 * For updates please visit: http://xcslib.sf.net 
 *                           http://www.pierlucalanzi.net
 */




#include 
#include 
#include 
#include “binary_action.hpp“
#include “xcs_random.hpp“
#include “xcs_utility.hpp“

using namespace std;

const char* __XCS_BITSTRING_ACTION_CFG_IN__ = “\n number of bits = %u “;
const char* __XCS_BITSTRING_ACTION_CFG_OUT__ = “\t\tnumber of bits = %u\n“;
#define     __XCS_BITSTRING_VARS_IN__ binary_action::no_bits

bool binary_action::init = false;
unsigned long binary_action::no_actions;
unsigned long binary_action::no_bits;

binary_action::binary_action()
{
if (!init)
{
xcs_utility::error(class_name()“binary_action()“ “not inited“ 1);
} else {

}
}

binary_action::binary_action(int act)
{
if (!init)
{
xcs_utility::error(class_name()“binary_action()“ “not inited“ 1);
} else {
action = act;
bitstring = xcs_utility::long2binary(act binary_action::no_bits);
}
}


unsigned long
binary_action::actions() const
{
return binary_action::no_actions;
};


binary_action::binary_action(xcs_config_mgr2& xcs_config)
{
if (!init)
{
if (!xcs_config.exist(tag_name()))
{
xcs_utility::error(class_name() “constructor“ “section <“ + tag_name() + “> not found“ 1);
}

try {

no_bits = xcs_config.Value(tag_name() “number of bits“);

} catch (const char *attribute) {
string msg = “attribute \‘“ + string(attribute) + “\‘ not found in <“ + tag_name() + “>“;
xcs_utility::error(class_name() “constructor“ msg 1);
}

init = true;

no_actions = (unsigned long) pow(double(2)int(bina

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       5328  2009-03-22 02:48  xcslib-1.0\action_base.hpp

     文件       4386  2009-03-22 02:48  xcslib-1.0\binary_action.cpp

     文件       2898  2009-03-22 02:48  xcslib-1.0\binary_action.hpp

     文件       3306  2009-03-22 02:48  xcslib-1.0\binary_inputs.cpp

     文件       4497  2009-03-22 02:48  xcslib-1.0\binary_inputs.hpp

     文件       2895  2009-03-22 02:48  xcslib-1.0\boolean_action.cpp

     文件       3483  2009-03-22 02:48  xcslib-1.0\boolean_action.hpp

     文件       5548  2009-03-22 02:48  xcslib-1.0\condition_base.hpp

     文件     516536  2009-03-22 02:41  xcslib-1.0\docs\def\doxygen.def

     文件       9096  2009-03-22 02:41  xcslib-1.0\docs\html\doxygen.css

     文件       1762  2009-03-22 02:41  xcslib-1.0\docs\html\tabs.css

     文件       1637  2009-03-22 02:48  xcslib-1.0\dummy_action.cpp

     文件       2808  2009-03-22 02:48  xcslib-1.0\dummy_action.hpp

     文件       5714  2009-03-22 02:48  xcslib-1.0\environment_base.hpp

     文件       1633  2009-03-22 02:41  xcslib-1.0\examples\11-multiplexer\confsys.mp11

     文件       1635  2009-03-22 02:41  xcslib-1.0\examples\20-multiplexer\confsys.mp20

     文件       1635  2009-03-22 02:41  xcslib-1.0\examples\37-multiplexer\confsys.mp37

     文件       1632  2009-03-22 02:41  xcslib-1.0\examples\6-multiplexer\confsys.mp6

     文件       1637  2009-03-22 02:41  xcslib-1.0\examples\70-multiplexer\confsys.mp70

     文件       1713  2009-03-22 02:41  xcslib-1.0\examples\fsm\confsys.fsm

     文件       2034  2009-03-22 02:41  xcslib-1.0\examples\functions\confsys.sin

     文件       1910  2009-03-22 03:06  xcslib-1.0\examples\gridworlds\confsys.gw

     文件       1648  2009-03-22 02:41  xcslib-1.0\examples\parity\confsys.par20-5

     文件       1724  2009-03-22 02:41  xcslib-1.0\examples\woods1\confsys.woods1

     文件         30  2009-03-22 02:41  xcslib-1.0\examples\woods1\woods1.map

     文件       1724  2009-03-22 02:41  xcslib-1.0\examples\woods2\confsys.woods2

     文件        465  2009-03-22 02:41  xcslib-1.0\examples\woods2\woods2.map

     文件      24400  2009-03-22 02:48  xcslib-1.0\experiment_mgr.cpp

     文件       6093  2009-03-22 02:48  xcslib-1.0\experiment_mgr.hpp

     文件       4964  2009-03-22 02:48  xcslib-1.0\fsm_env.cpp

............此处省略96个文件信息

评论

共有 条评论