A genetic algorithm considers a set of solutions as a population. It tries to evolve that population - that is, add new solutions to it - by mutation and crossover operations. read more
So, for the genetic algorithm to find the correct solution, it simply has to maximize the fitness score. Now , that is an optimization problem which it can solve, if the fitness function is designed correctly. read more
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. read more
However, I don't really find any sites explaining how to start my own fitness function. All I've got is that it's part of a Genetic Algorithm. read more