Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6140261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:05:42+00:00 2026-05-23T18:05:42+00:00

I have a GA with a fitness function that can evaluate to negative or

  • 0

I have a GA with a fitness function that can evaluate to negative or positive values. For the sake of this question let’s assume the function

u = 5 - (x^2 + y^2)

where

x in [-5.12 .. 5.12]
y in [-5.12 .. 5.12]

Example fitness function

Now in the selection phase of GA I am using simple roulette wheel. Since to be able to use simple roulette wheel my fitness function must be positive for concrete cases in a population, I started looking for scaling solutions. The most natural seems to be linear fitness scaling. It should be pretty straightforward, for example look at this implementation. However, I am getting negative values even after linear scaling.

For example for the above mentioned function and these fitness values:

-9.734897  -7.479017 -22.834280  -9.868979 -13.180669   4.898595

after linear scaling I am getting these values

-9.6766040 -11.1755111  -0.9727897  -9.5875139  -7.3870793 -19.3997490

Instead, I would like to scale them to positive values, so I can do roulette wheel selection in the next phase.

I must be doing something fundamentally wrong here. How should I approach this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T18:05:43+00:00Added an answer on May 23, 2026 at 6:05 pm

    Your smallest possible value for u = 5 – (2*5.12^2). Why not just add this to your u?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a fitness function that is scoring the values on an int array
i have taken over a database that stores fitness information and we were having
Have you guys had any experiences (positive or negative) by placing your source code/solution
Based on this original idea, that many of you have probably seen before: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/
I have a function which looks like that: def roulette(self): sum = 0 lst
I'm trying to teach myself some Prolog so that I can determine its fitness
I have a fitness function as part of a lab and wish to apply
Have you managed to get Aptana Studio debugging to work? I tried following this,
I have a JFrame which has 3 JPanels in GridBagLayout .. Now, when I
I have a header file like this: /* * APP 180-2 ALG-254/258/772 implementation *

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.