Aquila  2.0 prealpha
Cognitive Robotics Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mtrnnInterface.h
Go to the documentation of this file.
1 //##############################################################################################################################################################################################################//
2 //Aquila - An Open-Source GPU-Accelerated Toolkit for Cognitive and Neuro-Robotics Research //
3 // //
4 //Copyright (c) <2012>, <Martin Peniak - www.martinpeniak.com> //
5 //All rights reserved. //
6 // //
7 //Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: //
8 // //
9 // - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. //
10 // - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. //
11 // //
12 //THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR //
13 //A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT //
14 //LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR //
15 //TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //
16 // //
17 //The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted //
18 //as representing official policies,either expressed or implied, of the FreeBSD Project. //
19 //##############################################################################################################################################################################################################//
20 
21 #ifndef MTRNN_INTERFACE_H
22 #define MTRNN_INTERFACE_H
23 
24 #include "interface.h"
25 
27 class MTRNNInterface : public Interface
28 {
29  Q_OBJECT
30 
31 public:
32  MTRNNInterface(GUI *pGUI);
33 
34  void sendTrainingFileData(int numControlNeurons, int numLinguisticNeurons, int numVisionNeurons, int numActionNeurons, int numSequences, int sequenceWidth, float minValue, float maxValue, QVector<int> seqenceSteps, QVector<float> sequenceData, int maxSequenceSteps, int totalSequenceSteps);
35  void sendTrainingRequest(QString fileName);
36  void sendTrainingRequest();
37  void sendSaveRequest(QString fileName);
38  void sendNetworkRequest();
39 
40 protected:
41  void processPortData();
42 
43 private:
44  void processNetwork();
45  void processErrors();
46 
47 public slots:
48  void sendParameters(float learningRate, float momentum, float weightRange, float threshold, int iterations, int seed, int numFastNeurons, int numSlowNeurons, int ioDeltaT, int fastDeltaT, int slowDeltaT, int debuggingLevel, int plotUpdateInterval);
49 
50 signals:
51  void errorReceived(int iteration, float error);
52  void networkReceived(QVector<float> network);
53  void errorsReceived(QVector<float> errors);
54  void parametersReceived(float learningRate, float momentum, float weightRange, float threshold, int iterations, int seed, int numFastNeurons, int numSlowNeurons, int ioDeltaT, int fastDeltaT, int slowDeltaT, int debuggingLevel, int plotUpdateInterval);
55 };
56 
57 #endif//MTRNN_INTERFACE_H