calculate relative fitness