///////////////////////////////////////////////////////////////////////////// // Name: ai/Net.cpp // Purpose: An artificial neural network class // Author: Ben Boeckel // Modified by: Ben Boeckel // Created: Fri May 4 19:56:27 2007 // Copyright: ©2007 Nerdy Productions // Licence: // This program 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 2 of the License, or // (at your option) any later version. // // This program 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. // // You should have received a copy of the GNU General Public License along // with this program; if not, write to the Free Software Foundation, Inc., // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ///////////////////////////////////////////////////////////////////////////// #include "Net.h" PokeGen::NeuralNetwork::Net::Net(int numInputNode, int numHiddenNode, int numOutputNode) { layers[0] = new Layer(NULL, layers[1], numInputNode); layers[1] = new Layer(layers[0], layers[2], numHiddenNode); layers[2] = new Layer(layers[1], NULL, numOutputNode); /* layers = new Layer*[numLayers]; layers[0] = new Layer(NULL, layers[1], numNodes[0]); for (int i = 1; i < numLayers - 1; ++i) layers[i] = new Layer(layers[i - 1], layers[i + 1], numNodes[i]); layers[i] = new Layer(layers[i - 1], NULL, numNodes[i]); */ } PokeGen::NeuralNetwork::Net::Net(const char *fname) { } PokeGen::NeuralNetwork::Net::~Net() { //for (int i = numLayers - 1; i >=0; --i) for (int i = 2; i >=0; --i) delete layers[i]; //delete[] layers; }