<p>Experiment.  It depends on the topology of your problem domain. If you knew how to optimize more efficiently you wouldn't be throwing a GA at it.</p>

CC BY-SA 3.0
2012-11-30T07:24:14.570Z
@ Chad Brewbaker I did GA on it and it gave me very great results, many feasible solutions ! with almost optimal solutions.And i use GA because it is required by my supervisor , it's a project.
Mhjr
CC BY-SA 3.0
2012-11-30T20:31:54.207Z
I would try a Meta GA.  Code a second GA that uses time to find an acceptable solution as the fitness metric, and encodes those coefficients on your constraints as it's genome.  You can evolve the coefficients that most quickly evolve a solution for your problem domain.
Chad Brewbaker
CC BY-SA 3.0
2012-12-02T14:00:54.700Z
I would try that after i get out of this hell hole I am in. Thank you !
Mhjr
CC BY-SA 3.0
2012-11-29T22:48:53.633Z
2012-11-29T22:48:53.633Z
Chad Brewbaker
<p>As stated in the question, say i created a random population of 100 timetables. 1 % of these timetables are valid. Then, if I apply the soft constraints evaluation functions on the 1% valid timetables, the population will have few outstanding finesses like below:</p>

<p>population = 5;</p>

<p>finesses = { 0.121,0.115,0.117,<strong>0.855</strong>,0.145} , the one in bold is an outstanding fitness and has the soft constraints evaluation functions applied on it. i have two hard constraints and three soft constraints and i use the weighted average to calculate overall fitness like this: <br><br><strong>(0.05)*h1+(0.05)*h2+(0.3)*s1+(0.3)*s2+(0.3)*s3</strong></p>

<p>the question is:
Is this approach correct ?</p>

<p>someone suggested that i should treat soft and hard constraints the same, but if i do how can one soft constraints evaluate an invalid timetable!?</p>

<ai.artificial-intel><ne.neural-evol><genetic-algorithms>
When to apply soft constraints evaluation functions in genetic algorithms?
Mhjr
# When to apply soft constraints evaluation functions in genetic algorithms?

(Asked by: username_0 on 2012-11-26)

As stated in the question, say i created a random population of 100 timetables. 1 % of these timetables are valid. Then, if I apply the soft constraints evaluation functions on the 1% valid timetables, the population will have few outstanding finesses like below:

population = 5;

finesses = { 0.121,0.115,0.117,**0.855**,0.145} , the one in bold is an outstanding fitness and has the soft constraints evaluation functions applied on it. i have two hard constraints and three soft constraints and i use the weighted average to calculate overall fitness like this:   
  
**(0.05)\*h1+(0.05)\*h2+(0.3)\*s1+(0.3)\*s2+(0.3)\*s3**

the question is:
Is this approach correct ?

someone suggested that i should treat soft and hard constraints the same, but if i do how can one soft constraints evaluate an invalid timetable!?

**Tags:** ai.artificial-intel, ne.neural-evol, genetic-algorithms


---

## 1 answers

### Answer by username_1 on 2012-11-29. Score: 1

Experiment. It depends on the topology of your problem domain. If you knew how to optimize more efficiently you wouldn't be throwing a GA at it.

> **Comments:**
> **username_0**: @ username_1 I did GA on it and it gave me very great results, many feasible solutions ! with almost optimal solutions.And i use GA because it is required by my supervisor , it's a project.  
> **username_1**: I would try a Meta GA.  Code a second GA that uses time to find an acceptable solution as the fitness metric, and encodes those coefficients on your constraints as it's genome.  You can evolve the coefficients that most quickly evolve a solution for your problem domain.  
> **username_0**: I would try that after i get out of this hell hole I am in. Thank you !  

---

