How should I Test a Genetic Algorithm

前端 未结 10 671
心在旅途
心在旅途 2021-01-29 22:00

I have made a quite few genetic algorithms; they work (they find a reasonable solution quickly). But I have now discovered TDD. Is there a way to write a genetic algorithm (whic

10条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-29 22:35

    You could write a redundant neural network to analyze the results from your algorithm and have the output ranked based on expected outcomes. :)

    Break your method down as much as your can. Then you can also have a unit test around just the random part to check the range of values. Even have the test run it a few times to see if the result changes.

提交回复
热议问题