The set of unique 2D shapes generated by 90º rotation and reflection

31 Views Asked by At

In my project to write a reinforcement learning agent to solve the puzzle piece game Kanoodle, I found myself needing to determine how many (and which) unique shape variants can be generated by any one of the 2D puzzle pieces in the set. This way I can define a discrete action space (ways of placing the pieces) without double counting and making the training process unnecessarily long.

A brute force approach might involve applying the rigid motions of a square, normalizing for translations, and then seeing how many shape variants are double counted. However this approach isn't very enlightening and would struggle to generalize to higher dimensions.

The set of variants seems to be determined by how many orthogonal and diagonal symmetries there are, although it's difficult for me to predict which variants exactly are double counted. Below are a few example of shapes and their unique variants.

How are the unique variants of a 2D shape related to its symmetries? Any ideas on how to better frame the problem are appreciated :)

Examples of shape variants and their symmetries