One of the best known abilities of slime moulds is that they show chemotaxis - they move towards or away from different chemicals they sense in their environment. When we make mazes or choice chambers for them, we're exploiting that behaviour to test their ability to navigate towards food or test their preference for difference sources of nutrition. In the picture below a slime is attracted towards oats mixed with paprika (positive chemotaxis) but repelled by black pepper and turmeric (negative chemotaxis).
They can't really see but slime moulds respond to light. Normally they just avoid it - especially blue and ultraviolet light which are damaging to DNA. Experiments have shown that physarum can tell the difference between colours of light and can be trained to respond to them. When it's ready to form spores a slime will switch from avoiding light to being attracted to it.
The key to physarums success at solving a maze is its memory. Wherever it goes, a slime mould lays down a chemical trail. When it's exploring something like a maze this trail tells the organism where it's been before and which areas aren't worth looking at again. It's a lot like foraging ants leaving trails of pheromones for other workers to follow.
Even most biologists haven't heard of this! 'Duro' comes from the same Latin word as 'durable' - Durotaxis is the ability to sense how hard or tough a surface is. Slimes usually like something hard but not too hard - they'll pick a piece of wood over a rock or a loose pile of moss.
Professor Audrey Dussutour’s group started exploring the limits of just what physarum can do. We’ve known for a long time that it’s attracted to some things (oats, sugar, protein) and avoids others (salt, caffeine, high pH) – a behaviour called chemotaxis but she showed that it’s possible to teach a slime to approach something it would normally avoid in return for food – and that it will keep that memory for a year or more.