Cephalopods such as octopus and squid evolutionarily diverged from mollusks like slugs and snails. These animals have elaborate compact nervous systems located within specialized arm appendages, which can perform a surprisingly diverse group of behaviors.