TIM — TINY INFERENCE MODEL — LOS REUSE — MAXIMUM VISIBILITY [ ver 2026-10-09-a ]© Leonard Brown, 2026
9-WEIGHT SURFACE TRAINING MODEL
Recursive least squares learns a compressed nine-parameter approximation of the true Himmelblau terrain.
SettingValue
Training points
Noise σ
Random seed

The random seed is included in the HTML version so the training example is reproducible.

HOW TO READ THIS SHEET
1. INITIALIZE: weights start at 0; uncertainty starts very high.
2. OBSERVE: generate x and y, calculate true z, then add noise.
3. ENCODE: use nine selected features; x⁴ and y⁴ are deliberately omitted.
4. TRAIN: prediction error updates the weights and reduces uncertainty.
LEARNED DOMAIN CHARACTERIZATION
FEATURELEARNED WEIGHT

Learned weights need not equal generating coefficients because the representation omits x⁴ and y⁴. High confidence in the estimated parameters does not necessarily imply an accurate representation of the environment.

TRAINING TRACE
IDSplitxyTrue zNoiseObserved zPrediction errorTrace of covariance Pw(1)w(x)w(y)w(x²)w(x·y)w(y²)w(x³)w(x²·y)w(x·y²)
PROMPT
LINE-OF-SIGHT PROMPTVALUE
X GRID POINTS
Y GRID POINTS
TOTAL GRID POINTS20 × 20 (400 points)
DOMAIN RESOLUTION
MAXIMUM LINE-OF-SIGHT COVERAGE
Evaluate line-of-sight coverage using a uniformly spaced X × Y grid over the domain. Candidate observer locations and observed locations are restricted to the same grid. For each observer-target pair, determine obstruction from the active domain characterization along the straight line joining the two locations. If multiple observer locations provide the same maximum visibility, select the location having the lowest terrain elevation.
DOMAIN CHARACTERIZATION

Unchecked = weights generated by the Training section. Checked = frozen example/book weights.

Weight source
FEATUREACTIVE WEIGHTGENERATEDBOOK WEIGHTS
RESULTS OF GENERATION LOOP
Observer locations evaluated—
Maximum visible grid points—
Percentage visible—
Best observer X—
Best observer Y—
Best observer Z—

ObserverGrid iGrid jXYZVisible PointsVisibility %Best So Far
LLM PROMPT GENERATOR
INHERITED FROM INFERENCE
Grid:
Domain Resolution:
Weight Source:
Domain Characterization:

TERRAIN CONTOURS AND LINE-OF-SIGHT VISIBILITY
Contours show the active domain characterization. Click any grid point to make it the observer. Green points are visible from that observer; red points are not visible in the chosen mode.
Chosen Mode—
Weight Source—
Grid20 × 20
Observer—
Chosen-Mode Visible Points—
Chosen-Mode Visibility—
HIGH-RES Visible Points—
HIGH-RES Visibility—
Inspect terrain height: Click any grid point to make it the observer and display the terrain height at that point. The height label disappears after 7 seconds.
Terrain contour
Visible grid point
Not visible grid point
Observer
↑Uphill direction

Visualization is a display utility only. It does not participate in training, candidate evaluation, observer selection, or the generation loop.

Clicking changes only the visualization observer; it does not change the best observer selected by the generation loop.

For convenience, RE-GEN NOISE is also available here when LOW RESOLUTION uses GENERATED WEIGHTS. It retrains TIM with a fresh noise realization and regenerates the visibility result.

DOCUMENTATION
TIM — TINY INFERENCE MODEL — LINE-OF-SIGHT REUSE
This file preserves TIM's training, domain characterization, and generic generation-loop architecture. The route-finding prompt is replaced by a maximum line-of-sight coverage prompt to demonstrate reuse of the same frozen domain characterization for a different inference problem.

Purpose

The Training page is unchanged from TIM. Recursive Least Squares estimates the same nine-weight learned domain characterization from noisy observations of the Himmelblau surface.

Nine-term encoding

[1, x, y, x², xy, y², x³, x²y, xy²]

The x⁴ and y⁴ terms present in the true Himmelblau surface are deliberately omitted. The learned surface is therefore a compressed approximation rather than an exact representation of the environment.

Purpose

The Inference page uses the same domain characterization and the same generic generation-loop structure as TIM, but with a different prompt: find the grid location that provides maximum line-of-sight coverage.

Prompt

Use a user-specified X × Y uniformly spaced grid over −5 ≤ x ≤ 5 and −5 ≤ y ≤ 5. Candidate observer locations and observed locations are restricted to those grid points. For each observer-target pair, the active domain characterization is evaluated along the straight line joining the two locations to determine whether terrain blocks the line of sight. If several observer locations have the same maximum visibility, choose the one with the lowest terrain elevation.

Line-of-sight rule

For each observer-target pair, parameterize the straight line between them and compare the terrain height supplied by the selected domain characterization with the height of the straight line of sight. LOW RESOLUTION uses the nine-parameter polynomial; HIGH RESOLUTION uses the exact Himmelblau function. The grid determines observer and target locations, not the terrain between them.

Generation loop

  1. Generate the next candidate observer from the X × Y grid.
  2. Evaluate visibility from that observer to every other grid point.
  3. Count the visible points.
  4. Compare the result with the best observer found so far; on a visibility tie, prefer the lower terrain elevation.
  5. Incorporate the result into the current state and repeat until all candidate observer locations have been evaluated.

Purpose

The LLM Prompt Generator expresses the same line-of-sight inference problem as a complete natural-language specification that can be submitted to a general-purpose LLM with numerical code execution.

What is inherited from Inference

The generator inherits the X × Y grid specification, Domain Resolution, Weight Source, and Domain Characterization.

Using the result

Select COPY PROMPT and submit the copied text to an LLM. The resulting observer table and selected maximum-visibility location can be compared directly with TIM's deterministic result.