I have to be able to, with this 'dataset' (its a graph): ...
{
0 : [3,2,1],
1 : [4],
2 : [6,5],
3 : [7],
4 : [8],
5 : [9]
}
... input a initial and a final value with a goal to show the best path possible through Genetic Algorithm ( my problem is to run through the dataset and find the best path ). I Found this fitness function in another project :
fitness = numpy.sum(pop*equation_inputs, axis=1)
return fitness
How can I create an ideal fitness function which 'fit' in my problem?