# Find a room from echoes One simulated click supplies four unlabeled first-order echo times. Compatible rectangular layouts appear together. Drag the co-located speaker and microphone to compare a second observation. Each move replaces that second observation; the first stays fixed. Visited-location tint is a memory of counts, not accumulated evidence. ## Geometry and inference Coordinates use right/up as positive. A rectangle is `[left, right, bottom, top]`; walls follow known axes. For a co-located speaker/microphone at `(x,y)` inside it: ``` d = [x-left, right-x, y-bottom, top-y] t = sort(2*d/343) # seconds ``` These are single-bounce returns referenced to emission time. The forward simulator knows the hidden room to generate observations. The inverse receives only the positions and sorted times, without wall labels or the hidden room. At the first position `(x0,y0)`, calculate `d_i = 343*t_i/2`. For every unique permutation `(a,b,c,d)` of the distances, create `[x0-a, x0+b, y0-c, y0+d]`. Four distinct distances yield `4! = 24` layouts, including rotations and reflections relative to the known axes and starting point. They are not 24 different room shapes. Equal distances reduce the number of unique assignments. At the second position, discard candidates that do not contain it. Compare sorted predicted times with sorted measured times, accepting when the largest absolute difference is at most `1e-10` seconds. Sorting supplies the best pairing for this one-dimensional absolute tolerance. The epsilon absorbs floating-point roundoff; it is not a model of measurement error. Default hidden room: `[-2,1.2,-4.4,3.1]` metres. First distances are `[1.2,2,3.1,4.4]` m; returns are `[6.9970845,11.6618076,18.0758017,25.6559767]` ms. At `(0.6,0)` there are two survivors; at `(0.6,0.6)` four; at `(0.6,0.25)` one. Counts come from enumeration. Straight motion preserves the mirror ambiguity across its travel direction. Equal diagonal motion can leave the two axes interchangeable. Accidental equalities can create additional ambiguity. ## Movement, memory and traces Movement is clamped to `[-0.8,0.8]²` m and rounded to centimetres. Every initial layout contains this area. Pointer movement snaps to an axis within 5.5 cm, or to an equal diagonal when the absolute coordinate magnitudes differ by less than 5.5 cm. This makes exact lines reachable with a finger; the visible coordinates are the actual coordinates passed to the simulator and solver. Keyboard and desktop sliders allow unsnapped centimetre positions. The labelled 150 px movement inset magnifies the dotted square in the room overview. Its grid spans 1.6 × 1.6 m, and the directly draggable dot uses that inset’s scale for actual coordinates. The small orange overview marker tracks the same position. Each pointer event records its measured position and survivor count. The inset tints those sampled places, with a small visual footprint so repeated samples join into trails. It does not prepaint unvisited failure lines or claim the whole tinted footprint was measured. Return to start keeps the trail and restores all original candidates. New room clears the trail and measurements. Seeded new rooms have distinct distances separated by at least 0.3 m; their `(0.6,0.25)` observation is checked for uniqueness. This selection serves a demonstration, not an estimate of success on arbitrary rooms. One shared time axis shows the first observation in black and the current one in orange. Their different spike heights make unchanged, overlapping returns visible. A spike selects a wall and a round-trip distance in the selected surviving hypothesis, not the hidden true room. Previous/next arrows inspect alternative hypotheses without changing measurements. The trace shows actual milliseconds. ## Slowed audio Audio keeps a 2 ms, 1.8 kHz Hann-windowed click, but multiplies each echo delay by 20. A quieter marker (gain 0.08) plays at 80 ms; four equal-gain returns (0.13 each) follow at `80 ms + 20*t`. The buffer extends beyond the final click. Fractional positions split samples between neighboring indices. Echo spacing is slowed, not the click pitch. No sound accompanies movement; movement, new room and page exit cancel pending or playing audio. The first explicit Send a click action also plays the first observation. Default echo spacing in this playback is about 93, 128 and 152 ms between returns. Exact coincident returns still merge. This is an illustration of arrival order, not material, distance attenuation, calibrated loudness or a full impulse response. Inference always uses continuous unslowed times. ## Scope and source package This is exact horizontal first-order geometry, not a scanner. Known axes, exact positions/times and four already isolated first reflections are assumed. Floor/ceiling, later reflections, obstacles, noise, uncertain movement and nonrectangular walls are omitted. No physical-room accuracy, RT60 or universal two-position uniqueness is inferred. `python3 package-inverse.py` builds a deterministic allowlisted source ZIP with the current inverse experiment, these notes and retained legacy assets. No review screenshots, browser profiles or author review results are included. The archive's source-download link becomes an included-source note. The forward experiment stays behind Versions, with a link back to the current experiment. Its three microphone invitations are removed. Legacy measurement HTML/JS/DSP remain directly addressable and unlinked, with their historical defects; they are not part of this revision’s activity or validation. ## Background sources - [Dokmanić et al., Acoustic echoes reveal room shape (2013)](https://pubmed.ncbi.nlm.nih.gov/23776236/): echoes at multiple microphones and the assignment problem. - [Shih & Rowe, Can a Phone Hear the Shape of a Room? (2019)](https://users.ece.cmu.edu/~agr/resources/publications/ipsn19-shih.pdf): moving-phone sensing with a fixed speaker and measurement uncertainty. - [Pyroomacoustics room documentation](https://pyroomacoustics.readthedocs.io/en/stable/pyroomacoustics.room.html): mirrored-source simulation. These are background links retained from the earlier version, not methods reproduced by this small exhaustive solver. The finite assignment argument is given above. This revision did not re-review the papers or test a physical room.