Breeds

A breed is a programmer-defined subtype of the turtle type.

For example, here's how we define new breeds:

breed [cats cat]
breed [dogs dog]

Breeds can have their own attributes in addition to the inherited turtle attributes:

dogs-own [bark bite]
cats-own [meow scratrch]

NetLogo automatically defines breed-specific variants of most of the built-in procedures.

For example, there are breed-specific variants of create, hatch, and sprout:

to init-model
  ca
  create-cats 50
  [
    set color red
  ]
  create-dogs 50
  [
    set color blue
  ]
   ask turtles
  [
    setxy random-xcor random-ycor
  ]
end

There are breed-specific sets:

to update-model
  ask dogs
  [
    let a-cat one-of cats in-radius 5
    if a-cat != nobody
    [
      chase a-cat
    ]
  ]
  ask cats
  [
    rt random 360
    fd 1
  ]
end

See the section on breeds in the Programmer's Manual for more information.