# Puzzle to match up the shapes on inner edges

My daughter (pre-school) had to solve the following puzzle:

It consists of 9 square pieces and the goal is to fit them together in such a way that all inner (i.e. touching) sides show a valid, put-together pattern.

What is this type of puzzle called?

Is there a logical or even programmatical way (that is, not brute forcing it) to solve this type of puzzle?