SUSTech: A MATLAB instrument for studying how people adjust to an unexplained input mapping.

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 microelectronics capstone at SUSTech, I built a MATLAB experiment that placed each shot somewhere other than the participant's click. The program recorded their attempts to work out the mapping, giving me a trace of timing and error to analyze. My advisor set the topic; I implemented the instrument and fitted the resulting data.

A hidden transform made each correction observable.

The experiment showed a target and asked participants to hit its center. Behind the screen, a fixed transform scaled and shifted every click before placing the arrow. Participants saw the miss but never the rule that caused it. Each new attempt gave the program another record of how they responded.

The question was how people adjusted to that unfamiliar mapping through repeated attempts, and whether a model could describe the recorded behavior. Across thirteen sessions, the pauses between shots shortened and aim generally improved. My advisor, Qingsha Cheng, supplied the research topic; I built the instrument and carried out the analysis.

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

The instruction asked for fewer shots, giving participants a reason to pause.

Participants were told to hit the red center in as few shots as possible. Any click fired a shot, and the arrow showed where it landed. The run ended on a hit. Asking for fewer shots encouraged a pause between attempts, making the time between clicks worth recording alongside their accuracy.

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
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

Each attempt logged six fields: attempt number, click position, arrow position, distance to the center, timestamp and hit or miss. Together they captured the action, its consequence and the interval before the next shot. No identifying details were recorded.

Fourteen senior undergraduates volunteered, in unpaid sessions of about a minute. Thirteen datasets were valid. I excluded one participant who fired hundreds of shots while the others used a handful; the thesis reports that decision with the count.

The Instrument

I built the trial loop, input transform and session record on PsychToolbox.

PsychToolbox handled display refresh and input polling. My code defined what happened around them: show the instructions, construct the transform, run the shots and write the session out. The experiment and data-processing code total about four hundred lines of MATLAB across the thesis's two appendices.

The get_trans module assembled the scale and offset that displaced each shot. The same constants gave the analysis a known mapping against which to check its estimates.

get_trans.m defines the hidden mapping. The experiment uses it to place each arrow; the analysis compares its estimates with the known values.
The get_trans.m function open in the MATLAB editor, assembling a transform matrix from the scale terms and the offset

Because the program took over the screen, a dedicated module watched for Escape. The instruction card explained how to exit, giving participants a way out even if the experiment went wrong.

More on the InstrumentInspect the module structure and programming walkthrough1 image · 1 min read

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

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

The Estimate

The known mapping let me check whether a model fitted to the clicks could recover it.

With the sessions recorded, I checked whether a model fitted to the click and landing coordinates could recover the rule applied by the program. 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 the fine model was the preset transform: x scaled by 1.3, y by 1.5, plus a fixed offset. I fitted the coarse model with least-squares regression in MATLAB's regress, estimating six unknowns separately for each retained session.

The estimates fell on both sides of the known scale and offset values, bracketing them rather than clustering, with a wide spread across participants. That checked the estimation method against a rule I already knew.

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
More on the EstimateRead how Space Mapping was adapted1 image · 1 min read

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.

One thing was reversed here. In electronic design, the engineer chooses how the coarse model simplifies the device. Here the coarse model stood for a person's working guess at the mapping, what UX research calls a mental model. Nobody could open or choose it; it could only be 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

The retained sessions showed shorter pauses and improving aim.

From the third attempt onward, most participants' intervals between shots settled near one second, and pauses over five seconds became rare. Most finished in four or five attempts; one needed seven.

Recorded intervals at the first shot (left) and sixth (right). The sixth-shot panel includes only participants whose sessions reached that attempt; the panels are not a paired before-and-after comparison of all thirteen participants. The thesis's plots, with axis titles re-rendered in English; bars, axes and tick values are unchanged.
Histogram of recorded intervals at the first shot, spread from roughly one to four and a half seconds
Histogram of recorded intervals at the sixth shot, mostly between half a second and 1.7 seconds, with one interval near four seconds

Arrow-to-center distance generally decreased across attempts, though some participants moved farther away before getting closer. Each line shows a different route to the target. Because a hit ended the session, the useful evidence is the pattern of attempts leading up to it.

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

The thesis compared the thirteen curves descriptively and ran no significance test, since four to seven shots per person were too few for a per-participant analysis. The patterns show this group adjusting its aim; more trials would be needed to estimate a general learning rate.

In Hindsight

The engineering work gave me a way to examine behavior.

The instrument made the sequence of actions inspectable: where someone clicked, where the shot landed and how long they waited to try again. Interpreting that sequence was a separate research problem. I could observe improving aim without claiming to know the rule each person had in mind.

I submitted the thesis in May 2021 and began my master's in human factors that August. The connection was already in the work: building an interface to study how someone learned to use it.

Related Work