Comparing two agent variables
问题 I am currently making a simulation (for homework) using genetic algorithms. What I want to do is compare the fitness of agents on a specific patch and the one with the lowest fitness will die. I have scoured the net and found this code: if any? breed1-here with [fitness > fitness-of myself] [die]] But this doesn't seem to work and now I'm completely out of ideas. 回答1: let goner min-one-of breed1-here [fitness] if is-turtle? goner [ ask goner [ die ] ]` the is-turtle? check is necessary