netlogo - How do I properly use the 'random' function for multiple agents? -
in model have agents collecting agent bump @ random after move base. move drop off material defined random function. here's sample code
to go ask searchers [ set energy energy - 1 fd 0.0125 if random-float 1 < (1 / 50) [ ifelse random 2 = 0 [ rt 45 ] [ lt 45 ] ] search ] end search if any? depots in-radius vision [color = yellow] [spread set energy 0] ;; makes them base end spread if random 10000 = 1 [hatch-rubbish 1 [ set color white set shape "circle" set size 0.5]] end if set visual radius enormous can see depot number of bits of rubbish works out.
however if allow them move around radius of 1, count of rubbish higher 1 in 10,000.
why make difference?
thanks
Comments
Post a Comment