## ECJ-INTEREST-L@LISTSERV.GMU.EDU

#### View:

 Message: [ First | Previous | Next | Last ] By Topic: [ First | Previous | Next | Last ] By Author: [ First | Previous | Next | Last ] Font: Proportional Font

Subject:

Re: How to select individual with minor fitness

From:

Date:

Mon, 15 Jul 2013 15:12:28 +0200

Content-Type:

text/plain

Parts/Attachments:

 text/plain (113 lines)
 ```> How can I invert the fitness? I have to do this in my fitness function? Well you can do it in your fitness-function or when you set the fitness. For example: value = minor; MyFitness f = ((MyFitness) ind).fitness; f.setFitness(state, (float) Float.MAX_VALUE - minor); I don't know how your fitness-function looks like. If your function always take the highest one, it should work with my approach. Greetings Bojan ----- Ursprüngliche Mail ----- Von: "André Pinz Borges" <[log in to unmask]> An: [log in to unmask] Gesendet: Montag, 15. Juli 2013 14:49:50 Betreff: Re: How to select individual with minor fitness Thanks Bojan for your answer... How can I invert the fitness? I have to do this in my fitness function? On Mon, Jul 15, 2013 at 9:16 AM, Bojan Janisch < [log in to unmask] > wrote: Hey Andre, why don't you just invert your fitness? fitness best individual of generation 1: 5 fitness best individual of generation 2: 6 fitness best individual of generation 3: 4 fitness best individual of generation 4: 8 to fitness best individual of generation 1: infinite - 5 fitness best individual of generation 2: infinite - 6 fitness best individual of generation 3: infinite - 4 fitness best individual of generation 4: infinite - 8 Now your max should be generation 3 because 4 is the lowest score. minor and major can be easy inverted. Greetings Bojan ----- Ursprüngliche Mail ----- Von: "André Pinz Borges" < [log in to unmask] > An: [log in to unmask] Gesendet: Montag, 15. Juli 2013 14:03:59 Betreff: Re: How to select individual with minor fitness Normally the algorithm selects the individual with major value of fitness, for the example above will be selected the individual of generation 4: fitness best individual of generation 1: 5 fitness best individual of generation 2: 6 fitness best individual of generation 3: 4 fitness best individual of generation 4: 8 but I want to select the individual that has the mijor/less value of fitness (in the case of example, the generation 3). Thanks On Mon, Jul 15, 2013 at 4:03 AM, Sean Luke < [log in to unmask] > wrote: I'm sorry, I don't know what you mean by "minor" and "major" fitnesses. Sean On Jul 14, 2013, at 10:27 PM, André Pinz Borges wrote: > Hello, > > I implemented tutorial 3, but I would like to select the individual with minor value of fitness and the tutorial selects the individual with major fitness. > > How can I do this?? I look at source code, but I don't find how.. > > Thanks! ```