Discover Artificial Intelligence (Feb 2024)

Generative approaches for solving tangram puzzles

  • Fernanda Miyuki Yamada,
  • Harlen Costa Batagelo,
  • João Paulo Gois,
  • Hiroki Takahashi

DOI
https://doi.org/10.1007/s44163-024-00107-6
Journal volume & issue
Vol. 4, no. 1
pp. 1 – 20

Abstract

Read online

Abstract The Tangram is a dissection puzzle composed of seven polygonal pieces that can form different patterns. Solving the Tangram is an irregular shape packing problem known to be NP-hard. This paper investigates the application of four deep-learning architectures—Convolutional Autoencoder, Variational Autoencoder, U-Net, and Generative Adversarial Network—specifically designed for solving Tangram puzzles. We explore the potential of these architectures in learning the complex spatial relationships inherent in Tangram configurations. Our experiments show that the Generative Adversarial Network competes well with other architectures and converges considerably faster. We further prove that traditional evaluation metrics based on pixel accuracy often fail in assessing the visual quality of the generated Tangram solutions. We introduce a loss function based on a Weighted Mean Absolute Error that prioritizes pixels representing inter-piece sections over those covered by individual pieces. Extending this loss function, we propose a novel evaluation metric as a more fitting measure for assessing Tangram solutions compared to traditional metrics. This investigation advances our understanding of the capabilities of artificial intelligence in complex geometrical problem domains.

Keywords