Loading ...
Sorry, an error occurred while loading the content.

Need help with SGA implementation in C++

Expand Messages
  • pradeepis_2000
    Hi All, I have written a program in C++ running under Turbo C++ IDE to implement SGA. I have done it using integer arrays to store the chromosome string. When
    Message 1 of 3 , May 7, 2008
    • 0 Attachment
      Hi All,
      I have written a program in C++ running under Turbo C++ IDE to
      implement SGA. I have done it using integer arrays to store the
      chromosome string. When I execute the program, 8 out of 10 times, the
      output is correct i.e. Avg fitness is more than what it started out
      with. But , 2 times (sometimes),I get -ve avg fitness which I cannot
      understand. Can anyone help me to correct this. If anyone is ready to
      help me, I will send my code.

      thanking you in advance

      Pradeep
    • rajiv gill
      hello pradeepis Tell me what are the application for which you implement SGA . what are the main logic of you problem. After knowing what are you developing
      Message 2 of 3 , May 7, 2008
      • 0 Attachment
        hello pradeepis
        Tell me what are the application for which you implement SGA . what are the main logic of you problem. After knowing what are you developing then i can able to solve your problem.

        pradeepis_2000 <pradeepis_2000@...> wrote:
        Hi All,
        I have written a program in C++ running under Turbo C++ IDE to
        implement SGA. I have done it using integer arrays to store the
        chromosome string. When I execute the program, 8 out of 10 times, the
        output is correct i.e. Avg fitness is more than what it started out
        with. But , 2 times (sometimes),I get -ve avg fitness which I cannot
        understand. Can anyone help me to correct this. If anyone is ready to
        help me, I will send my code.

        thanking you in advance

        Pradeep






        ---------------------------------
        Meet people who discuss and share your passions. Join them now.

        [Non-text portions of this message have been removed]
      • Esmail Bonakdarian
        Hi, No need to post/send code, but more information :-) ... What do you mean you can not understand? Can you tell us more about what happens? Is your avg
        Message 3 of 3 , May 8, 2008
        • 0 Attachment
          Hi,

          No need to post/send code, but more information :-)

          > When I execute the program, 8 out of 10 times, the
          > output is correct i.e. Avg fitness is more than what it
          > started out with. But , 2 times (sometimes), I get -ve avg
          > fitness which I cannot understand.

          What do you mean you can not understand? Can you tell us more
          about what happens? Is your avg fitness less?

          Are you keeping track of your best chromosomes/individuals?
          What happens to them?

          Are you using elitism?

          More information might help get some responses.

          Good luck.

          Esmail
        Your message has been successfully submitted and would be delivered to recipients shortly.