TLmaK0 / rustneat

Rust Neat - NeuroEvolution of Augmenting Topologies
MIT License
70 stars 16 forks source link

(1) Generic rewrite #41

Closed Ploppz closed 4 years ago

Ploppz commented 4 years ago

As part of https://github.com/TLmaK0/rustneat/pull/39.

This PR is basically the same as https://github.com/TLmaK0/rustneat/pull/36, although with some more rebasing, and the discussion there is thus still relevant. Note that it includes part of your feature/function_approximation branch.

I disabled the "should solve XOR" test. Because this version still struggles with that, but in https://github.com/TLmaK0/rustneat/pull/39 it is more or less solved and in the last of my PRs we can thus enable it again.

To summarize a bit, at least the important bits of what I remember:

The high changed-lines count accounts for a lot of moving of functionality. For example old Genome -> new NeuralNetwork, and ctrnn.rs was moved into nn/ctrnn.rs. I realize you said in #39:

These pull request shouldn't change any path nor class name.

But I hope that you accept a small change like that. (and as for the Genome/Organism/NeuralNetwork renaming, that just had to be done as part of making the generic version make sense). Because all my subsequent work relies on this 'generic rewrite', it would create too much work if I were to try to delay the generic rewrite until the very end...

I suppose anyway that you shouldn't merge these intermediate PRs, but only the last one? This way you can review the total of all changes (more easily than with one big PR). I think the next PRs will be easier to understand.

Ploppz commented 4 years ago

Tests pass but the error with cargo fmt is likely fixed in a subsequent PR

Ploppz commented 4 years ago

Upcoming PR supersedes this