0 votes
1 view
in AI and Deep Learning by (50.5k points)

I have two arrays of objects that describe the structure of a neural network, how can I combine them to produce offspring that are realistic? The "chromosomes" would look something like this:

chromosome = [

    [Node, Node, Node],

    [Node, Node, Node, Node, Node],

    [Node, Node, Node, Node],

    [Node, Node, Node, Node, Node],

    [Node, Node, Node, Node, Node, Node, Node],

    [Node, Node, Node],


An example node:

Node {

    nodesThatThisIsConnectedTo = [0, 2, 3, 5] // These numbers identify which nodes to collect output from the preceding layer from based on their index number

    weights = [0.34, 0.33, 0.76, -0.56] // These are the corresponding weights applied to the mentioned nodes


1 Answer

0 votes
by (108k points)

After calculating the fitness value (i.e. accuracy) for all solutions, the remaining steps of GA in the main figure are applied the same way done previously. The best parents are selected, based on their precision, into the mating pool. Then mutation and crossover variants are applied to produce the offspring. The population of the new generation is created using both offspring and parents. These steps are repeated for a number of generations.

The best way is to implement a genetic algorithm search for each node's weight vector if you're locked on using GA.

For every node, there is a population of vectors, and each iteration one node changes its weight vector. This seems to me like a much sounder approach then cross-over between two full networks.

If you wish to know more about Neural Network visit this Neural Network Tutorial.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !