CARODAK
Back to projects

Developing a Match-3 Puzzle Task and Automating Puzzle Generation

Introduction

What was this project about?

This project explored how a match-3 puzzle task could be used to assess planning, a cognitive skill involved in thinking ahead and solving problems. To support repeated use over time, we built a Python tool that automatically generates new solvable puzzles.
Developed as part of my full-time software developer role at Douglas Mental Health Institute.

My Role

I was the main developer for the puzzle-generation tool, while also contributing to the development of the match-3 task in PsychoPy. I helped with preliminary research, system architecture, and the selection of the algorithmic approach for generating puzzles.

Technical Details

Task Development: PsychoPy, PsychoJS, Vanilla JavaScript
Puzzle Generation: Python

Timeline

Full Project: 1 year

Links

Quick
TL;DR

Problem

Planning is a core cognitive skill, but it can be hard to evaluate repeatedly using the same task.

  • Planning involves thinking ahead, solving problems, and choosing actions to reach a goal.
  • Repeated exposure to the same puzzles can make participants familiar with the answers.
  • Manually creating a lot of puzzle sets that respect the same constraints is slow and difficult to scale.

Solution

We created a match-3 puzzle task and automated the generation of new solvable puzzles.

  • The match-3 format makes the task more engaging and game-like.
  • The Python tool automatically generates new puzzle sets offline.
  • A BFS solver validates that generated puzzles are solvable.
More
information

Process

01

I helped conduct preliminary research on puzzle games to clarify the scientific and technical requirements of the project.

02

I helped define the system architecture, including how the experimental task, puzzle-generation tool, puzzle files, and deployment workflow would fit together.

03

I reviewed different computational puzzle-generation methods and selected a generate-and-test approach using a breadth-first search solver to validate puzzle solvability.

04

I participated in the development of the match-3 task in PsychoPy/PsychoJS and led the development of the Python puzzle-generation tool, including the implementing the BFS solver and reusable package. I also refined the design and implementation based on team feedback.

05

I wrote a scientific methods paper describing the design process, the task, and the automated puzzle-generation approach.

Impact

Reusable generation tool

the project produced a Python package for automatically generating new match-3 puzzle sets.

Open-source task

the match-3 task and generation workflow were made openly accessible, with the full process documented.

Research dissemination

the project led to a scientific methods paper describing the task design and computational puzzle-generation process.