SUSTech: A MATLAB experiment that measured how people learn an input mapping nobody explained.

ThemeResearch engineering
PlatformResearch
RoleUndergraduate Researcher — Experiment Design, MATLAB / PsychToolbox Programming, Statistical Analysis
Year2021

Undergraduate capstone in Qingsha Cheng's lab, Department of Electronic & Electrical Engineering, the final requirement of a B.Eng in Microelectronic Science and Engineering.

For my 2021 microelectronics capstone at SUSTech, I built a MATLAB PsychToolbox experiment in which a mouse click landed somewhere the participant did not expect. I recorded how thirteen people adjusted their aim, then fitted each person's corrections with a regression estimate borrowed from Space Mapping, an electronic-design optimisation method. My advisor set the topic.

An engineering capstone that turned a question about people into something MATLAB could measure.

For my microelectronics capstone at the Southern University of Science and Technology, I built a MATLAB experiment in which a mouse click landed somewhere the participant did not expect. I recorded how they adjusted their aim and fitted a model to the resulting data. My advisor, Qingsha Cheng, supplied the research topic; I built the instrument and carried out the analysis.

The question was how quickly people work out a rule nobody tells them, using only the gap between where they aimed and where the shot landed, and whether their corrections could be described as an estimated model. Answering it meant building the task, the timing, the logging and the fitting procedure, and deciding which data counted.

The submitted thesis, its cover re-rendered in English on the original's own measured rules: “Research on Human Cognitive Behavior Based on PTB and Spatial Mapping Algorithm.” Department of Electronic and Electrical Engineering, advisor of record Qingsha Cheng, dated 15 May 2021.
Cover page of the 2021 SUSTech undergraduate thesis, re-rendered in English, showing the university's bilingual wordmark above the title, with form fields for name, student number, department, major, advisor and submission date

The Experiment

A target, a mouse click, and a hidden transform between where you aim and where the arrow lands.

A participant sees a bullseye and is told one thing: hit the red centre in as few shots as you can. Clicking anywhere fires, and an arrow appears where the shot landed.

It does not land where you clicked. Between the mouse position and the arrow the program applies a fixed linear transform, a scale on each axis plus an offset, and never mentions it. The run ends when a shot hits the centre.

A shot that missed. The arrow has landed below and right of the red centre, and nothing on screen accounts for the gap between the click and the landing point.
The experiment screen: ten concentric grey rings around a small red centre, with a small arrow landed below and to the right of it

In as few shots as you can is what made the pauses worth timing: it gave participants a reason to think before clicking instead of spraying the screen.

The instruction card as participants read it, re-rendered in English from the Chinese screen the program drew, line for line. Nothing on it mentions the transform.
The experiment's instruction screen, re-rendered in English — a white card of centred instructions on the program's grey field

Every attempt wrote six columns to disk: attempt number, click position, arrow position, distance from the arrow to the centre, timestamp, and whether the shot hit. No names or identifiers were recorded.

Fourteen senior undergraduates volunteered, in unpaid sessions of about a minute. Thirteen datasets were valid. The fourteenth participant fired hundreds of shots where everyone else needed a handful, which is clicking rather than converging on a rule, so I excluded that dataset and the thesis reports the exclusion with the count.

The Instrument

PsychToolbox handled display timing; about four hundred lines of my own MATLAB ran the experiment.

A deliberation time only means something if the frame a participant reacted to appeared when the program thinks it did. PsychToolbox, the open-source MATLAB toolkit long used for timed visual experiments, handled that layer of display refresh and input polling.

Everything above it I wrote: about four hundred lines of MATLAB, listed in the thesis appendices. A start-up script calls six modules in order, from opening the display and showing the instructions to building the hidden transform, running the trial loop and writing each session out. One of them does nothing scientific: it listens for the Escape key, because the experiment takes over the whole screen and a participant who hits a bug would otherwise have no way out. The instruction card tells them so.

Inspect the module structure and the transform code

Start_up runs a session and calls six modules in the order they fire:

  1. init_screen: opens the display.
  2. disp_intro: draws the instruction card and waits for the spacebar.
  3. get_trans: builds the transform matrix.
  4. main_exp: runs the trial loop: draws the target, polls the mouse, places the arrow and logs the result.
  5. checkend: watches for the Escape key.
  6. struct2excel: writes the session out.
What ran the experiment: six modules called in order.

The run order, drawn from the defence deck's own module list and procedure. Neither the deck nor the thesis ever diagrammed it.

Diagram: a Start_up frame containing six numbered module cards in run order (init_screen, disp_intro, get_trans, main_exp, checkend, struct2excel), with get_trans highlighted

get_trans is the shortest module and the most consequential: it assembles the scale and offset that separate where a participant clicked from where the arrow landed.

get_trans.m in the MATLAB editor. The tabs behind it are its sibling modules.
The get_trans.m function open in the MATLAB editor, assembling a transform matrix from the scale terms and the offset

The English programming walkthrough steps through every module in the order it runs.

The Estimate

Recovering a transform the program already knew checked the estimator; it did not discover anything about people.

The analysis borrowed Space Mapping from electronic design, where an engineer aligns a fast, rough model of a device with a slow, accurate one. Here both models described the same transform. The fine model was the program's own: a scale of 1.3 on x and 1.5 on y, plus a fixed offset, known in advance. The coarse model was estimated separately for each participant from their clicks and landing points, by multiple linear regression with least squares in MATLAB's regress: six unknowns, fitted thirteen times.

Because the fine model was known, recovering it is a check that the estimator worked, not a finding about people. Across the thirteen fits, the estimates fall either side of the program's values: the scale term brackets 1.3 and the offset term brackets 60. They bracket rather than cluster, and the spread across participants is wide.

Thirteen estimates per term, against the value the program actually used, marked in red. Left: the x-axis scale term, b11, against fine = 1.3. Right: the offset term, c1, against fine = 60. The count axis on each is re-rendered from the original Chinese.
Histogram of the estimated b11 scale term across thirteen participants, with a red vertical line marking fine = 1.3
Histogram of the estimated c1 offset term across thirteen participants, with a red vertical line marking fine = 60
Read how Space Mapping was adapted

In electronic design, Space Mapping lets an engineer avoid repeatedly running an expensive, accurate simulation by re-estimating a cheap one until it can be trusted. It is used, for example, to tune microwave filters. The thesis cites the technique's canonical survey first (Bandler, Cheng et al., IEEE Transactions on Microwave Theory and Techniques, 2004), co-authored by the advisor who set this topic.

Applying it here inverted one thing. In electronic design the engineer chooses the coarse model's simplification. Here the coarse model stood for a person's working account of the mapping: it could not be opened or chosen, only estimated from what they did. The thesis's literature review found no earlier work applying Space Mapping to human behaviour.

Space Mapping, as the thesis draws it: the coarse model is re-estimated — Coarse model₀, ₁, ₙ — until it lines up with the fine model. Here the fine model is the transform the program had been applying all along.
The thesis's Space Mapping diagram: a fine-model point on one axis pair and a series of coarse-model points converging toward it across iterations zero, one and n

Findings

Most participants settled near one second per shot, and their shots moved toward the centre.

Both results are descriptive observations from thirteen people taking four to seven shots each.

The first is time. The interval between shots is scattered on the first and second attempts. From the third onward, most participants settle near one second, and intervals longer than five seconds become rare. Most finished in four or five attempts; one needed seven.

Time between consecutive shots on the first attempt (left) and the sixth (right). The plots are the thesis's own — bars, axes and tick values untouched — with their axis titles re-rendered from the original Chinese.
Histogram of the interval before each participant's first shot, spread across one to four and a half seconds
Histogram of the interval before each participant's sixth shot, bunched between half a second and 1.7 seconds with one outlier near four

The second is distance. Each participant's distance from the arrow to the centre falls over their attempts, at different rates, and some lines rise before they fall. Reaching the centre is built into the task, since a run ends on a hit. What the chart adds is the path: people were correcting, not guessing, which is the assumption the model estimate depends on.

One line per participant. arrow2tar is the distance from the landed arrow to the target centre; try_time is the attempt number. Each run ends on a hit.
Line chart with thirteen coloured lines, one per participant, each ending lower than it starts, several rising before they fall

No significance test was run on either result. With so few attempts per person, the thesis judged a per-participant analysis unreliable and compared the thirteen curves descriptively instead. It named what a larger dataset would need: interval estimates for the regression coefficients, significance tests on the multiple regression, residual analysis, and filtering trials by the time between shots.

In Hindsight

The model being estimated was a person's account of an interface that never explained itself.

Described in today's vocabulary, the study put people in front of an input mapping that was unfamiliar and undocumented, let them build an account of it through repetition and feedback from their own actions, and instrumented the time to decide and the size of the error. The thesis called it a cognitive model; I would now call it a mental model.

I started a master's in human factors that August. I am not claiming the capstone caused that. The thesis is dated 15 May 2021, and it shows the interest in how people behave inside a system was already part of the engineering work.

Related Work