New test() function to call in order to get fitness value for each
chromosome