3

I am not being able to understand how the author has calculated the fitness function and also how he is calculating 8 6 6 5 respectively:

Book name: Stuart J. Russell and Peter Norvig - Artificial Intelligence A Modern Approach

enter image description here

Please help as i have spent great time. At first i thought it is calculating number of ones's but it's not. So any one who can explain me?

user3508182
  • 457
  • 1
  • 4
  • 13
  • You give us 13 minutes to answer your question, which is not complete. As the fitness function is not give, I guess it's just not given and the process should be illustrated. The example is not meant to be complete. That's called pedagogical reduction. – usr1234567 May 08 '14 at 06:08
  • you are right in the book it is written in the same way. i am also confuse. Ok i also place other pages. – user3508182 May 08 '14 at 06:14
  • I'm voting to close this question as off-topic because it doesn't belong to SO but to one of the scientific sites instead https://stackexchange.com/sites#science – jopasserat May 01 '18 at 09:28

1 Answers1

4

The fitness function in a Genetic Algorithm is problem dependent. You should assign the fitness value to a specific member of the current population depending on how its ''genes'' accomplish to complete the given problem. Better the solution higher the fitness score. This is required in order to evolve the population via the creation of a new generation.
In the third edition of the book the example regards the the 8-queen problem, in that case the function is computed, based on the number of nonattacking pairs of queens. In your case we don't know what the problem is. However, given the quality of the book, I suppose that, if the figure is not just for exposition purposes, the problem was previously described, as so also the evaluation function.

5agado
  • 2,444
  • 2
  • 21
  • 30
  • ok i place all information may be i failed to understand the whole concept provided by this book. – user3508182 May 08 '14 at 16:57
  • First of all better if you remove the link, I think this is copyrighted material. However at page 620 it clearly states that the problem represented is the one of the *restaurant waiting* (described at page 556) and that the fitness is "simply the number of examples that an individual is consistent with". – 5agado May 09 '14 at 12:06