Octopuses are highly intelligent and probably more intelligent than any other invertebrates. The exact extent of their intelligence and learning capability is much debated among biologists but maze and problem-solving experiments have shown that they do have both short- and long-term memory. Observe this octopi octopus sneak its way out of a 1 inch hole. Pretty amazing if you ask me.
Link: Google Video

