Family Games America’s Quantumino solver - Games

Skip to content
Back to top
View this page
Edit this page

# Family Games America’s Quantumino solver

This module allows to solve the Quantumino puzzle made by Family Games America (see also this video on Youtube). This puzzle was left at the dinner room of the Laboratoire de Combinatoire Informatique Mathématique in Montreal by Franco Saliola during winter 2011.

The solution uses the dancing links code which is in Sage and is based on the more general code available in the module `sage.combinat.tiling`. Dancing links were originally introduced by Donald Knuth in 2000 (arXiv cs/0011047). In particular, Knuth used dancing links to solve tilings of a region by 2D pentaminos. Here we extend the method for 3D pentaminos.

This module defines two classes :

- `sage.games.quantumino.QuantuminoState` class, to represent a state of the Quantumino game, i.e. a solution or a partial solution.

- `sage.games.quantumino.QuantuminoSolver` class, to find, enumerate and count the number of solutions of the Quantumino game where one of the piece is put aside.

AUTHOR:

- Sébastien Labbé, April 28th, 2011

DESCRIPTION (from [1]):

> ” Pentamino games have been taken to a whole different level; a 3-D level, with this colorful creation! Using the original pentamino arrangements of 5 connected squares which date from 1907, players are encouraged to “think inside the box” as they try to fit 16 of the 17 3-D pentamino pieces inside the playing perimeters. Remove a different piece each time you play for an entirely new challenge! Thousands of solutions to be found! Quantumino hands-on educational tool where players learn how shapes can be transformed or arranged into predefined shapes and spaces. Includes: 1 wooden frame, 17 wooden blocks, instruction booklet. Age: 8+ “

EXAMPLES:

Here are the 17 wooden blocks of the Quantumino puzzle numbered from 0 to 16 in the following 3d picture. They will show up in 3D in your default (=Jmol) viewer:

Sage

    sage: from sage.games.quantumino import show_pentaminos
    sage: show_pentaminos()
    Graphics3d Object

Python

    >>> from sage.all import *
    >>> from sage.games.quantumino import show_pentaminos
    >>> show_pentaminos()
    Graphics3d Object

To solve the puzzle where the pentamino numbered 12 is put aside:

Sage

    sage: from sage.games.quantumino import QuantuminoSolver
    sage: s = next(QuantuminoSolver(12).solve())          # long time (10 s)
    sage: s                                               # long time (<1s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (2, 1, 1)], Color: blue
    sage: s.show3d()                                      # long time (<1s)
    Graphics3d Object

[Python]

    >>> from sage.all import *
    >>> from sage.games.quantumino import QuantuminoSolver
    >>> s = next(QuantuminoSolver(Integer(12)).solve())          # long time (10 s)
    >>> s                                               # long time (<1s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (2, 1, 1)], Color: blue
    >>> s.show3d()                                      # long time (<1s)
    Graphics3d Object

To remove the frame:

Sage

    sage: s.show3d().show(frame=False)                    # long time (<1s)

Python

    >>> from sage.all import *
    >>> s.show3d().show(frame=False)                    # long time (<1s)

To solve the puzzle where the pentamino numbered 7 is put aside:

Sage

    sage: s = next(QuantuminoSolver(7).solve())           # long time (10 s)
    sage: s                                               # long time (<1s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    sage: s.show3d()                                      # long time (<1s)
    Graphics3d Object

[Python]

    >>> from sage.all import *
    >>> s = next(QuantuminoSolver(Integer(7)).solve())           # long time (10 s)
    >>> s                                               # long time (<1s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    >>> s.show3d()                                      # long time (<1s)
    Graphics3d Object

The solution is iterable. This may be used to explicitly list the positions of each pentamino:

Sage

    sage: for p in s: p                                   # long time (<1s)
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...

Python

    >>> from sage.all import *
    >>> for p in s: p                                   # long time (<1s)
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...
    Polyomino: [(...), (...), (...), (...), (...)], Color: ...

To get all the solutions, use the iterator returned by the `solve` method. Note that finding the first solution is the most time consuming because it needs to create the complete data to describe the problem:

Sage

    sage: it = QuantuminoSolver(7).solve()
    sage: next(it)                                     # not tested (10s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    sage: next(it)                                     # not tested (0.001s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    sage: next(it)                                     # not tested (0.001s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange

[Python]

    >>> from sage.all import *
    >>> it = QuantuminoSolver(Integer(7)).solve()
    >>> next(it)                                     # not tested (10s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    >>> next(it)                                     # not tested (0.001s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
    >>> next(it)                                     # not tested (0.001s)
    Quantumino state where the following pentamino is put aside :
    Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange

To get the solution inside other boxes:

Sage

    sage: s = next(QuantuminoSolver(7, box=(4,4,5)).solve())        # not tested (2s)
    sage: s.show3d()                                                # not tested (<1s)

Python

    >>> from sage.all import *
    >>> s = next(QuantuminoSolver(Integer(7), box=(Integer(4),Integer(4),Integer(5))).solve())        # not tested (2s)
    >>> s.show3d()                                                # not tested (<1s)

Sage

    sage: s = next(QuantuminoSolver(7, box=(2,2,20)).solve())       # not tested (1s)
    sage: s.show3d()                                                # not tested (<1s)

[Python]

    >>> from sage.all import *
    >>> s = next(QuantuminoSolver(Integer(7), box=(Integer(2),Integer(2),Integer(20))).solve())       # not tested (1s)
    >>> s.show3d()                                                # not tested (<1s)

If there are no solution, a StopIteration error is raised:

Sage

    sage: next(QuantuminoSolver(7, box=(3,3,3)).solve())
    Traceback (most recent call last):
    ...
    StopIteration

Python

    >>> from sage.all import *
    >>> next(QuantuminoSolver(Integer(7), box=(Integer(3),Integer(3),Integer(3))).solve())
    Traceback (most recent call last):
    ...
    StopIteration

The implementation allows a lot of introspection. From the `TilingSolver` object, it is possible to retrieve the rows that are passed to the DLX solver and count them. It is also possible to get an instance of the DLX solver to play with it:

Sage

    sage: q = QuantuminoSolver(0)
    sage: T = q.tiling_solver()
    sage: T
    Tiling solver of 16 pieces into a box of size 80
    Rotation allowed: True
    Reflection allowed: False
    Reusing pieces allowed: False
    sage: rows = T.rows()                            # not tested (10 s)
    sage: len(rows)                                  # not tested (but fast)
    5484
    sage: x = T.dlx_solver()                         # long time (10 s)
    sage: x                                          # long time (fast)
    Dancing links solver for 96 columns and 5484 rows

[Python]

    >>> from sage.all import *
    >>> q = QuantuminoSolver(Integer(0))
    >>> T = q.tiling_solver()
    >>> T
    Tiling solver of 16 pieces into a box of size 80
    Rotation allowed: True
    Reflection allowed: False
    Reusing pieces allowed: False
    >>> rows = T.rows()                            # not tested (10 s)
    >>> len(rows)                                  # not tested (but fast)
    5484
    >>> x = T.dlx_solver()                         # long time (10 s)
    >>> x                                          # long time (fast)
    Dancing links solver for 96 columns and 5484 rows

REFERENCES:

- [1] Family Games America’s Quantumino

- [2] Quantumino - How to Play on Youtube

- [3] Knuth, Donald (2000). Dancing links. arXiv cs/0011047.

class sage.games.quantumino.QuantuminoSolver(aside, box=(5, 8, 2))

  Bases: `SageObject`

  Return the Quantumino solver for the given box where one of the pentamino is put aside.

  INPUT:

  - `aside` – integer, from 0 to 16, the aside pentamino

  - `box` – tuple of size three (default: `(5,8,2)`), size of the box

  EXAMPLES:

  Sage

      sage: from sage.games.quantumino import QuantuminoSolver
      sage: QuantuminoSolver(9)
      Quantumino solver for the box (5, 8, 2)
      Aside pentamino number: 9
      sage: QuantuminoSolver(12, box=(5,4,4))
      Quantumino solver for the box (5, 4, 4)
      Aside pentamino number: 12

  Python

      >>> from sage.all import *
      >>> from sage.games.quantumino import QuantuminoSolver
      >>> QuantuminoSolver(Integer(9))
      Quantumino solver for the box (5, 8, 2)
      Aside pentamino number: 9
      >>> QuantuminoSolver(Integer(12), box=(Integer(5),Integer(4),Integer(4)))
      Quantumino solver for the box (5, 4, 4)
      Aside pentamino number: 12

  number_of_solutions()

    Return the number of solutions.

    OUTPUT: integer

    EXAMPLES:

    Sage

        sage: from sage.games.quantumino import QuantuminoSolver
        sage: QuantuminoSolver(4, box=(3,2,2)).number_of_solutions()
        0

    Python

        >>> from sage.all import *
        >>> from sage.games.quantumino import QuantuminoSolver
        >>> QuantuminoSolver(Integer(4), box=(Integer(3),Integer(2),Integer(2))).number_of_solutions()
        0

    This computation takes several days:

    Sage

        sage: QuantuminoSolver(0).number_of_solutions()                # not tested
        ??? hundreds of millions ???

    [Python]

        >>> from sage.all import *
        >>> QuantuminoSolver(Integer(0)).number_of_solutions()                # not tested
        ??? hundreds of millions ???

  solve(partial=None)

    Return an iterator over the solutions where one of the pentamino is put aside.

    INPUT:

    - `partial` – string (default: `None`), whether to include partial (incomplete) solutions. It can be one of the following:

      - `None` – include only complete solution

      - `'common'` – common part between two consecutive solutions

      - `'incremental'` – one piece change at a time

    OUTPUT: iterator of `QuantuminoState`

    EXAMPLES:

    Get one solution:

    Sage

        sage: from sage.games.quantumino import QuantuminoSolver
        sage: s = next(QuantuminoSolver(8).solve())          # long time (9s)
        sage: s                                              # long time (fast)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0), (1, 1, 0)], Color: yellow
        sage: s.show3d()                                     # long time (< 1s)
        Graphics3d Object

    Python

        >>> from sage.all import *
        >>> from sage.games.quantumino import QuantuminoSolver
        >>> s = next(QuantuminoSolver(Integer(8)).solve())          # long time (9s)
        >>> s                                              # long time (fast)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 0, 1), (0, 1, 0), (1, 0, 0), (1, 1, 0)], Color: yellow
        >>> s.show3d()                                     # long time (< 1s)
        Graphics3d Object

    The explicit solution:

    Sage

        sage: for p in s: p                                  # long time (fast)
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...

    [Python]

        >>> from sage.all import *
        >>> for p in s: p                                  # long time (fast)
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...
        Polyomino: [(...), (...), (...), (...), (...)], Color: ...

    Enumerate the solutions:

    Sage

        sage: it = QuantuminoSolver(0).solve()
        sage: next(it)                                          # not tested
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink
        sage: next(it)                                          # not tested
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink

    Python

        >>> from sage.all import *
        >>> it = QuantuminoSolver(Integer(0)).solve()
        >>> next(it)                                          # not tested
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink
        >>> next(it)                                          # not tested
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink

    With the partial solutions included, one can see the evolution between consecutive solutions (an animation would be better):

    Sage

        sage: it = QuantuminoSolver(0).solve(partial='common')
        sage: next(it).show3d()               # not tested (2s)
        sage: next(it).show3d()               # not tested (< 1s)
        sage: next(it).show3d()               # not tested (< 1s)

    [Python]

        >>> from sage.all import *
        >>> it = QuantuminoSolver(Integer(0)).solve(partial='common')
        >>> next(it).show3d()               # not tested (2s)
        >>> next(it).show3d()               # not tested (< 1s)
        >>> next(it).show3d()               # not tested (< 1s)

    Generalizations of the game inside different boxes:

    Sage

        sage: next(QuantuminoSolver(7, (4,4,5)).solve())       # long time (2s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
        sage: next(QuantuminoSolver(7, (2,2,20)).solve())      # long time (1s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
        sage: next(QuantuminoSolver(3, (2,2,20)).solve())      # long time (1s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 0, 0), (1, 0, 1)], Color: green

    Python

        >>> from sage.all import *
        >>> next(QuantuminoSolver(Integer(7), (Integer(4),Integer(4),Integer(5))).solve())       # long time (2s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
        >>> next(QuantuminoSolver(Integer(7), (Integer(2),Integer(2),Integer(20))).solve())      # long time (1s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (0, 2, 1), (1, 0, 0)], Color: orange
        >>> next(QuantuminoSolver(Integer(3), (Integer(2),Integer(2),Integer(20))).solve())      # long time (1s)
        Quantumino state where the following pentamino is put aside :
        Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 0, 0), (1, 0, 1)], Color: green

    If the volume of the box is not 80, there is no solution:

    Sage

        sage: next(QuantuminoSolver(7, box=(3,3,9)).solve())
        Traceback (most recent call last):
        ...
        StopIteration

    [Python]

        >>> from sage.all import *
        >>> next(QuantuminoSolver(Integer(7), box=(Integer(3),Integer(3),Integer(9))).solve())
        Traceback (most recent call last):
        ...
        StopIteration

    If the box is too small, there is no solution:

    Sage

        sage: next(QuantuminoSolver(4, box=(40,2,1)).solve())
        Traceback (most recent call last):
        ...
        StopIteration

    Python

        >>> from sage.all import *
        >>> next(QuantuminoSolver(Integer(4), box=(Integer(40),Integer(2),Integer(1))).solve())
        Traceback (most recent call last):
        ...
        StopIteration

  tiling_solver()

    Return the Tiling solver of the Quantumino Game where one of the pentamino is put aside.

    EXAMPLES:

    Sage

        sage: from sage.games.quantumino import QuantuminoSolver
        sage: QuantuminoSolver(0).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False
        sage: QuantuminoSolver(14).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False
        sage: QuantuminoSolver(14, box=(5,4,4)).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False

    Python

        >>> from sage.all import *
        >>> from sage.games.quantumino import QuantuminoSolver
        >>> QuantuminoSolver(Integer(0)).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False
        >>> QuantuminoSolver(Integer(14)).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False
        >>> QuantuminoSolver(Integer(14), box=(Integer(5),Integer(4),Integer(4))).tiling_solver()
        Tiling solver of 16 pieces into a box of size 80
        Rotation allowed: True
        Reflection allowed: False
        Reusing pieces allowed: False

class sage.games.quantumino.QuantuminoState(pentos, aside, box=(5, 8, 2))

  Bases: `SageObject`

  A state of the Quantumino puzzle.

  Used to represent a solution or a partial solution of the Quantumino puzzle.

  INPUT:

  - `pentos` – list of 16 3d pentamino representing the (partial) solution

  - `aside` – 3d polyomino, the unused 3D pentamino

  - `box` – tuple of size three (default: `(5,8,2)`), size of the box

  EXAMPLES:

  Sage

      sage: from sage.games.quantumino import pentaminos, QuantuminoState
      sage: p = pentaminos[0]
      sage: q = pentaminos[5]
      sage: r = pentaminos[11]
      sage: S = QuantuminoState([p,q], r)
      sage: S
      Quantumino state where the following pentamino is put aside :
      Polyomino: [(0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 2, 0)], Color: darkblue

  Python

      >>> from sage.all import *
      >>> from sage.games.quantumino import pentaminos, QuantuminoState
      >>> p = pentaminos[Integer(0)]
      >>> q = pentaminos[Integer(5)]
      >>> r = pentaminos[Integer(11)]
      >>> S = QuantuminoState([p,q], r)
      >>> S
      Quantumino state where the following pentamino is put aside :
      Polyomino: [(0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 2, 0)], Color: darkblue

  Sage

      sage: from sage.games.quantumino import QuantuminoSolver
      sage: next(QuantuminoSolver(3).solve())      # not tested (1.5s)
      Quantumino state where the following pentamino is put aside :
      Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 0, 0), (1, 0, 1)], Color: green

  [Python]

      >>> from sage.all import *
      >>> from sage.games.quantumino import QuantuminoSolver
      >>> next(QuantuminoSolver(Integer(3)).solve())      # not tested (1.5s)
      Quantumino state where the following pentamino is put aside :
      Polyomino: [(0, 0, 0), (0, 1, 0), (0, 2, 0), (1, 0, 0), (1, 0, 1)], Color: green

  list()

    Return the list of 3d polyomino making the solution.

    EXAMPLES:

    Sage

        sage: from sage.games.quantumino import pentaminos, QuantuminoState
        sage: p = pentaminos[0]
        sage: q = pentaminos[5]
        sage: r = pentaminos[11]
        sage: S = QuantuminoState([p,q], r)
        sage: L = S.list()
        sage: L[0]
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink
        sage: L[1]
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (2, 0, 1)], Color: red

    Python

        >>> from sage.all import *
        >>> from sage.games.quantumino import pentaminos, QuantuminoState
        >>> p = pentaminos[Integer(0)]
        >>> q = pentaminos[Integer(5)]
        >>> r = pentaminos[Integer(11)]
        >>> S = QuantuminoState([p,q], r)
        >>> L = S.list()
        >>> L[Integer(0)]
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 1, 0), (1, 1, 1), (1, 2, 0)], Color: deeppink
        >>> L[Integer(1)]
        Polyomino: [(0, 0, 0), (1, 0, 0), (1, 0, 1), (1, 1, 0), (2, 0, 1)], Color: red

  show3d(size=0.85)

    Return the solution as a 3D Graphic object.

    OUTPUT: 3D Graphic Object

    EXAMPLES:

    Sage

        sage: from sage.games.quantumino import QuantuminoSolver
        sage: s = next(QuantuminoSolver(0).solve())    # not tested (1.5s)
        sage: G = s.show3d()                            # not tested (<1s)
        sage: type(G)                                   # not tested
        <class 'sage.plot.plot3d.base.Graphics3dGroup'>

    Python

        >>> from sage.all import *
        >>> from sage.games.quantumino import QuantuminoSolver
        >>> s = next(QuantuminoSolver(Integer(0)).solve())    # not tested (1.5s)
        >>> G = s.show3d()                            # not tested (<1s)
        >>> type(G)                                   # not tested
        <class 'sage.plot.plot3d.base.Graphics3dGroup'>

    To remove the frame:

    Sage

        sage: G.show(frame=False) # not tested

    [Python]

        >>> from sage.all import *
        >>> G.show(frame=False) # not tested

    To see the solution with Tachyon viewer:

    Sage

        sage: G.show(viewer='tachyon', frame=False) # not tested

    Python

        >>> from sage.all import *
        >>> G.show(viewer='tachyon', frame=False) # not tested

sage.games.quantumino.show_pentaminos(box=(5, 8, 2))

  Show the 17 3-D pentaminos included in the game and the \(5 \times 8 \times 2\) box where 16 of them must fit.

  INPUT:

  - `box` – tuple of size three (default: `(5,8,2)`), size of the box

  OUTPUT: 3D Graphic object

  EXAMPLES:

  Sage

      sage: from sage.games.quantumino import show_pentaminos
      sage: show_pentaminos()    # not tested (1s)

  Python

      >>> from sage.all import *
      >>> from sage.games.quantumino import show_pentaminos
      >>> show_pentaminos()    # not tested (1s)

  To remove the frame do:

  Sage

      sage: show_pentaminos().show(frame=False)  # not tested (1s)

  [Python]

      >>> from sage.all import *
      >>> show_pentaminos().show(frame=False)  # not tested (1s)