Skip to main content

Tower of London

The Tower of London task is a classic neuropsychological test of executive function and planning ability (Shallice, 1982). Participants must rearrange colored balls on three pegs to match a goal pattern, using the fewest moves possible. The task engages prefrontal cortical regions involved in goal-directed planning and problem-solving.

ActivitySpec: lamp.tower_of_london

Cognitive domain: Planning, problem-solving, executive function

Configurationโ€‹

SettingDescription
Difficulty"easy" (1-3 moves), "medium" (2-5 moves), "hard" (4-7 moves)
Max ProblemsNumber of problems to present
Time LimitTime limit per problem (seconds)
API settings fields
Dashboard SettingAPI FieldTypeDefault
Difficultydifficultystring"medium"
Max Problemsmax_problemsnumber12
Time Limittime_limit_per_problem_snumber60

Sample Instructionsโ€‹

"Move the colored balls to match the goal pattern shown at the top. Tap a ball to pick it up, then tap a peg to place it. You can only move the top ball on each peg. Try to solve each puzzle in as few moves as possible."

Usageโ€‹

The task presents 3 pegs with capacities of 3, 2, and 1 (left to right) and 3 colored balls (Red, Green, Blue). Only the top ball on a peg can be moved. Problems progress from 1-move to 5-move minimum solutions, computed via BFS. A per-problem time limit prevents stalling. Difficulty controls problem complexity: easy presents problems requiring 1-3 moves, medium requires 2-5, and hard requires 4-7.

Scoringโ€‹

Each problem is scored as solved (within minimum moves or with excess), timed out, or exited. Key metrics are problems solved in minimum moves, mean excess moves, and mean planning time (time before first move).

References
  1. Shallice, T. (1982). Specific impairments of planning. Philosophical Transactions of the Royal Society B, 298(1089), 199-209. DOI: 10.1098/rstb.1982.0082

Dataโ€‹

static_dataโ€‹

FieldTypeDescription
scorenumberOverall score
correct_answersnumberProblems solved
total_questionsnumberTotal problems attempted
problems_attemptednumberProblems presented
problems_solvednumberProblems completed successfully
problems_solved_in_minimumnumberProblems solved in optimal move count
total_excess_movesnumberSum of extra moves beyond minimum across all problems
mean_excess_movesnumberAverage excess moves per problem
mean_planning_time_msnumberAverage time before first move (ms)
mean_execution_time_msnumberAverage time from first move to completion (ms)
problems_timed_outnumberProblems where time expired
questionnaireobjectPost-game ratings: clarity (1-5), happiness (1-5)

temporal_slicesโ€‹

One entry per problem.

FieldTypeDescription
itemnumberProblem index
typestringOutcome: "solved", "timeout", or "exit"
problem_numbernumberProblem sequence number
minimum_movesnumberBFS-computed optimal solution length
actual_movesnumberParticipant's move count
excess_movesnumberactual_moves - minimum_moves
solvedbooleanWhether the problem was solved
planning_time_msnumberTime before first move (ms)
execution_time_msnumberTime from first move to completion (ms)
durationnumberTotal time on this problem (ms)
move_sequencestring[]Sequence of moves made
levelnumberProblem difficulty (minimum moves)

Cortex Featuresโ€‹

No Cortex features are currently available for this activity.

View in Portal | Python SDK | API Reference