Falco Shapes: a trotter demo

Welcome to Falco Shapes, a demo created using the Dart package trotter (and setalpha to mix the colors).

Marsha Falco's game of Set

Falco Shapes is an implementation of Marsha Falco's game of Set , a fun combinatorics game in which the goal is to find special combinations of items.

Items & properties

In this game, items have four properties, namely:

(There are thus 81 items, representing combinations of these properties, in total.)

Nine items are randomly selected and placed on a board. The goal of the game is to find two to three lines and two to three planes in the nine items. But what are lines and planes?

Lines & planes

Line
A line is a set of three items such that the items are either all identical or all different from each other in terms of the four properties listed above.
Plane
A plane is a set of four items that consists of two pairs that need the same missing item in order to complete their lines.

(This terminology makes sense of we think about the properties of each piece as coordinate values - for example, green could be 0, red could be 1 and purple could be 2 along the color dimension - that map the piece to a unique point in four-dimensional space. If you'd like to read up a bit more on this, a good place to start is the article Sets, Planets and Comets.)

The trotter library

Falco's game is ideal for a trotter demo. In this version of the game, the computer needs to choose nine random pieces - which themselves are combinations of properties - and make sure that the nine pieces do actually contain two or three lines and two or three planes. It needs to check whether the pieces selected by the user constitute a line or a plane, and to keep track of the lines and planes already found. This involves some pretty heavy tracking of combinations of pieces. The trotter package allows us to arrange combinations (and other combinatorics structures) of given numbers of items into ordered lists, which can help to keep track of arrangements.

In any case, thanks for your interest in the library. Here are links to the trotter library and trotter issues. The code behind this game can be seen here.

The game

The game follows. Have fun!