gpt4 book ai didi

netlogo - 如何在除自身以外的所有海龟之间创建链接?

转载 作者:行者123 更新时间:2023-12-01 12:40:44 25 4
gpt4 key购买 nike

我想在所有绿色海龟之间创建链接。但我不知道如何包含知道链接应与乌龟本身一起创建。

我得到的:

ask turtles with [ green? = true ] [ create-links-with turtles with [ green? = true ]  ]

我得到的错误:

A turtle cannot link to itself. error while household 178 running CREATE-LINKS-WITH called by procedure GREEN called by procedure GO called by Button 'go'

最佳答案

只要求创建与其他海龟的链接:

ask turtles with [ green? ] 
[
create-links-with other turtles with [ green? ]
]

关于netlogo - 如何在除自身以外的所有海龟之间创建链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25057722/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com