Con*_*uhl 5 artificial-intelligence neural-network genetic-algorithm
我有两个描述神经网络结构的对象数组,如何将它们组合起来产生一个逼真的后代?"染色体"看起来像这样:
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],
];
Run Code Online (Sandbox Code Playgroud)
示例节点:
Node {
nodesThatThisIsConnectedTo = [0, 2, 3, 5] // These numbers identify which nodes to collect output from in 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
}
Run Code Online (Sandbox Code Playgroud)
我认为更好的方法是对每个节点的权重向量实施遗传算法搜索 - 如果您锁定使用 GA。
对于每个节点,都有一组向量,并且每次迭代时,一个节点都会更改其权重向量。在我看来,这似乎是一个比两个完整网络之间交叉更合理的方法。