Created function to rank the generations performance on each test case