Traveling Salesman Problem Task

Executive Function Duration: ~10 minutes
Traveling Salesman Problem Task screenshot

Description

A visual-spatial planning task where participants find the shortest path through a set of points, returning to the starting point, to assess route optimization and spatial reasoning.

Measures: Spatial planning and reasoning, route optimization ability, visual-spatial problem solving, heuristic decision-making, and the balance between speed and solution quality in complex spatial tasks.

Visuospatial Planning Problem Solving

Ages: 12+  ·  Populations: adults, research, clinical

About This Test

Participants view a set of points on the screen and must click through each point exactly once, finding the shortest possible route and returning to the starting grey circle. The task begins with a practice phase (6-point problems) followed by test trials with varying difficulty (10, 20, or 30 points). After completing each route, participants receive feedback showing their path efficiency compared to the optimal solution. Performance is measured by both path efficiency and solution time.

  • Migrated to PEBL 2.3 with HTML-lite markup on February 1, 2026
  • Supports 10 language translations: English, Spanish, French, German, Italian, Dutch, Portuguese, Chinese, Greek, Turkish
  • Default uses subset.csv with pre-selected 15 problems for ~10 minute session
  • Includes reliability and normative data (Mueller et al., in submission)
  • Tour files can be generated from Concorde TSP solver output using tours/processTSPFile.R
  • Additional tour problems available in tours/tours2.zip and tours/TSP.zip
  • Supports both click and touch input modes with optional visual/audio feedback
  • Backup feature allows participants to undo mistakes (can be disabled)
  • Provides immediate efficiency feedback with optimal path visualization

Test Details

Test ID:
tsp
Main File:
tsp.pbl
Parameters:
0 configurable parameters
10 configurable parameters including trial selection method (file-based vs. random), number of trials per size, target size, input mode (click/touch), visual feedback options (flash, beep), backup/undo capability, random start position, and introductory example
Languages:
Chinese German EL English Spanish French Italian Dutch Portuguese Turkish

🚀 Try Without Registration

Run this test immediately without creating an account. Data stays in your browser.

Scientific Background

Original Task References:

These references describe the original task that this PEBL implementation is based on.

  • MacGregor, J. N., & Ormerod, T. (1996). Human performance on the traveling salesman problem. Perception & Psychophysics, 58(4), 527-539.
  • Vickers, D., Bovet, P., Lee, M. D., & Hughes, P. (2003). The perception of minimal structures: Performance on open and closed versions of visually presented Euclidean travelling salesperson problems. Perception, 32(7), 871-886.

PEBL-Specific References:

These studies used the PEBL version of this task.

  • Mueller, S. T., Perelman, B. S., Tan, Y. Y., & Thanasuan, K. (2015). Development of the PEBL Traveling Salesman Problem Computerized Testbed. The Journal of Problem Solving, 8(1), 4.

Validation status: In-progress  ·  Psychometric data available  ·  Normative data available

Related Tests

ptrails maze matrixrotation

Data Output

Creates four data files: (1) tsp-<subnum>.csv with click-by-click data; (2) tsp-sum-<subnum>.csv with trial summary data; (3) tsp-report-<subnum>.txt with performance summary; (4) tsp-log.txt with session timestamps. A fifth file (tsp-pooled.csv) aggregates data across all participants.

Key Variables

Variable Description
subnum Participant identifier code
trial Trial number
test Tour file path (e.g., 'tours/tour-10-01.txt')
type Trial type: PRACTICE or TEST
point Point number in the clicked sequence (0=starting point)
targx, targy Target position coordinates on screen
clickX, clickY Actual click coordinates
opt Optimal (shortest possible) path distance in pixels
obs Observed (participant's) path distance in pixels
eff Efficiency ratio (obs/opt): 1.0 = perfect, >1.0 = longer than optimal
elapsedtime Total time to complete trial in milliseconds
rt Response time for each click in milliseconds

Example Data

subnumtrialtesttypestarttimefirstclickendtimeelapsedtimenumposoptobseff
example1tours/example06-01.txtPRACTICE308143331035939512561213.11213.11
example2tours/example06-02.txtPRACTICE378503889042334448461111.361111.361
example3tours/example06-03.txtPRACTICE432904485047928463861173.781173.781
example4tours/example06-04.txtPRACTICE493065073154772546661253.431253.431
example5tours/example06-05.txtPRACTICE564875830761041455461522.371522.371
example6tours/tour-10-08.txtTEST6378265116710357253101459.271459.271
example7tours/tour-30-05.txtTEST718447358510529233448302520.72554.041.01323
example8tours/tour-20-12.txtTEST10743610883413241124975202142.942289.731.0685
example9tours/tour-10-07.txtTEST1366741403631461829508101689.151689.151

View full file (14 rows) →

Sample data showing typical output format. Actual values will vary by participant.

About This Test

A visual-spatial planning task where participants find the shortest path through a set of points, returning to the starting point, to assess route optimization and spatial reasoning.

Category: Executive Function
Estimated Duration: 10 minutes
Available Translations: 10 languages

Documentation Sources:
Test description file, Test implementation, Parameter schema

Documentation Status: Complete