Genetic Programming library for Java [closed]
Asked Answered
S

6

15

I'm looking for a good genetic programming library for JVM. (not genetic algorithm but genetic programming) I tried JGAP (jgap.sourceforge.net) and Watchmaker (watchmaker.uncommons.org). Unfortunately, those tools have only experimental and immature support for genetic programming (they are mainly focused on genetic algorithms).

Perhaps do you know any better tool for genetic programming, for JVM (can be written in Java or any other compiled language for JVM).

I'm not looking for a comprehensive list of GP tools, I'm rather looking for a good, popular tool (just like popular operating systems are Windows, Linux and Mac, and popular Java IDEs are Eclipse, IDEA and NetBeans).

It doesn't have to be genetic programming library (GP), it can also be (and it would probably better) a gene expression programming library (GEP).

EDIT (after two months since the question): I analyzed most of the links You posted and which are available in Wiki and I must say that each of those libraries have at least one of the following problems:

  • no open-source, or open-source, but very restrictive (GPL);

  • no documentation (or very poor one);

  • no built-in support for genetic programming or gene expression programming (or experimental one;

  • some are just too complex in use.

In this sitation I ended up in writing my own simple library for the project (using gene expression programming approach, which makes it very very simple).

Sokotra answered 7/10, 2010 at 13:58 Comment(6)
@Carlos: I'm a little disappointed that my answer won the bounty on this. If you want to add more content to the question, I'll donate my winnings to a second bounty. Just @ message me here.Shipshape
@Bill the Lizard, hey no worries buddy its fine i already got cracking my project so for now am fine. Is nice of you to be so sincere and honest. kudos and rep for u buddy ;). All the bestOverstay
Looking at your next question, are you using Drools Planner (ASL, with docs and examples) now? How do you like it? :)Egon
I only tried it after seeing some real code using it ( ). I'm not telling I dislike it, but I can name 2 things that can make people disliking Drools Planner:Sokotra
Aaah, I edited too long, again: - Simulated annealing and tabu search (the stuff present in Drools Planner) is just another method of computational intelligence - it works perfect for some classes of problems (eg timetable planning), whereas may suck for other - there is no perfect method to do computational intelligence. - A bit, I dislike the relationship between Drools Planner and Drools - I would rather prefer to see Drools Planner as a separate library, and IMO it should be up to programmer to decide how to implement fitness function (Drools or Java code).Sokotra
@Sokotra Thanks for the feed-back. 1) Simulated annealing and tabu search are indeed focussed on scheduling, packing and routing problems. 2) It's implementable to make the fitness function customizable (and I'd accept such a patch), which would make some interesting benchmarks. However, the whole point of using a rule engine is to get delta score calculation for free, which is terrible to implement that boilerplate code yourself.Egon
P
5

ECJ has a lot of stuff for GP, and including several example projects.

Photoactive answered 7/10, 2010 at 19:20 Comment(0)
S
2

There are libraries like GenPro and n-genes for Java, and JGProg for Groovy.

There are more listed for several different languages in the Implementations section of the Genetic programming Wikipedia article, but as you mentioned many of those look like they're more for GA, so you'll have to evaluate each one to see if it suits your needs.

Shipshape answered 7/10, 2010 at 14:50 Comment(1)
Have you tried GP with some of these libraries? There are many GP libraries on the internet, but most of them are of very, very poor quality, completely unsuitable for production. I've tried JGAP and Watchmaker, and I'm unable to try all libraries available, so I'm asking you - users of stackoverflow for an opinion, maybe somebody of you have lots of experience with Java GP.Sokotra
S
1

I am somewhat biased because I'm one of the authors, but EpochX is a Java library solely for Genetic Programming. It has support for a strongly-typed tree representation, and 2 grammar guided representations. It is primarily aimed at researchers, but it may be suitable depending on what you require it for. You can get more information at epochx.org.

Shrum answered 7/10, 2010 at 22:23 Comment(3)
Ahh - I was almost ready to try epochx when I noticed - it's under GPL license! The project I make will be commercial (so I can't use GPL). Why don't you release it under LGPL - it's a kind of compromise between GPL and the "do anything you want" licenses like Apache, MIT or BSD. Probably there's more such users that won't use your library only because it's GPL-ed.Sokotra
Thanks for the advice. I'll see if we can reassess the license because I don't see any reason to disallow commercial use.Shrum
Now licensed under LGPL.Ashti
A
1

I just finished building my own Genetic Programming tool in Clojure (Built on the JVM). Once I could do symbolic regression, I realized that the tool was a lot more restrictive than I wanted and more complex to solve the strongly typing issue. I've decided to move into a Grammatical Evolution tool (Genetic Programming can be construed as a subset of Grammatical Evolution). The GEVA tool is my first stop for a Grammatical Evolution tool. My understanding is that it is also still being developed (there was a recent rev this year (2010)).

Antacid answered 11/10, 2010 at 12:47 Comment(2)
Thanks for info, I didn't know about GEVA before. I guess that GEVA is more powerful for some problems, whereas for other genetic algorithms are more powerful, whereas for some another neural networks or Bayessian networks. I think I'll try genetic algorithms and GEP for now because I know them well, and if it won't please me, I'll try GEVA.Sokotra
Just to clarify the answer here - GEVA is an implementation of Grammatical Evolution (GE), an evolutionary algorithm that uses grammars. There are other implementations of GE, such as jGE, libGE and EpochX which has already been mentioned in another answer.Shrum
R
1

Maybe you could use parts of TinyGP? It's not really a library, more of a GP-system but since it is quite small you could easily adapt it for your uses.

Recording answered 18/2, 2012 at 0:29 Comment(0)
L
0

JGAP (Java Genetic Algorithms Package) is a sophisticated GA library, available for free at jgap.sf.net, Many examples included.

Lueck answered 7/10, 2010 at 16:51 Comment(3)
JGAP was already mentioned in the question. "I tried JGAP (jgap.sourceforge.net)...."Christiansen
I've mentioned JGAP in my question - very immature genetic programming support, added only in the recent version.Sokotra
What's more, JGAP has very ugly design (for example compared to Watchmaker).Sokotra

© 2022 - 2024 — McMap. All rights reserved.