I have this problem: I have a turtle dealing with an agentset of agents who all have a link with the specific turtle. At the end I want the turtle to remove all its links with the agents in the agentset but I do not find a way. Can someone help me? I report here the code that does not work. In particular the problematic line is "ask my-links [other-end = traitors] [die]"
to cooperate-with-friend
set traitors friends with [cheater? = True]
set loyals friends with [cheater? = False]
ask traitors [set wealth wealth + 3]
ask loyals [set wealth wealth + 2]
set wealth wealth + count traitors * -3 + count loyals * 2
ask my-links [other-end = traitors] [die]
end
NB: friends is an agentset grouping all turtles having a link to the turtle executing the command.