def parse_target_string(): """ Takes a list of terminal nodes and iteratively reduces that list until the solution has been found. :return: The complete parsed solution in the form of a GE individual. """ # Sort snippets keys to generate the initial solution list of terminals. solution = sorted([[get_num_from_str(snippet), get_NT_from_str(snippet), snippet] for snippet in trackers.snippets.keys()]) # Perform reduction on the solution list. reduce(solution) # Check snippets for solution ind = check_snippets_for_solution() return ind