Skip to main content

Sliding Puzzle

The Sliding Puzzle is a classic spatial problem-solving task that measures planning depth, spatial working memory, and problem-solving strategy. Participants slide numbered tiles to arrange them in order. The implementation computes the mathematically optimal solution (via IDA* with Manhattan distance heuristic) so move efficiency can be precisely measured.

ActivitySpec: lamp.sliding_puzzle

Cognitive domain: Spatial planning, spatial working memory, problem-solving

Configurationโ€‹

SettingDescription
DifficultyControls grid size and number of puzzles
Time LimitPer-puzzle timeout in seconds (0 = untimed)
API settings fields
Dashboard SettingAPI FieldTypeDefault
Difficultydifficultystring"medium"
Time Limittime_limit_per_puzzle_snumber0

Sample Instructionsโ€‹

"Slide the numbered tiles to put them in order, from 1 in the top-left to the last number in the bottom-right. Tap a tile next to the empty space to move it. Solve each puzzle as quickly and in as few moves as possible."

Usageโ€‹

Grid sizes vary by difficulty: 3x3 (easy, 5 puzzles, 30 scramble moves), 4x4 (medium, 3 puzzles, 60 scramble moves), 5x5 (hard, 3 puzzles, 100 scramble moves). Only tiles adjacent to the empty space can move. The optimal solution is computed via IDA* with Manhattan distance and linear conflict heuristic. Move efficiency (optimal_moves / actual_moves) is the primary metric. For 5x5 puzzles, the optimal solution is not computed because the problem is NP-hard at that scale.

Scoringโ€‹

Move efficiency is the primary metric โ€” the ratio of optimal moves to actual moves (1.0 = perfect). Mean solve time is the secondary metric.

References
  1. Klahr, D. & Robinson, M. (1981). Formal assessment of problem-solving and planning processes in preschool children. Cognitive Psychology, 13(1), 113-148. DOI: 10.1016/0010-0285(81)90006-2

Dataโ€‹

static_dataโ€‹

FieldTypeDescription
scorenumberOverall score
correct_answersnumberPuzzles solved
total_questionsnumberTotal puzzles
mean_move_efficiencynumberAverage optimal/actual move ratio
total_movesnumberTotal moves across all puzzles
mean_solve_time_msnumberAverage time to solve (ms)
puzzles_totalnumberNumber of puzzles presented
puzzles_solvednumberPuzzles completed
puzzles_timed_outnumberPuzzles where time expired
difficultystringDifficulty level used
grid_sizenumberGrid dimension
questionnaireobjectPost-game ratings: clarity (1-5), happiness (1-5)

temporal_slicesโ€‹

One entry per puzzle.

FieldTypeDescription
itemnumberPuzzle index
typestringOutcome: "solved", "timeout", or "exit"
puzzle_numbernumberPuzzle sequence number
grid_sizenumberGrid dimension
movesnumberParticipant's move count
optimal_movesnumberIDA*-computed minimum moves (null for 5x5)
move_efficiencynumberoptimal_moves / moves (null for 5x5)
solvedbooleanWhether the puzzle was solved
rt_msnumberTotal solve time (ms)
durationnumberTotal time on this puzzle (ms)

Cortex Featuresโ€‹

No Cortex features are currently available for this activity.

View in Portal | Python SDK | API Reference