임의로 움직이는 특정 장애물을 피하면서 간단한 시뮬레이션 시뮬레이션을 만들려고합니다. 나는 그들이 그곳에 갔던 장소의 좌표를 저장하기를 원하기 때문에 다시는 가지 않습니다. 이것은 내가 지금까지 가지고있는 것의 일부입니다 :NetLogo의 목록에 에이전트 좌표 저장
to move-agent
let move random 3
if (move = 0) []
if (move = 1)[ left-turn ]
if (move = 2)[ right-turn ]
set xint int xcor ;;here i'm storing the coordinates as integers
set yint int ycor
set xylist (xint) (yint)
go-forward
end
to xy_list
set xy_list []
set xy_list fput 0 xy_list ;;populating new list with 0
end
그러나 "SET expected 2 inputs"오류가 계속 발생합니다. 아무도 이것으로 나를 도울 수 있습니까?