Cephalopods (squid, octopi, and nautilus) are unique among the invertebrates because of their intelligence. For example, octopi can be taught to associate geometric shapes with either punishment (a mild electric shock) or reward (food). This can then be used to train them to avoid one type of food and reach for another. Research has indicated that octopi are also tool users; with their flexible arms and suckers, octopi are able to manipulate their environment, as in building a simple home. After an octopus has selected a home site, it will narrow the entrance size by moving small rocks.
Cephalopods like this octopus are extremely intelligent. In one experiment, an octopus was able to figure out how to unscrew a lid off a glass jar in order to retrieve a piece of food inside.