Spot-It Card Game Generator


"Spot-It" (also called "Dobble") is a card game in which each card has 8 pictures/symbols on it, and each pair of cards has exactly one symbol in common. You can use that deck to play a variety of game modes in which players compete to find those matches as quickly as possible. There is also an easier version of Spot-It made for young kids, in which there are only 6 pictures on each card.

This website allows you to make your own Spot-It game, in which you choose the number of symbols per card, and you can also choose which symbols to use (from a limited selection of emojis). Here are some example outputs:


Settings

After selecting the number of symbols per card, use the emoji menu below to choose which symbols to use for your deck. The number of symbols needed for your deck is given in this table: \[ \begin{array}{|c|c|c|} \hline \text{emojis per card} & \text{emojis needed} \\ \hline 3 & 7 \\ 4 & 13 \\ 5 & 21 \\ 6 & 31 \\ 8 & 57 \\ 9 & 73 \\ 10 & 91 \\ 12 & 133 \\ 14 & 183 \\ 17 & 273 \\ 18 & 307 \\ 20 & 381 \\ \hline q+1 & q^2+q+1 \\ \hline \end{array} \]

Loading emoji selection...


Instructions


How does this work?

The math behind Spot-It is fascinating and surprisingly deep. The best place to begin learning about it is with this video by Stand-up Maths. I also recommend checking out this article about constructing finite projective planes.

Hypergraphs

A graph is a structure made of vertices, also called "nodes" or "points", and edges, which are drawn as lines between two vertices. Mathematically, a graph is a structure \( G=(V,E) \), where \( V \) is the set of vertices, and \( E \) is the set of edges. Each edge is a 2-element subset of \( V \).

A hypergraph is defined the same way, except that each edge can be any subset of \( V \), not just a 2-element subset. Edges of a hypergraph are sometimes called "lines", because they are drawn as lines through the vertices they contain.

Everyone's favorite example of a hypergraph is the Fano plane, shown below. It has 7 vertices and 7 lines, although one of those "lines" is drawn as a circle. Each line in the Fano plane contains 3 vertices, and every pair of lines intersects at exactly one vertex. Also, for any pair of vertices, there is exactly one line which goes through both.

If a hypergraph satisfies certain properties, then we can use it to create a Spot-It deck. There are two methods which we can use for representing a hypergraph as a Spot-It deck:

  1. Label each vertex with a unique symbol. For each line, create a card containing the symbols corresponding to each point on the line.
  2. Label each line with a unique symbol. For each vertex, create a card containing the symbols corresponding to each line which contains that point.

Which method you use is a matter of taste, but I prefer method 1, so I will default to using that method. Representing a hypergraph \( G \) using method 1 is equivalent to representing its dual, \( G^* \), using method 2, and vice versa. Note that the Fano plane is its own dual.

Steiner systems

A Steiner system \( S(t, k, n) \) is any hypergraph with \( |V|=n \) vertices such that every edge contains exactly \( k \) elements, and every \( t \)-element subset of \( V \) is contained in exactly one of its edges. For example, the Fano plane is a Steiner system \( S(2, 3, 7) \), because it has 7 vertices, every edge contains 3 vertices, and every pair of 2 vertices is contained in a unique edge.

A hypergraph can be represented as a valid Spot-It deck using method 2 if it is a Steiner system \( S(2, k, n) \), because then the criterion that every pair of vertices is contained in a unique edge is equivalent to the criterion that every pair of cards has exactly one symbol in common. Similarly, a hypergraph can be represented as a valid Spot-It deck using method 1 if it is the dual of a Steiner system with \( t=2 \), because every pair of lines in \( S(2, k, n)^* \) intersects at exactly one vertex.

If you're interested in learning more about combinatorics, there are many more fascinating and complicated Steiner systems than just the ones with \( t=2 \). I especially like the Steiner system \( S(4,5,11) \), because it can be defined in terms of the ternary Golay codes, and because its automorphism group is the Mathieu group \( M_{11} \), which is the smallest sporadic simple group.

The easiest way to to create a Spot-It deck is to use either a finite projective plane of order \( q \), which is a Steiner system \( S(2, q+1, q^2+q+1) \), or a finite affine plane of order \( q \), which is a Steiner system \( S(2, q, q^2) \). As far as I know, these only exist when \( q \) is a prime power (OEIS A000961), because then you can use the finite field \( \mathbb{F}_q \) to construct a projective/affine plane. That's why I require the number of symbols per card (\( q+1 \)) to be one more than a prime power.

Finite fields

The ring of integers modulo \( m \), denoted \( \mathbb{Z}_m \) (where \( m \) is a positive integer), behaves like the integers, except that any two numbers which differ by an integer multiple of \( m \) are considered to be the same. For example, in \( \mathbb{Z}_{10} \), the statements \( 6+7=3 \) and \( 6 \times 7=2 \) are true, because \( 13=3 \) and \( 42=2 \). This works because \( \mathbb{Z}_m \) is defined as the quotient \( \mathbb{Z}/m\mathbb{Z} \), so when we say "the element 6 in \( \mathbb{Z}_{10} \)", what we really mean is the coset \( \{ \dots, -14, -4, 6, 16, \dots \} \).

If \( p \) is a prime number, then you can verify fairly easily that \( \mathbb{Z}_p \) satisfies the field axioms, which makes \( \mathbb{Z}_p \) very nice to work with.

For any prime number \( p \) and any natural number \( n \), there exists an irreducible degree-\( n \) polynomial \( \pi(x) \in \mathbb{Z}_p[x] \) (here is a proof, but you don't really need to know why it is true). For convenience, I can make that polynomial monic (by dividing by the leading coefficient).

The finite field of order \( q=p^n \) is defined as the quotient \( \mathbb{F}_q := \mathbb{Z}_p[x] / \langle \pi(x) \rangle \).

I don't have the space here to explain why, but there is always at least one irreducible polynomials of degree \( n \) over \( \mathbb{Z}_p \). Also, a field of order \( q \) exists iff \( q \) is a prime power, and if such a field does exist, it's unique up to isomorphism.

Projective planes

A projective plane of order \( q \) is defined as \( (\mathbb{F}_q)^3 - \{(0,0,0)\} \), modulo the equivalence relation that \( (x,y,z) \sim (kx,ky,kz)\) for any \( k \in \mathbb{F}_q \). The set \( (\mathbb{F}_q)^3 - \{(0,0,0)\} \) has \( q^3-1 \) points, and each equivalence class contains \( q-1 \) of those, so that projective plane of order \( q \) has \( (q^3-1)/(q-1)=q^2+q+1 \) distinct points. We can represent each equivalence class as the unique point in that class for which the leading nonzero coordinate is 1. In other words,

Counting up those 3 cases shows again that the projective plane of order \( q \) has \( q^2+q+1 \) distinct points.

Any line in the projective plane of order \( q \) can be defined as the set of points \( (x,y,z) \) in that plane which satisfy the equation \( ax+by+cz=0 \), where \( a,b,c \) are constants in \( \mathbb{F}_q \) which are not all zero.

One very nice property of finite projective planes is that they are their own dual, which means you can use either method 1 or method 2 to turn a finite projective plane into a Spot-It deck.

Affine planes

An affine plane of order \( q \) can be obtained by taking a projective plane of order \( q \) and choosing any line, then removing that line as well as all the points on that line. The resulting hypergraph will no longer have the property that every pair of lines intersects at exactly one point, but it will still have the property that every pair of points lies on exactly one line. Therefore you can make it into a valid Spot-It deck using method 2, but not method 1.

In general, when creating your Spot-It deck, you want to maximize the number of cards you can make while minimizing the number of symbols needed. That's because you can always remove cards without messing anything up, but there may be a limited number of emojis that you like. Creating a deck from a projective plane of order \( q \) gives you \( q^2+q+1 \) cards with \( q+1 \) symbols per card, and it requires you to select \( q^2+q+1 \) symbols. Creating a deck from an affine plane of order \( q \) gives you only \( q^2 \) cards with \( q+1 \) symbols per card, while still requiring you to select \( q^2+q \) symbols. Because of that, it's pretty much always preferable to use the projective plane.


Further reading

Note that some sources refer to Steiner systems (including projective and affine planes) as "incidence structures" instead of "hypergraphs". Those terms are pretty much interchangeable, since they describe equivalent structures but organize the data differently.



View source code

Go back to the main page