So
Set is a card game I always hated because I'm terrible at it.
It works like this. You have cards that show geometric things. They vary in four dimensions: shape, color, number, and texture. Each dimension can take three different values (1/2/3 for number; solid/dotted/empty for texture, etc.). E.g., a card may show three solid red ovals.
To play, put a bunch of cards face up on the table. The goal is to find three cards such that, for each dimension, [either all cards are different or all cards are alike]; such three cards are called a set. E.g., [one solid green oval, two solid green ovals, three solid green ovals] passes (different in number, identical in rest), or [one dotted magenta squigglything, two empty red ovals, three solid green rectangles] (different in all four).
Any mathematically inclined person can now conclude that (a) there are 81 possible cards, and (b) for any two cards, exactly one other card makes them a set.
If you were to program an algorithm to solve this problem, I don't believe (though I'm not sure) that it's possible to do better than brute force. Since considering a set of two is never useful, you just have to look at all sets of triples among the revealed cards. Or, well, depending on which operation is cheaper, you can look at all sets of two, compute the third card, and check all other cards for equality with that third.