diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2007-07-21 01:39:22 +0000 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2007-07-21 01:39:22 +0000 |
| commit | e94d9893b8753e72adb92b2c5eb203830ddf641c (patch) | |
| tree | fe283d6ede1cfe1a1613742811fb5b34fb8db68c /ai/Net.cpp | |
| parent | 65cc463f1d91fe99acf1c4dd9bce7e0038593022 (diff) | |
Moved to GPLv3 and Qt4, Changed String -> QString, other minor fixes
git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@23 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'ai/Net.cpp')
| -rw-r--r-- | ai/Net.cpp | 151 |
1 files changed, 128 insertions, 23 deletions
@@ -6,46 +6,151 @@ // 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
+// 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
+// the Free Software Foundation, either version 3 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.
+// with this program. If not, see <http://www.gnu.org/licenses/>.
/////////////////////////////////////////////////////////////////////////////
#include "Net.h"
-PokeGen::NeuralNetwork::Net::Net(int numInputNode, int numHiddenNode, int numOutputNode)
+PokeGen::NeuralNetwork::Net::Net(const QList<unsigned> &nodes)
{
- 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]);
- */
+ for (unsigned i = 0; i < nodes.size(); ++i)
+ AddLayer(i, nodes[i]);
}
-PokeGen::NeuralNetwork::Net::Net(const char *fname)
+PokeGen::NeuralNetwork::Net::Net(const QString &fname)
{
+ QFile fin(fname);
+ fin.open();
}
-PokeGen::NeuralNetwork::Net::~Net()
+void SaveData(const char *fname) const
{
- //for (int i = numLayers - 1; i >=0; --i)
- for (int i = 2; i >=0; --i)
- delete layers[i];
- //delete[] layers;
+
+}
+
+void LoadData(const char *fname)
+{
+
+}
+
+void AddLayer(const unsigned place, const unsigned numNodes)
+{
+
+}
+
+void DeleteLayer(const unsigned place)
+{
+
+}
+
+void MoveLayer(const unsigned oldPlace, const unsigned newPlace)
+{
+
+}
+
+void FeedForward()
+{
+
+}
+
+void BackPropagate()
+{
+
+}
+
+void CalculateError()
+{
+
+}
+
+unsigned GetChoice() const
+{
+
+}
+
+unsigned GetNumNodes(const unsigned layer) const
+{
+
+}
+
+void SetInput(const unsigned n, const double i)
+{
+
+}
+
+void SetDesiredOutput(const unsigned n, const double o)
+{
+
+}
+
+void SetMomentum(const unsigned layer, const unsigned n, const double m)
+{
+
+}
+
+void SetMomentumFactor(const unsigned layer, const unsigned n, const double m)
+{
+
+}
+
+void SetLearnRate(const unsigned layer, const unsigned n, const double l)
+{
+
+}
+
+void SetFunction(const unsigned layer, const unsigned n, const unsigned f)
+{
+
+}
+
+double GetOutput(const unsigned n)
+{
+
+}
+
+double GetError(const unsigned layer, const unsigned n)
+{
+
+}
+
+double GetMomentum(const unsigned layer, const unsigned n)
+{
+
+}
+
+double GetMomentumFactor(const unsigned layer, const unsigned n)
+{
+
+}
+
+double GetLearnRate(const unsigned layer, const unsigned n)
+{
+
+}
+
+unsigned GetFunction(const unsigned layer, const unsigned n)
+{
+
+}
+
+double GetWeight(const unsigned layer, const unsigned n, const unsigned i)
+{
+
+}
+
+double GetBias(const unsigned layer, const unsigned n)
+{
+
}
|
