Software Programming

Kunuk Nykjaer

Genetic Algorithm example with Java

with 164 comments


Simple Genetic algorithm example.

The population starts with some random fitness strength, after some generations the algorithm should produce a population which has a stronger fitness strength. The max value possible here is 10.

Replacement strategy: elitism 10% i.e. top 10% parent survives each generation.
Steady state (only replace parent if child is better at least as good).
Selection strategy: Tournament method.
Find 4 random in population not same
Let 2 fight, and 2 fight
The winners makes 2 children

Click show source below for the Java code
GA.java

import java.util.Collections;
import java.util.LinkedList;
import java.util.Random;

/**
 * @author Kunuk Nykjaer
 */

public class GA {

	static long BEGIN;
	static final boolean _DEBUG = true;
	LinkedList<Candidate> population = new LinkedList<Candidate>();
	final Random rand = new Random();

	final int populationSize = 10;
	final int parentUsePercent = 10;

	public GA() {
		for (int i = 0; i < populationSize; i++) {
			Candidate c = new Candidate();
			c.random();
			population.add(c);
		}

		Collections.sort(population); // sort method
		System.out.println("Init population sorted");
		print();
	}

	void print() {
		System.out.println("-- print");
		for (Candidate c : population) {
			System.out.println(c);
		}
	}

	/**
	 * Selection strategy: Tournament method Replacement strategy: elitism 10%
	 * and steady state find 4 random in population not same let 2 fight, and 2
	 * fight the winners makes 2 children
	 */
	void produceNextGen() {
		LinkedList<Candidate> newpopulation = new LinkedList<Candidate>();

		while (newpopulation.size() < populationSize
				* (1.0 - (parentUsePercent / 100.0))) {

			int size = population.size();
			int i = rand.nextInt(size);
			int j, k, l;

			j = k = l = i;

			while (j == i)
				j = rand.nextInt(size);
			while (k == i || k == j)
				k = rand.nextInt(size);
			while (l == i || l == j || k == l)
				l = rand.nextInt(size);

			Candidate c1 = population.get(i);
			Candidate c2 = population.get(j);
			Candidate c3 = population.get(k);
			Candidate c4 = population.get(l);

			int f1 = c1.fitness();
			int f2 = c2.fitness();
			int f3 = c3.fitness();
			int f4 = c4.fitness();

			Candidate w1, w2;

			if (f1 > f2)
				w1 = c1;
			else
				w1 = c2;

			if (f3 > f4)
				w2 = c3;
			else
				w2 = c4;

			Candidate child1, child2;

			// Method one-point crossover random pivot
			// int pivot = rand.nextInt(Candidate.SIZE-2) + 1; // cut interval
			// is 1 .. size-1
			// child1 = newChild(w1,w2,pivot);
			// child2 = newChild(w2,w1,pivot);

			// Method uniform crossover
			Candidate[] childs = newChilds(w1, w2);
			child1 = childs[0];
			child2 = childs[1];

			double mutatePercent = 0.01;
			boolean m1 = rand.nextFloat() <= mutatePercent;
			boolean m2 = rand.nextFloat() <= mutatePercent;

			if (m1)
				mutate(child1);
			if (m2)
				mutate(child2);

			boolean isChild1Good = child1.fitness() >= w1.fitness();
			boolean isChild2Good = child2.fitness() >= w2.fitness();

			newpopulation.add(isChild1Good ? child1 : w1);
			newpopulation.add(isChild2Good ? child2 : w2);
		}

		// add top percent parent
		int j = (int) (populationSize * parentUsePercent / 100.0);
		for (int i = 0; i < j; i++) {
			newpopulation.add(population.get(i));
		}

		population = newpopulation;
		Collections.sort(population);
	}

	// one-point crossover random pivot
	Candidate newChild(Candidate c1, Candidate c2, int pivot) {
		Candidate child = new Candidate();

		for (int i = 0; i < pivot; i++) {
			child.genotype[i] = c1.genotype[i];
		}
		for (int j = pivot; j < Candidate.SIZE; j++) {
			child.genotype[j] = c2.genotype[j];
		}

		return child;
	}

	// Uniform crossover
	Candidate[] newChilds(Candidate c1, Candidate c2) {
		Candidate child1 = new Candidate();
		Candidate child2 = new Candidate();

		for (int i = 0; i < Candidate.SIZE; i++) {
			boolean b = rand.nextFloat() >= 0.5;
			if (b) {
				child1.genotype[i] = c1.genotype[i];
				child2.genotype[i] = c2.genotype[i];
			} else {
				child1.genotype[i] = c2.genotype[i];
				child2.genotype[i] = c1.genotype[i];
			}
		}

		return new Candidate[] { child1, child2 };
	}

	void mutate(Candidate c) {
		int i = rand.nextInt(Candidate.SIZE);
		c.genotype[i] = !c.genotype[i]; // flip
	}

	public static void main(String[] args) {
		BEGIN = System.currentTimeMillis();

		GA ga = new GA();
		ga.run();

		long END = System.currentTimeMillis();
		System.out.println("Time: " + (END - BEGIN) / 1000.0 + " sec.");
	}

	void run() {
		final int maxSteps = 50000;
		int count = 0;

		while (count < maxSteps) {
			count++;
			produceNextGen();
		}

		System.out.println("\nResult");
		print();
	}
}

Click show source below for the Java code
Candidate.java

import java.util.Random;

/**
 * @author Kunuk Nykjaer
 */

public class Candidate implements Comparable<Candidate> {
	public static final int SIZE = 10;
	public boolean[] genotype;
	final Random rand = new Random();

	public Candidate() {
		genotype = new boolean[SIZE];
	}

	void random() {
		for (int i = 0; i < genotype.length; i++) {
			genotype[i] = 0.5 > rand.nextFloat();
		}
	}

	private String gene() {
		StringBuilder sb = new StringBuilder();
		for (int i = 0; i < genotype.length; i++) {
			sb.append(genotype[i] == true ? 1 : 0);
		}
		return sb.toString();
	}

	int fitness() {
		int sum = 0;
		for (int i = 0; i < genotype.length; i++) {
			if (genotype[i])
				sum++;
		}
		return sum;
	}

	public int compareTo(Candidate o) {
		int f1 = this.fitness();
		int f2 = o.fitness();

		if (f1 < f2)
			return 1;
		else if (f1 > f2)
			return -1;
		else
			return 0;
	}

	@Override
	public String toString() {
		return "gene=" + gene() + " fit=" + fitness();
	}
}

Init population sorted
— print
gene=0001111101 fit=6
gene=1110001011 fit=6
gene=1010001111 fit=6
gene=0011010101 fit=5
gene=0011011001 fit=5
gene=0011111000 fit=5
gene=1101000010 fit=4
gene=1100010001 fit=4
gene=1001100010 fit=4
gene=0010100001 fit=3

Result
— print
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
gene=1111111111 fit=10
Time: 0.536 sec.

Written by kunuk Nykjaer

September 27, 2010 at 11:12 pm

164 Responses

Subscribe to comments with RSS.

  1. Thanks man. That is an awesome piece of work. I enhanced the code to solve Travelling Salesman problem easily.

    Marcel P

    May 19, 2011 at 7:50 pm

    • Hi…please can i get a link to your candidate class to see how it functions….Thanks!!!

      kikilizle

      June 23, 2011 at 1:57 am

      • If you leave your email address I will sent the code. I do not have the code online.

        Marcel P

        June 23, 2011 at 5:59 am

      • Hi Marcel have to implement genetic algorithm in time table scheduling example please help me .send me code to bvrssss@gmail.com

        bvrssss

        December 10, 2016 at 8:28 pm

    • Hi…please can i get a link to your candidate class to see how it functions….Thanks!!!

      faiz

      March 14, 2012 at 9:31 am

      • Hi…please can i get a link to your candidate class to see how does it works….Thanks!!! reply to dtthuha79@gmail.com

        rabbit7978

        April 6, 2015 at 11:00 am

    • Hi Marcel, can I get the code for the implementation of travelling salesman problem to see how it works? thanks, my email – luke4dtoptop@yahoo.co.uk

      Lucas

      April 19, 2012 at 10:16 am

    • Hi Marcel can you send me the code please joaomalmeida@ua.pt thx a lot

      João Almeida

      May 28, 2012 at 1:47 pm

    • Hi Marcel can you send me the code please dariominones@yahoo.com.ar thanks!!

      Dario

      June 3, 2012 at 2:33 am

    • Hi Marcel, can I get the code for the implementation of travelling salesman problem to see how it works? thanks, my email – seema_viji@yahoo.co.in

      Seema

      June 22, 2012 at 10:35 am

    • please send me solution of traveling slaesman problem at rose_dolly@live.com

      rozdolly

      September 17, 2012 at 10:39 am

    • Hi Marcel have to implement genetic algorithm in time table scheduling example please help me .send me code to javadeveloperdocs@gmail.com .

      javaD

      September 22, 2012 at 7:46 am

      • hi I have to implement genetic algorithm in time table scheduling example please help me .send me code to
        bvrssss@gmail.com

        bvrssss

        December 10, 2016 at 8:20 pm

    • Marcel P. Can you plz mail me the code of TSP. i am having some problems implementing it.

      Niravra

      October 14, 2012 at 6:29 am

    • Respected Sir/Madom
      i need source code for genetic algorithm ,so please send it on given below mail id
      s_chadokar@yahoo.co.in
      Thanking you

      Surendra Kumar Chadokar

      December 15, 2012 at 12:21 pm

    • Whats’ up men, could you provide me your TSP?

      Ivan

      February 21, 2013 at 2:37 am

      • I’d like the TSP solution too, please. mike.reddy@newport.ac.uk or the email attached to this reply. Just want to say I used your GA.java example with some students last week. Very helpful. Thank you!
        DoctorMike

        DoctorMikeReddy

        February 21, 2013 at 11:44 am

      • Mike, a one question, Did Marcel send you the TSP? If is yes could you forward me the code.

        Regards

        Ivan Lopez

        March 7, 2013 at 6:31 am

      • No. Not got that yet 😦

        DoctorMikeReddy

        March 7, 2013 at 7:23 am

    • What’s up bro, could you send me the travelling salesman problem with AG, I will needed for a project. Please advice.

      Regards
      Ivan Lopez

      Ivan Lopez

      March 7, 2013 at 6:28 am

    • by the way, my email is lopezalex_7@hotmail.com. Please man it would be really helpful.

      Ivan Lopez

      March 7, 2013 at 6:30 am

    • Hi Marcel, can I get the code for the implementation of travelling salesman problem
      my email udayashok@gmail.com

      uday

      July 2, 2013 at 8:36 pm

    • Bounce

      DoctorMikeReddy

      April 1, 2016 at 9:02 am

    • Bounce. Repeat request below at end of thread.

      DoctorMikeReddy

      April 1, 2016 at 9:03 am

  2. nma09@yahoo.com. cheers!!!

    kikilizle

    June 23, 2011 at 10:08 am

    • Hi Marcel,

      Just a reminder to send the candidate class to my mailbox. Thanks!!!

      kikilizle

      July 1, 2011 at 4:25 pm

      • Hi, I did sent it out on June 24. I think you should check your spam folder maybe.

        Marcel

        July 2, 2011 at 7:22 am

      • Hi Can u please send me algorithm implementation code and theory , i want implement this in calssroom course example .please help me .

        JavaD

        September 16, 2012 at 8:05 am

  3. […] Genetic Algorithm example with java 02 Jul Simple Genetic algorithm example. The population starts with some random fitness strength, after some generations the algorithm should produce a population which has a stronger fitness strength. The max value possible here is 10. Replacement strategy: elitism 10% i.e. top 10% parent survives each generation. Steady state (only replace parent if child is better at least as good). Selection strategy: Tournament method. Find 4 random in population n … Read More […]

  4. Hi Marcel, would be grateful if you can re-send it. I probably might have deleted it without knowing….cheers!!!

    kikilizle

    July 3, 2011 at 5:26 pm

    • Ok, I just sent it out again.

      Marcel P

      July 3, 2011 at 6:59 pm

      • Thanks!!

        kikilizle

        July 3, 2011 at 7:07 pm

    • Hello kikilizle, qq, Did Marcel send you the TSP with genetic algorithm? If is yes could you forward me the code.

      Because I’m trying to contact Marcel, but eh doesn’t answer.

      Thanks in advance

      Ivan Lopez

      March 13, 2013 at 12:54 am

  5. Hi!! Used your tournament method for my selection and it worked perfectly well. I’m a bit confused on how to go about my crossover because I’m representing my chromosomes using intermediate recombination and not binary. Can you be of any help?

    kikilizle

    July 18, 2011 at 3:01 pm

  6. This is very good code. Thanks mate. This helps me a lot.

    ian

    August 8, 2011 at 5:25 pm

  7. Hi…please can i get a link to your candidate class to see how does it works….Thanks!!! reply to shail.saw@gmail.com

    shailesh

    August 9, 2011 at 9:09 am

  8. Hi…
    please can i get am implementation of your candidate class to see how does it works….Thanks!!! please reply to shail.saw@gmail.com

    shailesh

    August 9, 2011 at 8:35 pm

  9. Ok, I mailed you..

    Cheers

    Marcel P

    August 10, 2011 at 6:10 am

    • Thanks

      shailesh

      August 11, 2011 at 8:08 am

    • Hi Marcel,
      I would like to have a copy of ur code to see how it works.. Thanks in advance…

      Anand Kumar

      June 13, 2012 at 9:05 am

  10. Hi…please can i get a link to your candidate class to see how does it works….Thanks!!! reply to agalcha.vijaycalls@gmail.com

    i am

    Vijay Agalcha

    October 31, 2011 at 8:42 am

  11. Please…….. Me too. 😀
    riki.hidayat.91@gmail.com

    Thank’s before. cheers

    Riki

    November 2, 2011 at 3:41 pm

    • Hi sir
      through search I got into here. sir I want to do resource allocation through genetic algorithm in cloudsim please help me. or send me code at rahim.uom@gmail.com

      Rahim Ullah

      March 17, 2018 at 2:27 pm

  12. The candidate class is already in the code near line 183. It’s one file with multiple classes.
    Save the file as GA.java and it should print out of the box as the given example.

    kunuk Nykjaer

    November 2, 2011 at 7:55 pm

    • Hi Kunuk,
      can you please send the whole code to me – nehanisha.p@gmail.com.
      I need the similar code for my project.
      It would be of great help
      Thanks very much!

      Neha

      February 7, 2013 at 1:56 am

  13. I’d like to use this simple example for one of my classes, if I may.

    DoctorMikeReddy

    November 17, 2011 at 5:38 pm

  14. mee too sir…thanks in advance… nlasay@ymail.com

    lem22

    January 31, 2012 at 8:07 am

  15. THANK YOUUUUUUUUUU…you are the best =D

    seko

    February 4, 2012 at 12:07 am

  16. Hi…please can i get a link to your candidate class to see how it functions….Thanks!!!

    surya

    February 9, 2012 at 3:20 pm

  17. Hi…please can i get a link to your candidate class to see how it functions….Thanks!!!
    mail id : pampana88@gmail.com

    surya

    February 9, 2012 at 3:26 pm

  18. Thanks before, I am looking forward for a simple example then I found it here!
    I can run the java but i don’t know if I have a candidate class, but it’s work perfectly.
    I search anywhere the candidate.class location to find out it’s content so I can edit it, but I don’t know where the location..
    any help?

    thanks

    masphei

    February 11, 2012 at 10:17 am

  19. ow, I’m sorry, it exist in line 198 perfectly… thanks

    masphei

    February 11, 2012 at 10:19 am

  20. Hi…
    please can i get am implementation of your candidate class to see how does it works….Thanks!!! please reply to rakeshforit@gmail.com

    rakesh

    February 11, 2012 at 12:04 pm

  21. Hi Guys,

    I need a java code for Rastrigin function genetic algorithm.

    Plz provide this…

    Rajesh

    February 15, 2012 at 10:39 am

  22. Hi,can i get a link to your candidate class to see how it functions.thank you….

    Faiz Azman

    March 14, 2012 at 9:35 am

  23. Thanks a lot Admin ,

    I’m trying to develop a Genetic code in java that provide me the possibility to generate a timetable, please if you have something that can help, send me at foued_khalfallah@yahoo.fr

    Thanks in advance

    foued

    March 22, 2012 at 9:44 am

    • Could u plz send me the candidate class……

      Nisha

      March 27, 2012 at 11:06 am

  24. risheba@gmail.com is my id…
    plz send 2 it………

    Nisha

    March 27, 2012 at 11:07 am

    • Thank you a lot for your reply

      I sentthe candidate class to your email, check it please

      foued

      March 28, 2012 at 10:51 am

  25. HI, could you please send me your candidate class, I really need help. Thank you.

    Ny

    April 10, 2012 at 7:52 pm

  26. merlin samy

    April 16, 2012 at 6:43 pm

  27. hi its awesome can i u send me your candidate class to clear understanding of yhe entire code, plz send it to me my mail id is tallurikrishnadev@gmail.com

    krishna

    April 18, 2012 at 7:18 pm

  28. Hi , can u plz send me the candidate class. i need your help,and would be thankful if given the candidate class mi email id is geetha.chowdary417@gmail.com

    kasturi

    April 19, 2012 at 7:33 am

  29. Thanks man, good work! I am trying to develop genetic algorithm in java for resource allocation problem, if you have some thing that can help, pls send it to – luke4dtoptop@yahoo.co.uk Thanks.

    Lucas

    April 19, 2012 at 10:25 am

    • Hello Lucas, please could you forward me the code of Marcel

      Ivan Lopez

      March 13, 2013 at 12:57 am

  30. Hi Lucas, check your mail…

    MarcelP

    April 19, 2012 at 10:41 am

    • Thanks man

      Lucas

      April 19, 2012 at 11:23 am

    • Hello Marcel,

      I am also interested in your code, it will be really helpful if I get a copy 🙂
      My email is makaveli91ro@yahoo.com – Thank you in advance mate!

      Sergio

      February 20, 2013 at 2:48 pm

  31. Hi this is krishna, just a friendly reminder about candidate class

    krishna

    April 19, 2012 at 4:22 pm

    • Check your mail

      Marcel P

      April 19, 2012 at 6:12 pm

      • Thank u marcle, if possible can u describe the candidate class work, in my case i have to find the best fitness value among the functions. i have to create functions by performing crossover& mutation.for my case how can i write the candidate class. can u help me onthis
        my mail id is tallurikrishnadev@gmail.com

        krishna

        April 20, 2012 at 12:06 am

      • Have to develop optimizing Course timetabling using Genetic Algorithm please can u help me .javadeveloperdocs@gmail.com

        JavaD

        September 16, 2012 at 8:28 am

      • Hi Marcel,
        I need a similar code for my project. Can you please kindly send the whole code to me, including candidate.java.My id – nehanisha.p@gmail.com
        Thanks very much in advance!

        Neha

        February 7, 2013 at 1:51 am

  32. Hi this is geetha,i am tryng to develop genetic algorithm for mathematical functions, if you send cnadidate class that helps me,plz send it to geetha.chowdary417@gmail.com

    kasturi

    April 19, 2012 at 4:28 pm

  33. lamanahas@hotmail.com
    thanks in advance !

    Lama Nahas

    May 2, 2012 at 2:00 pm

  34. Hi all,

    Can this code helps me to resolve timetable problem ?

    foued

    May 28, 2012 at 3:10 pm

  35. This is really interesting! Could I have a link to the “Candidate” class as well? goulda@bxscience.edu

    alxg833

    June 7, 2012 at 3:26 pm

  36. Hi Marcel can you send me the Candidate class athonor@gmail.com thanks!

    Rafal

    June 16, 2012 at 9:17 am

  37. Can you please give the Candidate class? Thanks in advance.

    anubhab91

    July 24, 2012 at 7:25 pm

  38. Hi Marcel, I am a graduate student in Canada. I need to know how to use Genetic algorithm to solve optimization problem in cognitive radio network. If I can get the code for your salesman problem, then I will be able to midify it for my own purpose. Kindly assists me with your code. Thank you. My email add is jegede1@yahoo.com

    Olawale

    July 29, 2012 at 4:15 am

  39. Hi Marcel, I am a graduate student in Canada. I need to know how to use Genetic algorithm to solve optimization problem in cognitive radio network. If I can get the code for your salesman problem, then I will be able to modify it for my own purpose. Kindly assists me with your code. Thank you. My email add is jegede1@yahoo.com.

    Olawale

    July 29, 2012 at 4:16 am

  40. Thanks for the code. I am interested in evolutionary computation implemented in Java. I posted an entry in http://lunaglacialis.blogspot.com where I describe the development of a genetic algorithm implemented in Java.
    Greetings!

    daniel

    August 6, 2012 at 9:12 pm

  41. i need the code for genetic algorithm..can u send me

    devi

    September 4, 2012 at 7:14 am

  42. can you please send me the code to candidate class? dviros7@gmail.com

    dvir

    September 15, 2012 at 5:52 pm

  43. hi!!! I have difficulty in my program. can you please send me the code to candidate class? mikkocrizaldo@yahoo.com

    Mico crizaldo

    September 16, 2012 at 11:54 am

  44. Marcel P please send me code of traveling salesman problem solution at rose_dolly@live.com

    rozdolly

    September 17, 2012 at 10:38 am

  45. Marcel, can you please send the code for TSP to me too? Thanks! lilcococinel@yahoo.com

    cococinel

    September 22, 2012 at 2:05 am

  46. Hi have to implement genetic algorithm in time table scheduling example please help me .send me code to javadeveloperdocs@gmail.com . please help me its urgent

    javaD

    September 22, 2012 at 8:00 am

  47. hi, would you pleasesend the code in to my email nanang.arfandi@gmail.com
    i want to see how it works. Thenk U again

    Nanang Arfandi

    October 9, 2012 at 1:41 pm

  48. please, send me the code too, about the salesman, renatho_1@hotmail.com

    Renatho

    October 28, 2012 at 5:13 am

  49. thank you for this , i need to modify the code and implement it into my final year project

    appleworth

    October 29, 2012 at 8:43 pm

  50. hi send me the genetic algorithm code.my email id tribikram14@gmail.com

    tribikram pradhan

    November 19, 2012 at 11:01 pm

  51. please send me the TSP problem code on jahhanzeb.maqbool@gmail.com

    Jahanzeb

    November 21, 2012 at 8:21 am

  52. Also can I have the Candidate.java . please send me on
    jahanzeb.maqbool@gmail.com

    Jahanzeb

    November 21, 2012 at 8:22 am

  53. Please send me TSP code with GA on singhrsk@yahoo.co.uk
    Thanks.

    R SINGH

    November 22, 2012 at 5:37 pm

  54. hi friends i want ga code find best fitness value that is random generate bit in binary form that binary bit convert to decimal that fitness plz send me code

    kishore

    December 1, 2012 at 3:46 pm

  55. hi friends i want ga code find best fitness value that is random generate bit in binary form that binary bit convert to decimal that fitness plz send me code kishorekmr_90@yahoo.com

    kishore

    December 1, 2012 at 3:50 pm

  56. can u send me the code pls….

    Mala

    January 3, 2013 at 8:15 am

  57. hi send me the genetic algorithm code.
    plz send it to r.malacc@gmail.com

    Mala

    January 3, 2013 at 8:19 am

  58. hello, please send me the code for candidate class and TSP codes too. thank you.
    jcsieras@gmail.com

    jong

    January 7, 2013 at 2:43 pm

  59. plz send the code to lakipriya1@gmail.com

    priya

    January 12, 2013 at 3:08 pm

  60. hello friend , can you please possible to send code on sumityog@yahoo.co.in

    sumit

    February 3, 2013 at 9:42 am

  61. Hi, seems to be very good code…can you please send the whole code to me – nehanisha.p@gmail.com
    Thanks very much!

    neha

    February 5, 2013 at 10:22 pm

  62. Hello, I am wondering if you can please send the Candidate class to me. 🙂
    seanwalsh1984@gmail.com

    Sean Walsh

    March 11, 2013 at 7:41 pm

  63. Hello can you please send the code, xolisarotya@gmail.com

    xolisa91

    March 21, 2013 at 6:22 pm

  64. Hello! Please send me the genetic algorithm code (mada_2626@yahoo.com). Thanks!

    madeleyna26

    April 15, 2013 at 7:57 am

  65. please send the code

    sarva

    May 22, 2013 at 10:53 pm

  66. Hi…please can i get a link to your candidate class to see how does it works….Thanks!!! reply to varsaratchagan@yahoo.com

    sarva

    May 25, 2013 at 11:39 pm

  67. Hi Kunuk, I am also trying to learn GA program. I found this program in the net. Can u please tell me which IDE u r using.

    Rashi

    June 20, 2013 at 7:25 am

    • Eclipse

      kunuk Nykjaer

      June 21, 2013 at 1:50 pm

      • Hi Kunuk,Thanks for your work in GA.I require a GA program which gets non binary input fro a file for my project.If i get GA code for timetable preparation it will be useful.Ca n you send the code to me -nandumano@yahoo.co.in

        nandhini

        December 27, 2013 at 7:23 am

  68. sir can u mail me whole code on jadhavpravin920@gmail.com

    pravin

    July 7, 2013 at 1:28 pm

  69. hye marcel. can u email me the sample genetic algorithm code..shaxes_cico86@yahoo.com..thanks a lot..

    caste110

    July 24, 2013 at 6:32 pm

  70. can i get code for generating time table using genetic algorithm my email id is mgaur_019@yahoo.com

    gaur

    August 19, 2013 at 7:14 am

  71. Hello Bro, can u mail me the code of UCTP(university course timetabling problem ) using Genetic Algorithm with Local search & Guided search Techniques

    Raviteja Chodisetty

    August 29, 2013 at 1:43 pm

  72. Hello Bro, can u mail me the code of UCTP(university course timetabling problem ) using Genetic Algorithm with Local search & Guided search Techniques.. Please mail to ravi999teja@gmail.com

    Raviteja Chodisetty

    August 29, 2013 at 2:00 pm

  73. please send time table generation project to my mail id kdevanmca@gmail.com

    K.Devan

    September 16, 2013 at 2:43 pm

  74. plz send the code for time table generator using genetic algorithm… akavikadu@gmail.com
    Thanks in advance

    avinash kadu

    October 21, 2013 at 1:09 pm

  75. hai please send the full simple geneic algorithm code to ramucs40@gmail.com

    ramu

    November 29, 2013 at 2:30 pm

  76. Thanks for your work in GA.I require a GA program which gets non binary input from a file for my project.If i get GA code for timetable preparation it will be useful.Can you send the code to me -nandumano@yahoo.co.in

    nandhini

    December 27, 2013 at 7:25 am

  77. pls send simple step by step genetic algorithm coding for my research project to iswariya.27@gmail.com plsssss help me

    iswariya

    January 3, 2014 at 8:40 am

  78. hi can u please send me code of any genetic programming in java my mail id minnumeghana7@gmail.com
    thank u

    meghana

    January 10, 2014 at 8:22 am

  79. hi can i get genetic algorithm for character recognition – infanta.frolic@gmail.com

    Infanta

    January 22, 2014 at 11:15 am

  80. Hi I need help implementing a GA for my test suite minimisation project. Please can you send me an email to discuss further, thanks 🙂 – davecollings@hotmail.com

    Dave

    March 23, 2014 at 5:07 pm

  81. Hello, Can u please send me complete code of this example @ as.pandey45@gmail.com

    Ashok

    September 3, 2014 at 10:05 am

  82. HOW I CAN DO CLUSTERING USING CELLULAR GENETIC ALGORITHM

    ashraf

    September 30, 2014 at 1:29 am

  83. Hi marcel, please can you send me the code for candidate.java class ?..And please can i get also get the matlab code for this program ?.here is my email: newtonodunsi@gmail.com

    Newton

    October 15, 2014 at 7:37 pm

  84. Marcel, please can i get java/matlab sourcecodes on Real Coded Genetic Algorithm

    Newod

    October 15, 2014 at 7:39 pm

  85. Can you asist me with an example of java source code using genetic algorithm to solve the TSP problem thank u my email mudzingwapr@gmail.com

    mdzingwap

    February 7, 2015 at 1:36 pm

  86. Hii Marcel , can u plzz mail me the code ofr above example on nickytahasseja@gmail.com.
    Thanx in advance.

    nickyta hasseja

    March 6, 2015 at 10:08 am

  87. Me too. Especially codes to generate a school timetable hcrkerry2020@yahoo.fr

    Rob

    March 10, 2015 at 7:50 am

  88. plz send me code for TSP.my mail id:psrinivas209@gmail.com

    srinivas

    March 13, 2015 at 8:52 am

  89. anyne having GA code for TSP in java..plzzzzzzzzzzzzzzzzzz send me at- noopurparashar100@gmail.com

    nupur

    June 3, 2015 at 7:41 pm

  90. hi Marcel, can u plz send me code for TSP. my mail id: puneets1544@gmail.com
    thanks 🙂

    Puneet Sharma

    August 25, 2015 at 8:06 pm

  91. hey I need the source code please

    Abubakar Aliyu

    December 20, 2015 at 10:47 pm

  92. hi, i’m doing a maintenance scheduling system, pls help me with codes my mail id is fshalu5@gmail.com

    shalu

    January 5, 2016 at 4:15 pm

  93. please send time table generation project to my mail id, hosseini_masoome@yahoo.com plz send me ,its important for me,thanks a lot

    hosseini

    January 18, 2016 at 5:22 pm

  94. Hi, i am working with flexible job shop scheduling problem. can anyone help me with source code in java. my mail id is: dineshmathavan92@gmail.com

    Dinesh

    April 1, 2016 at 8:04 am

  95. Hi, can anyone send me code for tournament selection with eplacement. my mail id: dineshmathavan92@gmail.com

    Dinesh

    April 1, 2016 at 8:06 am

  96. Still want the TSP Java solution and the tournament code too, Marcel. New email address now: Mike.reddy@southwales.ac.uk

    DoctorMikeReddy

    April 1, 2016 at 9:01 am

  97. Hi,i am working on pca-ga algorithm for agriculture crop pattern .can anyone help me with source code in java.it’s urgent. my mail-id is :shahsneh251@gmail.com

    snehshah

    April 13, 2016 at 11:17 am

  98. anyone send me the source code: 🙂 email: ncis1989@hotmail.com

    daniel

    May 12, 2016 at 9:16 pm

  99. hi I have to implement genetic algorithm in time table scheduling example please help me .send me code to
    bvrssss@gmail.com

    bvrssss

    December 10, 2016 at 8:32 pm

  100. Could u plz send me the candidate class…… felixjr.lazarte@gmail.com

    felix jr lazarte

    January 22, 2017 at 8:59 am

  101. Can I know the code for compare 2 dna sequence (ATCG) to know the population. I need to compare the sequence one by one..

    baby

    March 25, 2017 at 4:12 am

  102. hey all i need some help in this same code am doing first time my academic project and am not good in java so please anyone help me in this same code i need output of this code in less then input rows approx 7,8,rows which fitness function i use and how please suggest me i need help in genetic algorithm.

    lokeshmenariya

    March 29, 2017 at 11:36 pm

  103. i don’t know how to reduce no of out rows in this code so please anyone suggest me and help me my college project.

    lokeshmenariya

    March 29, 2017 at 11:38 pm

  104. Hi Marcel have to implement genetic algorithm in time table scheduling please help me .send me code to jemimahnathaniel@gmail.com.
    Thanks in advance

    jemimah

    April 10, 2017 at 12:09 am

  105. Hey, thanks for the post! It’s very useful!

    andrian

    June 2, 2017 at 5:59 pm

  106. Hello Sir,
    Thanks for the Code!!
    Could you please send me or post the java code for solving Simple Mathematical Equality problem.
    Ex: for solving the “a+2b+3c+4d = 30”

    Mahesh

    January 5, 2018 at 6:02 am

    • Hello sir ,
      did you get the code for solving simple mathematical Equality problem ?
      if you get the code could you please send me the code.
      thanks before

      Rian

      July 19, 2018 at 8:52 am

  107. Hello

    Tired of Waiting FOREVER to earn a profit online?

    NEW Web-App Allows You To Legally Hijack Traffic And Authority From Wikipedia AND YouTube To Earn Affiliate Commissions In 24 Hours Or Less – in ANY Niche!

    No Previous Skills Or Experience Required. You can literally be a COMPLETE Newbie and Get RESULTS with just 5 minutes of actual “work”..

    IF YOU ARE INTERESTED, CONTACT US HERE==> sayedasaliha748@gmail.com

    Regards,

    TrafficJacker

    Lanora Somerville

    June 28, 2019 at 10:54 pm

  108. I need a Genetic Algorithms A Raw code in Java

    Suleiman Attahiru

    September 10, 2023 at 7:35 pm


Leave a reply to xolisa91 Cancel reply