N-genes 2 is a java general purpose genetic algorithm framework. It is free and open source.
N-genes 2 features include:
- Modular architecture allowing to easily replace components (operators, workflow, fitness functions, etc.)
- Individual can have arbitrary gene types (Boolean, Integers, Strings or custom objects) and most operator works whatever the gene type is.
- The project uses extensive unit testing to assert code quality and avoid regressions between releases.
- All components exploit java generics to enforce type safety at compilation time.
- Builders using dependency injection allow to quickly configure and instanciate a GA simulation.
N-genes 2 is a complete rewrite of a preceding similar framework called n-genes.
Although n-genes 2 relies on several thrid-party libraries, only java and ant are required for installation (see below).
We are trying to make use of the excellent FOSS libraries available for java each time we need features which are not directly related to GA. The dependencies for the current release are:
- slf4j: Logging facade api
- Logback: Logger implementation
- PicoContainer: Dependency injection
- XOM: XML parsing
- JUnit4: Unit testing
- Mockito: Mock objects for testing
- Cobertura: Test coverage
To install, build and use n-genes 2, you will need:
- Java JDK: The project was tested with SUN JDK 1.6 but any version since 1.5 should work.
- Apache Ant: At least version 1.6
First get a repository copy, either by cloning the git repository:
$ git clone git://github.com/paradigmatic/N-genes-2.git
or by dowloading a snapshot.
Then go inside the repository folder and simply type:
$ ant
This will first download all the needed dependencies in the project directory using Apache Ivy and then build n-genes 2 and documentation. The first time you launch the process, the downloads can take several minute to complete.
Once everything is built, you can try to launch the test suite by typing:
$ ant test
Results will be formatted in html and can be accessed by pointing your
web browser at reports/junit/index.html
and
reports/junit/index.hmtl
.
Look at the examples in 'src/ngenes2/examples/' folder.
A full javadoc reference is generated during build in the 'doc/' folder.
N-genes 2 is free and open source software licensed with the General Public License version 3. Check the 'LICENSE.txt' file for details.