CritterSEM Home

CritterSEM: A browser-based virtual scanning electron microscope for people and AI agents

CritterLabs

Project page · 2026

The console of CritterSEM in use, recorded from the simulator as it runs in a browser. Everything moves in real time; some chapters are cut together from several takes. The pictures are simulated.

Abstract

CritterSEM is a scanning electron microscope simulator that runs in a browser tab. Its specimens are procedural: for every pixel a ray is traced into a signed-distance model of the specimen on the GPU, and a scan pass adds what an operator has to work against: defocus, astigmatism, probe size, column misalignment, shot noise from beam current and dwell time, detector gain and offset, and optional vibration. There are three detectors (SE, InLens, BSE) and 28 specimens on one holder, and the instrument takes real time: the stage moves at a finite speed, the auto routines run for one to six seconds, and the beam reaches the specimen only with vacuum, high voltage and an open valve. In challenge mode, 15 written tasks at three levels are judged by rules about what a photo shows and by an image-quality score against the photo the best settings would give. The same tasks, clock and judge are open to an AI agent, which drives the microscope in a person's browser through an HTTP interface. All images and read-outs are simulated, and this page reports no comparison with measurements from a real instrument.

Introduction

A good micrograph from a scanning electron microscope depends on several coupled controls: accelerating voltage, spot size, aperture, working distance and focus, the stigmators, brightness and contrast, scan speed and averaging, and the choice of detector. They trade against each other: a slower scan is cleaner but takes longer, and a smaller aperture gives more depth of field but less beam current.

CritterSEM is an instrument for practising that. It runs in a browser tab and needs no installation. A session starts the way one starts at a real instrument: untuned. The specimen is out of focus, brightness and contrast are wrong, there is astigmatism, and in free operation the column is not aligned either. The operator has to set the instrument up before the picture is any good.

The same instrument can be driven by an AI agent through an HTTP interface while a person watches. This makes CritterSEM a place to compare how people and agents handle a real-time instrument that keeps part of its state hidden. Section 2 describes the instrument, Section 3 its specimens, Section 4 how it imitates the imperfections of a real one, Section 5 the challenge tasks and their scoring, and Section 6 operation by an agent. Sections 7 and 8 give the intended uses and the limits.

The instrument

Image formation

A frame is made in three passes (Figure 2). The truth pass traces one ray per pixel into a procedural specimen, a signed-distance field, and writes the ideal secondary-electron (SE), in-lens and backscattered-electron (BSE) signals together with the height of the surface. It runs again only when the view changes (stage, magnification, voltage, tilt), and at half resolution while the view is moving. The scan pass then advances the raster by as many lines as fit in the elapsed time and computes only those lines. The display pass shows the result.

  1. Truth passOne ray per pixel into a signed-distance specimen on the GPU. Writes the ideal SE, InLens and BSE signals and the surface height. Redone only when the view changes: stage, magnification, voltage, tilt.
  2. Scan passOnly the lines scanned in the elapsed time. Blur from defocus, astigmatism and probe size; image shift from misalignment; displacement from vibration; shot noise from beam current times dwell time; detector gain and offset.
  3. DisplayThe picture on the screen. A photo adds the data bar: HV, WD, magnification, detector, field width and scale bar.
The three passes that make a frame. The truth pass is redone only when the view changes; the scan pass runs for as long as the scan does.

The physics is in closed form; electron trajectories are not simulated one by one. The code uses the Kanaya–Okayama range, a backscatter coefficient that depends on atomic number and on the tilt of the surface, the universal secondary-yield curve, and a probe diameter that adds the source image, diffraction, spherical and chromatic aberration in quadrature, for a Schottky field-emission column. A material's secondaries are split into those made by the primary beam (SE1) and those made by the backscattered electrons (SE2); for the latter, the interaction volume is probed in the specimen's own geometry to see how much of it is open to vacuum.

The three detectors weigh these signals differently (Figure 3). SE is modelled on an Everhart–Thornley detector: it collects the secondaries made by the primary beam and by backscattered electrons, and a small share of the backscattered electrons themselves, and faces turned toward the detector look brighter. InLens takes secondaries from near the axis and few of those made on the pole piece and chamber walls, which gives fine surface detail. BSE is an annular detector on the axis: its signal grows with atomic number, and steep faces send their electrons past it.

(a) Gold islands on carbon, in-lens image at 5 kV and 100,000x.
(b) The same field in backscatter at 10 kV: the gold islands are bright against dark carbon.
The same field of gold on carbon at 100,000x (field width 1.27 µm) with the in-lens detector at 5 kV (a) and the backscatter detector at 10 kV (b). Example pictures rendered by the simulator, with the data bar and a visible watermark.

Two optional hooks extend the signal model for specimens that need them. One describes a thin layer over another material, such as graphene on oxide or the silica shell of a core-shell particle: how much of the material beneath shows through the layer depends on its thickness and on the voltage. The other describes channelling contrast, where the backscatter yield of a grain depends on the beam's direction in the crystal, so that a grain can change brightness with a degree or two of tilt.

Controls

The control deck under the image is drawn as a hardware knob box (Figure 1), and the keyboard is laid out like one. The console comes in English and Chinese. The accelerating voltage runs from 0.5 to 30 kV and the spot size from 1 to 7, each step up giving four times the probe current. The aperture is 20, 30, 50 or 100 µm, the focus (working distance) 0.3 to 45 mm, and the magnification 30 to 1,000,000 times. Two stigmators reach ±100 µm each. Nine scan-speed presets set the dwell time per pixel from 0.05 to 30 µs; line and frame averaging go from 1 to 16; and a small scan window, which refreshes far faster than the whole frame, is used for focusing.

The stage moves in x and y over the 12.7 mm stub (±6.35 mm), in z, in tilt from 0 to 70° and in rotation; the scan can be rotated separately. The column has to be aligned as well: the aperture and the centres of the two stigmators are set with knobs, and an alignment wobbler swings the objective lens or a stigmator so that the operator can see when the beam passes through its centre. Brightness and contrast set the detector's offset and gain.

Specimens

The microscope holds 28 specimens, each on its own pin stub in a numbered slot of one round holder: a square of 4 × 4 slots, 15 mm apart, in the middle and a ring of 12 more, 40 mm from the middle. Going to another slot is a stage move like any other. Every specimen is a program, not an image: a signed-distance description of its shape, its materials (atomic number, density, secondary yield) and lattices of random cells. The picture is computed anew for any position, magnification, tilt and voltage.

They include reference standards (tin balls on carbon for practising focus and stigmation, gold on carbon as a resolution standard, a lithography test chip with numbered fields and a Siemens star); powders and growths (pollen, diatoms, polydopamine spheres, LNMO cathode particles, graphite, nanorods and nanosheets on nickel foam, carbon nanotubes); polished sections (cemented carbide, solder joints, ceramic capacitors, a battery electrode); fracture surfaces (an aluminium fatigue fracture, cryo-fractured epoxy); and thin or layered specimens (graphene on oxide, a multilayer coating, silicon nanowires, core-shell particles, electropolished copper). Some were modelled on kinds of material seen in real micrographs: the kind is kept, not the photographed field of view.

(a) One pollen grain with spines, secondary electrons at 10 kV and 3,000x.
(b) The inner electrode layers of a ceramic capacitor in cross-section, backscatter at 15 kV and 1,000x.
(c) Graphene on silicon dioxide on silicon, in-lens at 1.5 kV and 12,000x, with patches of different grey level.
(d) Electropolished copper, a mosaic of grains of different brightness, backscatter at 20 kV and 200x.
(e) Striations on an aluminium fatigue fracture, secondary electrons at 15 kV and 30,000x.
(f) Pores in the sieve plates of diatom shells, in-lens at 3 kV and 25,000x.
Six of the 28 specimens, as the simulator renders them at the settings printed in each data bar: (a) one pollen grain; (b) the inner electrode layers of a ceramic capacitor in cross-section; (c) graphene on SiO₂/Si, where layers differ in grey level; (d) electropolished copper, a mosaic of grains with channelling contrast; (e) striations on an aluminium fatigue fracture; (f) pores in the sieve plates of diatom shells. Example pictures with a visible watermark.

A specimen does not fill its stub. A powder lies in one irregular patch with bare substrate around it, and where the patch lies is drawn anew with every load and is not given away by the stage read-out. Depending on the mode and the level, a session starts on the powder, at its edge, at the middle of the stub with the powder out of sight, or anywhere away from it, and the operator looks for it at low magnification. A used gold standard carries rectangles of carbon contamination where earlier frames were scanned at high magnification; they are dark in SE, darker in InLens and almost invisible in BSE.

A specimen guide, open to approved users, says what each specimen is and what people photograph it for. It lists 97 photo goals in all, 22 for beginners, 38 advanced and 37 expert, each with the requirements a photo has to meet and an example picture rendered by the simulator (Figure 4).

Imitating a real instrument

A simulator that shows the answer teaches little. CritterSEM therefore imitates what makes a real instrument hard to use, and keeps hidden what an instrument does not show.

Challenge tasks and scoring

In challenge mode the person chooses who operates (a person or an AI agent), a level, a specimen and which of the four auto functions the run allows. Written tasks exist for 15 specimens: 4 for beginners, 5 advanced and 6 expert (Table 1). A task gives its goal in words, the number of photos to take (1 to 3) and a standard time (1:30 to 8:00). The level sets how far off the start state is and which auto functions are on by default: all four for beginners, only brightness and contrast for advanced tasks, none for experts. A beginner's task runs on an instrument that stands still, with the stage starting on the specimen; from the advanced level on the image shakes, and a powder, where the specimen has one, has to be found on its stub first.

The 15 written challenge tasks, by level, with the specimen, the number of photos and the standard time.
TaskSpecimenPhotosStandard time
Beginner · 4 tasks
Balls and substrateTin balls on carbon11:30
Two phasesCemented carbide (WC-Co)11:30
Pollen overviewPollen on carbon tape12:00
Steps at low voltageGraphite anode particles12:00
Advanced · 5 tasks
One field, two detectorsGold on carbon23:00
Electrode layersMLCC cross-section12:30
Navigate to the gratingChip test pattern14:00
One spot, three scalesNanorod array on nickel foam35:00
A well-dispersed fieldLNMO cathode particles15:00
Expert · 6 tasks
Three residue particlesGunshot residue on carbon tape37:00
Find the crackSolder joint cross-section26:00
Depth of fieldElectrospun nanofibre mat14:00
Spheres by themselvesMesoporous polydopamine spheres18:00
A clean placeUsed gold standard16:00
Tubes at 100,000xCarbon nanotubes17:00

Each photo is a fresh full frame taken with the present settings, and its scan time counts; the last photo ends the run. A photo is compared with the photo the best settings give of the same view: a slow scan, in focus, with the levels set for it. Four marks from 0 to 100 are combined (Table 2), and the result is multiplied by the share of the task's rules that were met. A rule is judged from what the engine recorded with each photo: the settings, where the image lies on the specimen, and a census of the view, the material under the beam and the surface height at 256 × 192 points. A photo below the target magnification pulls the total down in proportion. The total gives a grade: S from 90, then A, B and C from 80, 65 and 50, otherwise D.

The marks that make up the image-quality score of a written task, and their weights.
MarkWhat it measuresWeight
SharpnessThe blur left by defocus and astigmatism, in pixels at the target magnification; full marks at none, falling off as a bell curve 2.5 pixels wide0.4
ExposureHow much of the grey scale the picture uses, and how much of it is clipped0.3
NoiseThe signal-to-noise ratio, on a log scale from 6 (no marks) to 30 (full marks)0.1
TimeThe time of the run up to the last photo plus the scan time of the photos; full marks within half the standard time, none beyond three times it0.2

The result page lists each rule as met or not, shows each photo beside the best-settings photo with a divider to drag, and lists how far each setting was from the best. Its ranking panel shows simulated data and is not connected to real scores. An agent's run of a task starts in the same state every time, since the random draws are seeded with the task's identifier, so that the results of different agents can be compared; a person's run is drawn by chance.

Operation by an AI agent

A person who has the microscope open can hand it to an AI agent. The page asks the server for a session and shows a link; the agent opens it and gets a manual written by the server: the task and its rules, every setting with its range, and the endpoints. From then on the agent sends plain HTTP requests. The microscope stays in the browser: the server only relays each request to the open page, which carries it out while the person watches. During a task the person's controls are locked, and the person can stop the run.

The interface covers what an operator can do: reading the state (settings, read-outs, the stage and the beam path); setting any control; centring a point of the picture; the auto functions, where the task allows them; the vacuum, the high voltage, the column valve and the live scan; scanning a frame as JPEG, PNG or TIFF, also in 16 bits; batches of up to 12 steps, each followed by a frame of the small window, returned as one contact sheet or one frame at a time; and taking a photo, whose finished micrograph, with its data bar, can then be fetched.

The agent sees what an operator sees: settings, read-outs and the picture, never the defocus, the astigmatism or the misalignment. Time is real time: a frame takes as long as its scan, a stage move as long as the stage needs, and in a task the clock starts with the agent's first command. During a task the agent is not told whether a photo meets the rules until the run is over. The server writes the manual itself and tells the agent to treat every other reply as data about the instrument, since those replies come from a page in somebody's browser. A session ends after two hours or 3,000 commands.

The agent lab is the same link without a task: no clock, no score and no lock, so the person can operate the microscope together with the agent, and the agent can go to any slot of the holder. A photo taken in the lab is marked at once, but only for the person: the marks, the focus error and the astigmatism left appear in the log, and the agent is told none of it.

Intended uses

Teaching. Several specimens are made to teach one thing each: the tin balls for focus and stigmation, the fibre mat for depth of field, gunshot residue that looks alike in SE and is told apart in BSE, silicon nanowires whose height shows only when tilted, graphene whose layers show at 1 to 2 kV, and copper whose grains change brightness with a degree of tilt.

Operator practice. The same tasks can be repeated against a standard time and a score, so that the sequence of setting up an instrument, finding the place, choosing detector and voltage, and taking the photo can be practised and compared from one attempt to the next.

Evaluating agents. A person and an agent get the same tasks, the same clock and the same judge, and an agent's run always starts in the same state. This allows the results of different agents, or of different versions of one agent, to be compared on a task that runs in real time and has hidden state. The specimen guide can also hand any of its photo goals to an agent as text.

Limitations

Access

CritterSEM is open to people we approve one by one. Tell us who you are and what you want to use it for. Requests are reviewed by hand, and if one is approved the sign-in link arrives by email. Please read the Terms of use and the Privacy notice first.

Request access

What you want to do with CritterSEM, in 20 to 2,000 characters. 0 / 2000

Citation

If you refer to CritterSEM, you can cite it as:

@misc{critterlabs2026crittersem,
  title        = {CritterSEM: A browser-based virtual scanning electron microscope for people and AI agents},
  author       = {{CritterLabs}},
  year         = {2026},
  howpublished = {\url{https://critterlabs.dev/sem/}},
  note         = {Virtual scanning electron microscope}
}