Question
Asked 25th Jul, 2016

Genetic algorithm and fitness function ?

I am working on a simple evolution simulator which involves evolution of virtual robots  (small virus like creatures). so i want to define fitness function for them, surviving one which has greater number of some features (receptors in this case) how can i define that kind of fitness function?
here's one example of the fitness function...
thanks!  

Most recent answer

Erik Cuevas
University of Guadalajara
The objective function represents the most important part of an optimization problema, since they evaluates the quality of each solution.
1 Recommendation

Popular answers (1)

Jorge G Pires
Center of Excellence for Research DEWS (University of L'Aquila, DISIM, Italy)
Dear David Goder, 
I have never worked with 'virtual robots,' but let's see if I can help you somehow. 
In the function you added, by the way in Java I believe, you are saying that feature 1 is quite important, as so it has a square gain, feature 2 is bad, since you penalize the fitness function proportional to feature 1, it may happen if the two features are competitive, e.g. being heavy and being able to fly. The third feature is added in a linear mode. 
So "surviving one which has greater number of some features", you need to add what is good and subtract what is bad, that is the simplest way, straightforward. You can use some functions like you did with the square to demonstrate the importance of the feature, you can show interference as you did by tying them up, some features together may be expensive, not functional, no positive feedback.
Feel free to go on with the discussion,
Best regards,
4 Recommendations

All Answers (4)

Jorge G Pires
Center of Excellence for Research DEWS (University of L'Aquila, DISIM, Italy)
Dear David Goder, 
I have never worked with 'virtual robots,' but let's see if I can help you somehow. 
In the function you added, by the way in Java I believe, you are saying that feature 1 is quite important, as so it has a square gain, feature 2 is bad, since you penalize the fitness function proportional to feature 1, it may happen if the two features are competitive, e.g. being heavy and being able to fly. The third feature is added in a linear mode. 
So "surviving one which has greater number of some features", you need to add what is good and subtract what is bad, that is the simplest way, straightforward. You can use some functions like you did with the square to demonstrate the importance of the feature, you can show interference as you did by tying them up, some features together may be expensive, not functional, no positive feedback.
Feel free to go on with the discussion,
Best regards,
4 Recommendations
David Goder
Ivane Javakhishvili Tbilisi State University
thank you very much, you made my work much easier!
Jorge G Pires
Center of Excellence for Research DEWS (University of L'Aquila, DISIM, Italy)
Dear David Goder,
By the way, maybe you must apply constraints, maybe it is not interesting if an "individual" gather too much of a trait; it may happen. Unfortunately those fitness function are ad hoc approaches, you have to try several options. Maybe you could for instance penalize if many individuals choose the same traits, in order to ensure diversity. But it all depends on what you intend to do.
Glad to help,
Best,
1 Recommendation
Erik Cuevas
University of Guadalajara
The objective function represents the most important part of an optimization problema, since they evaluates the quality of each solution.
1 Recommendation

Similar questions and discussions

Related Publications

Article
Thesis (M. Phil.)--University of Hong Kong, 2002. Includes bibliographical references (leaves 138-147).
Article
Full-text available
A computational approach for the design of self-organizing systems is proposed that employs a genetic algorithm to efficiently explore the vast space of possible configurations of a given system description. To generate the description of the system, a two-field based model is proposed in which agents are assigned parameterized responses to two “fi...
Got a technical question?
Get high-quality answers from experts.