I am looking for a simple Genetic Algorithm program

I am looking for a simple Genetic Algorithm program in any language C, C++, VB or Java etc.
I want to change it so I can use it for a string of 1's and 0's a 1000 bits long.
If any one can help me, please ?


  • You could use a linked list structure, where each node contains a 1 or a 0 (or a series of 1's and 0's) and points to the next node in the list. This would allow you to add to the list, remove elements easily, and have unlimited size (only limitation is the amount of memory available). I'm not sure what exactly you want with this, but you could try something like the following (written in Java):

    public class listNode{
    listNode next;
    byte info;

    public class listManager{
    public static void main(String[] args) {

    /* While user has more nodes to add, add a node, or read from a file instructions, that will include bit information to add to the linked list, search for in the linked list, remove, or anything else you might want from it. **/


    Hope this helps. If you want a more detailed program, just ask and I'll see if I can find my basic listNode program to send you.

    There are two methods in software design. One is to make the program so simple that there are obviously no flaws, the other is to make the program so complicated that there are no obvious flaws.

  • There is a C++ library I've toyed with in the past that offers a fairly complete set of tools for implementing your own genetic algorithims... it's called ga lib, and you can find it here:



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!