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).
Example output (for s=8 symbols per card)
Settings
Instructions
To print this, copy & paste the emojis above into a Google Doc, configure the page setup to be landscape mode, center all text, and increase font size until each line takes up exactly one page. Then print to PDF with either 4 or 6 pages per sheet.
Of course, the game will still work even if you remove a few cards. So if the last page of your PDF only has 1 or 2 cards, you can save paper by just not printing that page.
Algorithm outline
- Prompt user for number of symbols per card, and call that value \( s \). If \( s \) is one more than a prime power (OEIS A000961) then let \( q = s-1 \), and create a projective plane. Otherwise, if \( s \) is equal to a prime power, let \( q=s \), and create an affine plane. If \( s \) is neither a prime power nor one more than a prime power, raise an error and prompt user for a different number.
- Find a prime number \( p \) and a positive integer \( n \) such that \( q=p^n \).
- Search randomly for an irreducible degree-\(n\) monic polynomial \( \pi(x) \in \mathbb{Z}_p[x] \). Let \( \mathbb{F}_q = \mathbb{Z}_p[x] / \langle \pi(x) \rangle \) be the finite field of order \( q \).
- Let the projective plane of order \( q \) be \( (\mathbb{F}_q)^3 - \{(0,0,0)\} \), modulo the equivalence relation that \((a,b,c) \sim (ka,kb,kc)\) for any \( k \in \mathbb{F}_q \). For each equivalence class, use a representative element for which the first nonzero coordinate is 1. In other words, if \( a \) is nonzero, write \( (a,b,c) \) as \( (1,b/a,c/a) \), if \( a \) is zero but \( b \) is nonzero, write it as \( (0,1,c/b) \), and if \( a=b=0 \), write it as \( (0,0,1) \).
- Solve for the set of lines in the projective plane. Each line is uniquely described by an equation of the form \( ax+by+cz=0 \), where \( a,b,c \in \mathbb{F}_q \) are constants which are not all zero. Since there are \( q^2+q+1 \) lines and \( q+1 \) points on each line, this takes \( O(q^3) \) time.
- If the inputted value is \( s=q+1 \), assign a unique symbol to each point in the projective plane. For each line in the plane, create a card containing the symbols which correspond to the points on that line. Since every pair of (distinct) lines in a projective plane intersects at exactly 1 point, every pair of cards will have exactly one symbol in common. Alternatively, you could assign a unique symbol to each line, and create a card for each point containing precisely the symbols corresponding to the lines through that point. This still works, since every pair of (distinct) points in a projective plane has exactly one line going thought both.
- If the inputted value is \( s=q \), turn the projective plane into the dual of an affine plane by selecting one point and removing all the lines through that point. The resulting incidence structure now has \( q^2+q \) points, \( q^2 \) lines, \( q+1 \) points on each line, and \( q \) lines through each point. Unlike the projective plane, this incidence structure is not its own dual. It has the property that each pair of distinct lines intersects at exactly one point, but there are pairs of points such that there is no line through both.
Further reading
https://blog.plover.com/math/finite-projective-planes.html
https://hapax.github.io/mathematics/spotit/
https://www.youtube.com/watch?v=VTDKqW_GLkw
View source code
Go back to the main page