Planarians, the first kind of animal to have evolved a brain structure yet has not evolved vision, were demonstrated to have a capability of spatial learning in the last several decades, 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 techniques 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’ve crawled, which is a kind of spatial learning. This finding not only provides 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.