The domestic dog (Canis familiaris or Canis lupus familiaris) is a domesticated form of wolf. The dog descended from an ancient, extinct wolf, with the modern grey wolf being the dog's nearest living relative. The dog was the first species to be domesticated by hunter–gatherers over 15,000 years ago, before the development of agriculture. Their long association with humans has led dogs to be uniquely attuned to human behavior, enabling an abundant cosmopolitan distribution and the ability to thrive on a starch-rich diet that would be inadequate for other canids. The dog has been selectively bred over millennia for various behaviors, sensory capabilities and physical attributes. Dogs are subclassified into breeds, which vary widely in shape, size and color. They perform many roles for humans, such as hunting, herding, pulling loads, protection, assisting police and the military, companionship, therapy, and aiding disabled people. This influence on human society has given them the sobriquet of "man's best friend."