Flatworms seem to have a very curious ability.
Experiments have been done with teaching flatworms to find their way through a simple maze. The maze was constructed with light and dark coloured passages, with the light passages leading to the exit. A flatworm was taught to get through the maze by applying a small current to the flatworm whenever he chose a wrong, i.e. a dark coloured passage. After some runs, the flatworm started to get through the maze correctly.

Now comes the strange part. I don't know what led the researchers to try this, but the results are very curious indeed.

If a 'trained' flatworm was killed and its flesh was fed to a 'non-trained' one, the cannibal flatworm also ran the maze correctly.