Solving Connections: Thinking Like Wyna
Model AI assignment to EAAI 2026
Kevin J Wang
Stanford University
Zachary Dodds
Harvey Mudd College
Nicholas Dodds
Harvey Mudd College
|
Summary |
This assignment asks students to write up a program to solve Connections, crafted by Wyna Liu and The New York Times. Provided with sixteen words, the player’s goal is to make four groups of four words each. For example, this was the Connections puzzle for July 1, 2025:
Eventually, these words form four groups of four:
The game design within Connections inherently leads to questions and wonderments and rabbitholes of semantic similarity, e.g. would {brush, dress, tidy, neat} form a better group than {brush, dress, key, pocket}?
Students will be using embeddings to measure semantic similarities between words and ultimately create an algorithm to potentially crush Wyna’s tricks. |
|
Topics |
Embeddings, cosine similarity, algorithm design, semantics, data visualization |
|
Audience |
The assignment handout provided is primarily geared towards a CS1-CS2 audience, but to reiterate the claim made in the Variants section, this assignment can easily be adapted and modified for any audience. |
|
Difficulty |
Medium. It can be used as a final project in a CS1 course, and should typically be used as a weekly assignment in a CS2 course. There is also an on-ramp which can—and has—been used as a "Welcome to CS" ice-breaking and socializing session well suited to a "CS0" background and environment. |
|
Strengths |
Connections is popular—and challenging! It is colloquially known as a brain twister, providing even more incentive and motivation for students to try to crack the puzzle through any means necessary! Armed with the tools we provide them—and that they will build—in the assignment, along with a supply of the first ~700 Connections puzzles, students will be able to mix and match various combinations of words to test their inherent coherence (which is really the heart and soul of this assignment!). |
|
Weaknesses |
Wyna uses a lot of words, and we use OpenAI’s embeddings (with their model text-embedding-3-large). However, due to their sheer file size when stored in a CSV file, we’ve only kept the first ~700 puzzles for students to play around with.
However, this can be expanded if so desired! If the student wishes to, they can use their own OpenAI key to generate an embedding for a word not currently in the already-very-large dictionary. |
|
Dependencies |
Students should be familiar with Python, along with the ever-infamous NumPy and Matplotlib libraries. This assignment works on both Windows and Mac operating systems, and theoretically should work on Linux, though we have not tried this yet. |
|
Variants |
Numerous variants are available for this assignment! A few variations come to mind:
|
|
Links to resources and materials |
Example Assignment Handout (July '25)
>Solutions (please email dodds@cs.hmc.edu )
|