哪些 Java 库/遗传算法库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3300423/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Which Java library/libraries for Genetic Algorithms?
提问by Nils Schmidt
I want to implement some simple genetic algorithms in Java.
我想用 Java实现一些简单的遗传算法。
So far I found only JGAP. Did somebody has some experience with that? And do you know other Java libraries for GA?
到目前为止,我只找到了JGAP。有人有这方面的经验吗?你知道其他用于 GA 的 Java 库吗?
I do not want to write it my own as in GA written in Javaand I have to use Java, so What is the most active genetic programming library?is also not that helpful.
我不想像在用 Java 编写的 GA 中那样自己编写它,我必须使用 Java,那么最活跃的遗传编程库是什么?也不是很有帮助。
回答by Dan Dyer
I wrote the Watchmaker Frameworkso my opinions are not unbiased. ECJand JGAP are the two most established options and probably the most comprehensive. On the other hand their age means they target older versions of Java, which means no generics.
我写了钟表匠框架,所以我的意见并不公正。 ECJ和 JGAP 是两个最成熟的选项,也可能是最全面的选项。另一方面,它们的年龄意味着它们针对的是旧版本的 Java,这意味着没有泛型。
The Hidden Clause blog did a series of posts(scroll down the list to see them) comparing JGAP, ECJ and Watchmaker.
Hidden Clause 博客发布了一系列帖子(向下滚动列表查看),比较 JGAP、ECJ 和 Watchmaker。
Of the frameworks I didn't write, Jenesis probably the one that has the API that I most like the look of. It too uses a more modern generics-based approach.
在我没有编写的框架中,Jenes可能是拥有我最喜欢的 API 外观的框架。它也使用更现代的基于泛型的方法。
回答by Franz Wilhelmst?tter
回答by user23969
Check out Apache Math - Genetics Algorithm. I have started to look at it. As I'm new to Genetics Algorithms, not sure of the comprehensiveness or not of this library. It does have a nice licensing model for multiple uses for academic and commercial use (Apache 2.0).
查看Apache 数学遗传算法。我已经开始看它了。因为我是遗传算法的新手,所以不确定这个库的全面性与否。它确实有一个很好的许可模型,可用于学术和商业用途(Apache 2.0)的多种用途。
回答by bstabile
I like Sean Luke's ECJ (Evolutionary Computation in Java):
我喜欢 Sean Luke 的 ECJ(Java 进化计算):
http://cs.gmu.edu/~eclab/projects/ecj/
http://cs.gmu.edu/~eclab/projects/ecj/
I've also ported this (independently) to C# .NET 4.0 here:
我还在此处(独立地)将其移植到 C# .NET 4.0:
http://branecloud.codeplex.com
http://branecloud.codeplex.com
Ben
本
回答by lucas1000001
I know Apache Mahout (based on Apache Hadoop) has a load of machine learning type algorithms - although not sure if it's exactly what you're looking for?
我知道 Apache Mahout(基于 Apache Hadoop)有很多机器学习类型的算法——虽然不确定它是否正是你要找的?
回答by John Munsch
This is an alternative I had bookmarked for my own edification later. I've used JGAP in the past and been happy with it, but this one seems to have lots of excellent examples and I thought I'd give it a try next time I needed optimization code.
这是我为以后自己的启迪而加入书签的另一种选择。我过去使用过 JGAP 并且对它很满意,但是这个似乎有很多很好的例子,我想下次我需要优化代码时会尝试一下。
回答by lmsasu
Have a look at Java GALib, Genetic Algorithm Library:
GALib, Java Genetic Algorithm (JAR) library, models chromosomes as real numbers, characters, strings, and string sequences. Very easy to use, just extend one of the existing GA classes and implement your fitness function. Sample GAs included.
GALib,Java 遗传算法 (JAR) 库,将染色体建模为实数、字符、字符串和字符串序列。非常易于使用,只需扩展现有的 GA 类之一并实现您的健身功能。包括示例 GA。

