Planarians, the first kind of animal to have evolved a brain structure1 yet has not evolved visual sense, was demonstrated to have a capability of spatial learning in the last several decades2, but what does the navigation of planarians depends on is still unknown. Here, we provide an objective, strictly variable-controlled planarian training method using 3D printing techniques3 fabricated mazes. Then we use modifications of the mazes to first demonstrate a learning paradigm that worms can memorize the location of a darkened surrounding through training. However, a memory formation failure was found that in the situation of providing identical shapes in a maze, planarians cannot memorize the location of the darkened surrounding. Thus, this result shows the planarians associated darkness with the crude shape of the objects they have crawled on, which is a kind of spatial learning. This finding provides not only a key insight into spatial learning information that planarians are processing but also an interpretation of the origin of memory formation where higher grades of memory formation might originate from.