Octopuses are carnivores that feed on crabs, clams, squid and fish by catching their prey and then returning to their dens to consume it. A variety of methods are used to extract the edible portion of their prey from a shell, such as pulling it apart with their appendages, using the beaks at the center of their arms to crush it or drilling into the shell and injecting a paralyzing venom into a still-living meal. After an octopus consumes its prey, it will leave the skeletal remains, called "middens," outside its den.
An octopus uses a variety of methods to acquire food, such as chasing and stalking, or in an ambush strategy, emerging suddenly out of a camouflaged location and attacking its prey. Their hunting methods are based on a keen visual sense that also enables them to use their four pairs of arms in well-coordinated movements.
Octopuses are believed to be the most intelligent form of invertebrate life, but the exact extent of their observational learning capabilities is a much-debated topic among biologists. Experiments involving mazes and problem-solving have shown that they possess both long-term and short-term memories. Some laboratory tests have demonstrated that octopuses can be easily trained to differentiate between a variety of patterns and shapes. People who have kept an octopus as a pet have sometimes been surprised to discover that its problem-solving abilities enabled it to escape from its tank and climb into another one to seek food.