//////////////////////////////////////////////////////////////////////////////
//
// File: neunet.h
//
// Purpose: Interface for NeuNet class.  This is a neural network architecture
//          that is used by the NeuralPlayer.
//
// Authors:
//   txe  Travis Emmitt
//
// Modifications:
//   16-APR-1998  txe  Initial creation
//   17-APR-1998  txe  Added Nodes, Layers, and Links
//   18-APR-1998  txe  Added Peek(), LoadWeights(), LoadConfig()
//   19-APR-1998  txe  Moved a lot to Architecture class & constructor
//   21-APR-1998  txe  Added Load(), Save()
//   23-APR-1998  txe  Added comments, loss_rate to Save()
//
//////////////////////////////////////////////////////////////////////////////

#ifndef NEUNET_H
#define NEUNET_H

#include "debug.h"
#include "nn_arch.h"
#include "nn_layer.h"

class NeuNet : public Debug {
private:
  Arch   *arch;          // architecture
  Layer **layers;        // layers, which in turn contain nodes & links
  
public:
  NeuNet (char *name, Arch *arch, int num_inputs, int num_outputs);
  ~NeuNet ();
  
  float GetOutputLevel   (int output_node);
  int   Load             (char *filename);
  void  Peek             ();
  void  Print            ();
  void  Print            (int debug);
  void  RandomizeWeights ();
  void  Reinforce        ();
  void  Run              ();
  int   Save             (char *filename, float loss_rate);
  void  SetInputLevel    (int input_node, float level);
  void  SetOutputGoal    (int output_node, float goal);
  int   Valid            ();
};

#endif

//////////////////////////////////////////////////////////////////////////////
 

