Skip to content

BrainsStructureAndConnectome

Clifford Bohm edited this page Jan 24, 2021 · 3 revisions

AbstractBrain was updated in Jan 2021 to include two new ideas.

brain connectome

a brain connectome is a matrix that maps inputs + hidden (before update) to output + hidden (after update). The matrix includes input, output, and hidden along both edges to form a square map (even though nothing can map to inputs, and outputs can only be mapped from if recurrent). The values in the map indicate the number of connections. The method to convert a brain to its connectome and the format of the output is up to the brain developer. If the brain developer does not provide this function, an empty file will be written.

// brainConnectome - a square map of input,output,hidden x input,output,hidden where each cell is the count of actual wires from T -> T+1
// input and output should likely by input and output, hidden needs to be determined by the brain designer
virtual std::vector<std::vector<int>> getConnectome() {
    return(std::vector<std::vector<int>>()); // if not defined by brain, return empty
}
virtual void saveConnectome(std::string fileName = "brainConnectome") {
    FileManager::writeToFile(fileName, "saveConnectome() not written for " + getType());
}

brain structure

Brain structure is a loose concept. Since it is useful to be able to visualize brains, saveBrainStructure was added to provide a standard way for brain developers and end-users to generate a file with brain structure. The method to convert a brain to its structure and the format of the output is up to the brain developer. If the brain developer does not provide this function, an empty file will be written.

// saveBrainStructure - save a file that somehow shows the structure of the brain - how this works is absolutly upto the brain designer.
virtual void saveStructure(std::string fileName = "brainStructure") {
    FileManager::writeToFile(fileName, "saveBrainStructure() not written for " + getType());
}
Clone this wiki locally