Elephants form matriarchal tribal societies and exhibit complex behavior. Indian domestic elephants learn over 500 commands, and form voluntary mutual benefit relationships with their trainers, exchanging labor for baths. And they do have long memories. Apes are our 10 million year cousins. Chimps and gorillas can learn to use tools and to communicate in human sign languages at a retarded level.
Chimps have one third, and gorillas one half, human brainsize.
Animals exhibiting near-human behavior have hundred billion neuron nervous systems. Imaging vision alone requires a billion. The smartest insects have a million brain cells, while slugs and worms make do with a thousand, and sessile animals with a hundred. The portions of nervous systems for which tentative wiring diagrams have been obtained, including nearly all of the large neuroned sea slug, Aplysia, the flight controller of the locust and the early stages of vertebrate vision, reveal neurons configured into efficient, clever, assemblies. Nevertheless the evolutionary pressures that shaped life are already palpable in the robotics labs.