在 NetLogo 中实现相关的随机游走和征税游走

Implementing correlated random walk and a levy walk in NetLogo

有没有人有任何示例代码或知道如何在 netlogo 中实现相关随机游走或征税游走?

*** 我需要它来对动物运动进行空间显式建模。

globals [alpha minstep]

to setup
  ca
  set alpha 1.5 set minstep 0.2 ;or whatever
  crt 1 [pen-down]
end

to go
  ask turtles [
    set heading random-float 360
    fd minstep * (random-float 1) ^ (-1 / alpha)
  ]
end

编辑:

以下可能是获得相关角的最简单方法。

to-report randomAngleTriangular [
  #maxAngle  ;(number) angle in degrees
  ]
  let _maxAngle abs #maxAngle
  if (_maxAngle > 180) [
    set _maxAngle 180
  ]
  report (2 * randomStandardTriangular - 1) * _maxAngle
end

to-report randomStandardTriangular
  report (random-float 1 + (1 - random-float 1)) / 2
end

对于相关的随机游走,只需按报告的角度(向左或向右)转动 heading