我在NetLogo中有一个列表,其中包含值和每个值的概率列表.现在我想基于其概率(加权随机抽取)绘制随机值.我想过使用Rnd扩展,但我不知道如何正确地获得权重,请帮助
set values [1 2 3] set probabilities [0.2 0.3 0.5] set state ( rnd:weighted-one-of agentset reporter-task )
netlogo
netlogo ×1