# Method: Morris Water Maze Analyzer (method version 1.0.0)

## Calculation

From each trial's tracked positions (x, y in cm, time in seconds):

1. **Latency** = time stamp of the last position.
2. **Path length** = sum of straight-line distances between consecutive positions. **Swim speed** = path length / latency (0 when the latency is 0).
3. **Quadrant time** = % of sampled positions in each quadrant, split at the pool center (diameter / 2 on both axes).
4. **Platform crossings** = entries into the platform zone (within the platform radius of its center); a trial that starts inside the zone counts one.
5. **Gallagher proximity** = mean distance from the platform center over the sampled positions, the proximity measure of Gallagher et al. (1993); not computable for a trial without positions.
6. **Search strategy** (fixed rules, checked in this order):
   - **direct**: more than 60% of moves point within 15° of the platform, and the latency is under 21 s (35% of 60 s);
   - **focal**: more than 80% of positions lie within two platform radii of the platform, and more than 60% in the target quadrant;
   - **scanning**: more than 60% of positions lie in the target half, the target quadrant and the next one in label order (NE with NW, NW with SW, SW with SE, SE with NE);
   - **random**: anything else, and any trial with fewer than five positions.
7. **Group statistics** per group and day: mean, standard deviation (n − 1 denominator) and SEM = SD / √n.

## Conventions

- Coordinates are in cm with the pool inside [0, diameter] on both axes and y increasing downward, so NE is x ≥ center and y < center. A position on the north–south line counts as east (NE or SE), and one on the east–west line counts as south (SW or SE).
- Quadrant time and proximity count positions, so they assume a constant sampling rate.
- Moves shorter than 0.1 cm are not scored for heading but still count in the 60% denominator.
- The strategy thresholds are working heuristics of this tool, not a published classification scheme.
- The default pool is 150 cm across, with a 7.5 cm platform radius centered at (112.5, 37.5) in the NE quadrant.

## Worked examples

Four cases in `cases.json`, each worked analytically on the default pool: a direct swim onto the platform, two separate entries into the platform zone, the latency and speed of the direct swim, and a trial with no positions, whose proximity is not computable (edge case).

## References

- Morris R. Developments of a water-maze procedure for studying spatial learning in the rat. Journal of Neuroscience Methods. 1984;11(1):47-60. https://doi.org/10.1016/0165-0270(84)90007-4
- Gallagher M, Burwell R, Burchinal M. Severity of spatial learning impairment in aging: development of a learning index for performance in the Morris water maze. Behavioral Neuroscience. 1993;107(4):618-626. https://doi.org/10.1037/0735-7044.107.4.618
- Vorhees CV, Williams MT. Morris water maze: procedures for assessing spatial and related forms of learning and memory. Nature Protocols. 2006;1(2):848-858. https://doi.org/10.1038/nprot.2006.116

## Changes from the page before this record

- A trial without positions had a proximity of 0, the best possible score. It is now not computable (shown as "—" and left out of group statistics). Other calculations are unchanged; the code moved to a shared module.
- The method note said the strategy classifier used "path efficiency thresholds based on published criteria". It uses heading error and zone dwell only, with thresholds this tool chose; the note now lists them.
