Inspiration

Inspired by our love for puzzles and the Akaki's picnic packing puzzle series. Our project aims to take in parameters such as difficulty and size of a puzzle, and generate a unique picnic basket packing puzzle in response. To get an idea of what these puzzles look like, check out these videos of a couple that our team members designed.

What it does

It is a web application that procedurally generates linear packing puzzles and automatically produces an stl for convenient 3D printing! Current features include:

  • generating and visualizing all possible heptacubes (a contiguous shape formed by 7 1x1x1 cuboids), of - which there are 10941 (our algorithm can be used to find higher orders of polyominos too, allowing us to expand on our project easily)
  • reducing this set of heptacubes (and lower order polycubes) to the subset which are able to be linearly removed from our picnic basket packing puzzle, of which there are 211
  • visualizing these pieces using matplotlib's voxelplot
  • web app interface for selecting a difficulty and size of puzzle, and utilization of the NumPy-STL library to convert puzzles in the form of NumPy arrays to STLs for 3D printing
  • optional support for OpenSCAD and the puzzlecad library

Features with heavy development but not fully completed include:

  • assembly of polyominos into a 3x3x3 cube
  • recursive disassembly of linear packing puzzles to determine the minimum sequence of moves needed to solve a puzzle (currently, our program can find a path to disassemble a puzzle completely, but cannot find the shortest path)
  • although not implemented currently, we spent a large amount of time exploring an approach to modeling packing puzzles that allowed for pieces to rotate as well as move linearly, and came up with a method to break complex 3D rotations down into a series of cases to check

Picnic Basket Puzzle Pieces

How we built it

The bulk of our project was built using Python.

The puzzle generating algorithm is written in Python and uses NumPy. It can also utilize OpenSCAD.

The website's backend is built on the Flask framework and uses the libraries NumPy, NumPy-STL, and Matplotlib. Additionally, the frontend is written in HTML, CSS, and Javascript, and uses Bootstrap and jQuery.

Challenges we ran into

  • Using the NumPy library
  • Learning how to create STL files on the web
  • The overall complexity of puzzle generation

Accomplishments that we're proud of

  • Finishing many aspects of the project
  • Generating new puzzles
  • Creating the website

What we learned

  • More about puzzles!
  • The mathematics and theory behind polycubes and puzzle development.

What's next for Procedural Picnic Puzzle Production

Features that we would love to implement into the future:

  • scalability of puzzles to other packing puzzles shapes (not just these picnic basket puzzles)
  • ability to select tolerances for 3D printed parts
  • producing a solution guide along with the stl, and possibly a hints document showing the solver certain positions throughout the puzzle
  • exploring further the mathematics of polycubes and packing puzzles
Share this project:

Updates

Submission history