Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

58 lines
1.5 KiB
C++

#ifndef __AINNETHPP__
#define __AINNETHPP__
#include <windows.h>
typedef struct {
double *weights; // size is num_inputs
double *deltas; // size is num_inputs
} Back_Node;
class Back_Layer
{
public:
Back_Layer *next,*prev;
Back_Node *thenodes;
int num_nodes;
int num_inputs; // this should equal number of nodes from lower layer
double *inputs;
double *outputs;
double *errors;
Back_Layer (int nodes,int inputs,bool first);
~Back_Layer (void);
void Create (int nodes,int inputs,bool first);
void Destroy (void);
void propagate_forward (void);
void propagate_error (void);
};
class Back_Network
{
public:
Back_Layer *thelayers;
int num_layers;
double *input;
double *output;
double *wanted_output;
double eta,alpha;
int num_outputs,num_inputs;
Back_Network (int layers,int *num_nodes,double neta,double nalpha);
~Back_Network (void);
void propagate_forward (double *inputs);
// This function does not work, the net will not stabalize to a solution
void Learn (bool iscorrect,bool finetune = false,double percent = 0);
void correct (bool finetune = false);
void compute_error (bool finetune);
void propagate_error (void);
void adjust_weights (void);
double *get_answer (void) { return thelayers[num_layers-1].outputs;}
double *get_wanted (void) { return wanted_output;}
};
#endif