UESMANN CPP  1.0
Reference implementation of UESMANN
Macros | Functions | Variables
/home/travis/build/jimfinnis/uesmanncpp/genBoolMap.cpp File Reference

Generate a 2D grid (well, a table from which such a grid can be generated) of how many trials of UESMANN on every combination of binary boolean functions succeed. More...

#include "netFactory.hpp"
Include dependency graph for genBoolMap.cpp:

Go to the source code of this file.

Macros

#define NUM_ATTEMPTS   1000
 How many networks to attempt for each pairing in genBoolMap. More...
 
#define ETA   0.1
 the learning rate for genBoolMap More...
 
#define EPOCHS   75000
 how many epochs to train each genBoolMap network for - at 8 examples per epoch, this is 600000 training iterations (single examples) More...
 

Functions

bool boolFunc (int f, bool a, bool b)
 given a function index, perform the appropriate boolean. The index is actually the truth table: four bits in order 00,01,10,11 More...
 
bool success (int f1, int f2, Net *n)
 test if a given network successfully performs a given pair of boolean functions, modulating from f1 to f2. The functions are indices into the simpleNames array. More...
 
double doPairing (int f1, int f2)
 Train a large number of networks to do a particular pairing of boolean functions (provided as indices into simpleNames) and return what proportion successfully perform that pairing under modulation. More...
 
int main (int argc, char *argv[])
 The main function for genBoolMap. More...
 

Variables

double ins [][2]
 possible inputs to boolean functions More...
 
const char * simpleNames []
 names of functions performed by boolFunc() More...
 

Detailed Description

Generate a 2D grid (well, a table from which such a grid can be generated) of how many trials of UESMANN on every combination of binary boolean functions succeed.

This should (and does) generate approximately the same data as in Fig. 5.3a of the thesis (p.100). The variation is no greater than 0.001 (i.e. a single network) in each pairing tested.

Definition in file genBoolMap.cpp.

Macro Definition Documentation

#define EPOCHS   75000

how many epochs to train each genBoolMap network for - at 8 examples per epoch, this is 600000 training iterations (single examples)

Definition at line 26 of file genBoolMap.cpp.

#define ETA   0.1

the learning rate for genBoolMap

Definition at line 19 of file genBoolMap.cpp.

#define NUM_ATTEMPTS   1000

How many networks to attempt for each pairing in genBoolMap.

Definition at line 16 of file genBoolMap.cpp.

Function Documentation

bool boolFunc ( int  f,
bool  a,
bool  b 
)

given a function index, perform the appropriate boolean. The index is actually the truth table: four bits in order 00,01,10,11

Definition at line 50 of file genBoolMap.cpp.

double doPairing ( int  f1,
int  f2 
)

Train a large number of networks to do a particular pairing of boolean functions (provided as indices into simpleNames) and return what proportion successfully perform that pairing under modulation.

Definition at line 110 of file genBoolMap.cpp.

int main ( int  argc,
char *  argv[] 
)

The main function for genBoolMap.

Definition at line 160 of file genBoolMap.cpp.

bool success ( int  f1,
int  f2,
Net n 
)

test if a given network successfully performs a given pair of boolean functions, modulating from f1 to f2. The functions are indices into the simpleNames array.

Definition at line 80 of file genBoolMap.cpp.

Variable Documentation

double ins[][2]
Initial value:
={
{0,0},
{0,1},
{1,0},
{1,1}}

possible inputs to boolean functions

Definition at line 32 of file genBoolMap.cpp.

const char* simpleNames[]
Initial value:
= {
"f","and","x and !y","x","!x and y","y","xor","or","nor","xnor",
"!y","x or !y","!x","!x or y","nand","t"}

names of functions performed by boolFunc()

Definition at line 41 of file genBoolMap.cpp.