Computer Science- Netlogo Primitives 2 Flashcards

(15 cards)

1
Q

[attribute] of agent

A

a reporter that reports current value of agent’s attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

one-of agentset

A

returns a random agent of agentset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

towards agent

A

returns heading from calling agent to input agent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

let var value

A

creates a local variable var and assigns it a value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

any? agentset

A

reports whether agentset has more than 0 members

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

carefully

A
  • error handling
  • carefully
    [do this cmd block]
    [but if the first cmd block crashed, do this cmd block]
  • BE CAREFUL USING THIS, USES A LOT OF SPACE
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

min-one-of agentset [reporter]

A

returns the agent in agentset with min value for var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

max-one-of agentset [reporter]

A

returns the agent in agentset with max value for var

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

turtles-here

A

reports agentset of turtles on caller’s patch

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

agentset in-radius R

A

reports agentset that includes agents from original whose distance from caller is less than or equal to R

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

agentset in-cone distance angle

A
  • reporter that gives turtle a cone of vision in front of itself
  • viewing angle ranges from 0 to 360
  • reports an agentset that includes only those agents from the original agentset that fall in the cone. (can include the agent itself)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

import-pcolors “filename.jpg, png, gif, bmp “

A
  • reads an image file, scales it to the same dimensions as the patch grid while keeping the original ratio of the image
  • transfers the resulting pixel colors to the patches
  • file must be in same location as picture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

resize-world min-pxcor max-pxcor min-pycor max-pycor

A

resets the world with new coordinates

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

set-patch-size

A

sets size of patches of the view in pixels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

mean

A

reports mean of the numeric items in the given list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly