Skip to content

Color Restrictions

Color restrictions tell the solver that a part of a piece may only go to certain parts of the result. For example: “the painted face of each piece must be on the outside of the cube”, or “this corner piece must go in a corner”.

They do two things:

  • They limit the assemblies found. Only assemblies that follow the colors count. A puzzle with a printed picture, or with a different color on each face, needs this, or the solver would also list assemblies where the picture is scrambled.
  • They speed up the solve. The solver throws away every placement of a piece that breaks the rules before the search starts. Fewer placements means a smaller search, sometimes a much smaller one.

Color restrictions work in all the normal (assembly) puzzle types and in sliding puzzles, where they work a little differently (see Sliding puzzles below). Stacking puzzles don’t use them.

Constraint colors are painted onto voxels in the voxel editor on the Shapes tab.

The color area of the voxel editor, with the puzzle’s two constraint colors in the palette.

  1. Click + beside the big color swatch to add a color. Each color you add is a constraint color of the whole puzzle.
  2. Click the color in the palette to make it the drawing color.
  3. Use the Paint tool (4) to color existing voxels, or draw new voxels with Fixed or Variable in that color.

Paint both the pieces and the result. Default means no constraint color; voxels in the default color are neutral.

To check where the colors are, choose Display ▸ Constraint color in the 3D view (or View ▸ Display with Color Constraint Colors). Every voxel is drawn in its constraint color instead of the shape’s color:

A shape in its normal color.

The same shape with Constraint color on: its voxels in the two constraint colors, red and gray.

The Puzzle tab has a grid of color rules for each problem. Columns are result colors, rows are piece colors. A ticked cell lets a piece voxel of the row’s color sit on a result voxel of the column’s color.

The color rules: red pieces on red, gray on gray.

  • Each color on itself ticks only the diagonal. This is the usual choice: red goes on red, gray on gray.
  • Allow all ticks every cell.
  • Clear unticks every cell.

Rules can be one-sided. For example, ticking red-on-red and red-on-gray but not gray-on-red lets red pieces go anywhere colored, while gray pieces stay off red.

The Solver tab’s search options have a switch called Strict Color Restrictions. It decides how colors are matched, and it is on by default.

Colors must match exactly:

  • A voxel with a color fits only a result voxel of the same color. It does not fit a neutral (uncolored) result voxel.
  • A neutral voxel fits only a neutral result voxel.
  • The color rules grid is not used.

This is the simplest way to work. Paint the pieces and the result, and every color must land on its own color. Neutral parts of the pieces must land on neutral parts of the result.

This is how the original BurrTools matched colors:

  • A neutral piece voxel fits any result voxel, colored or not.
  • Any piece voxel fits a neutral result voxel.
  • A colored piece voxel on a colored result voxel needs a ticked cell in the color rules grid.

So neutral voxels are wildcards, and the rules grid decides the rest. Use this when only part of the puzzle is colored, for example when only the outside of the result is painted and the inside doesn’t matter, or when you need rules other than “each color on itself”.

You want Use
Every colored voxel on its own color, and uncolored on uncolored Strict on (the default)
Only some voxels colored, the rest free to go anywhere Strict off, with Each color on itself
A color allowed on several colors, or rules that only go one way Strict off, with your own rules
A puzzle made in BurrTools to solve as it did there Strict off

In a sliding puzzle, paint the pieces and the board. The colors decide where each piece may start: the solver only finds start layouts that follow them. Once the pieces are on the board, the colors play no part: a piece slides over cells of any color, and where it must end is set by its goal mark, not by colors.

  • Strict Color Restrictions does not apply. A sliding puzzle has no such switch: its colors always match as with the switch off. Neutral voxels fit anywhere, and the color rules grid decides which piece colors may sit on which board colors.
  • Start marks and colors both count. A piece with a start mark must start on its mark, and the colors there must also allow it. If they don’t, there is no start layout and the solve finds nothing.
  • Pieces without a start mark may start on any board cells that are not another piece’s start, as long as the colors allow it. This is where colors are most useful: they keep such a piece to part of the board.

Start and goal marks are kept apart from the colors, so painting a board never moves or removes a mark.

  • If a solve finds nothing, check the colors first: switch on Voxel color, and check that each piece’s colors can land somewhere in the result.
  • Colors on variable voxels count too: a piece can’t cover a variable result voxel of the wrong color, even though the voxel could stay empty.
  • Color restrictions remove placements before the search, so painting even a few voxels of a large puzzle can make it much faster to solve.