// TSolver.h: interface for the TSolver class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TSOLVER_H__20FAC096_F11B_11D6_867D_0000E87713C4__INCLUDED_)
#define AFX_TSOLVER_H__20FAC096_F11B_11D6_867D_0000E87713C4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "TNeuro.h"
#include "TSensors.h"
#include "TActuators.h"
#include "TPattern.h"

class TSolver : public NetBP  
{
protected:
   char name[_MAX_PATH];

   bool stopLearning;

public:
   TSolver();
   virtual ~TSolver();

   char* getName() { return name; };

   void reset();

   void setStopLearning(){ stopLearning = true; };

   void learn( TSolverLearnPattern &solverLearnPattern );
   void solve( TEnvStateSet &envStateSet, TControlSet &controlSet );

   int loadFromFile( const char *fileName );
   int saveToFile( const char *fileName );

   virtual void NextCycle()
   { cycle++; }
};

#endif // !defined(AFX_TSOLVER_H__20FAC096_F11B_11D6_867D_0000E87713C4__INCLUDED_)
