{"schemaVersion":"1.1.0","slug":"tool-y-maze-alternation-calculator","identifier":"csdata:tool-y-maze-alternation-calculator:1.0.0","title":"ConductScience Y-Maze Spontaneous Alternation Calculator: method and validation record","shortDescription":"The calculation behind ConductScience's free Y-maze spontaneous alternation calculator, with four worked examples that check it.","description":"Method and validation record for the free Y-Maze Spontaneous Alternation Calculator at conductscience.com/tools/y-maze-alternation-calculator. From each animal's sequence of arm entries, typed or read from a tracking export, the tool computes spontaneous alternation (entries into three different arms in a row, as a percentage of total entries − 2), same-arm returns and group statistics. Four hand-worked examples, on the definition in Kraeuter et al. (2019), cover a ten-entry sequence, a sequence with a same-arm return, tracking rows with a center zone, and two entries, which leave nothing to score. The record holds the calculation source files, the worked examples, a validation report with each file's SHA-256, and what changed on the tool page when the record was written.","creators":[{"name":"ConductScience","type":"Organization"}],"publishedAt":"2026-09-28","updatedAt":"2026-09-28","version":"1.0.0","doi":"10.55157/csd.tool.ymaze.2026.001","doiProvider":"Crossref","doiRegisteredAt":"2026-09-28T13:42:03Z","doiRegisteredLocalDate":"2026-09-28","doiRegistrationTimeZone":"America/New_York","doiVerifiedAt":"2026-09-28T14:13:26Z","access":"open","license":{"name":"MIT and CC BY 4.0"},"licenseLabel":"MIT (code); CC BY 4.0 (text, worked examples and reports)","rightsStatement":"The calculation source files in engine/ are released under the MIT License. The record text, worked examples and validation report are released under CC BY 4.0. Cite the record when you use the files.","subjects":["Research software","Method validation","Behavioral neuroscience","Learning and memory"],"methods":["Worked examples: each of the four cases gives its inputs, the expected outputs, the source and passage behind the expected answer, and the arithmetic. Expected answers are worked by hand from the published method, or from the tool's own rule where METHODS.md labels it a convention. Cases whose ids start with edge- test inputs at the limits of the method.","Check: each case was run in Node.js 24 through the tool's calculation source files, and every output was compared with its expected value, exactly or within the tolerance the case states. All four cases pass (validation-report.json), and ConductScience's test suite runs the same cases whenever the tool changes.","Fingerprint: the validation report gives the byte count and SHA-256 of each calculation file and of the files that ran the check, and engine/ holds those files, so anyone can rerun the cases and tell whether a later version of the calculation differs from this one."],"source":{"repository":"https://github.com/ConductScienceInc/csd-tool-y-maze-alternation-calculator","tag":"v1.0.0","commit":"ffb9baf0b1487df8bf0e6d51f7bdb450609f562a","releasedAt":"2026-09-28T13:12:34Z"},"basedOn":"https://conductscience.com/tools/y-maze-alternation-calculator","manifest":{"files":15,"bytes":25263,"sha256":"c0058195cbe98ed76b613334f2104dd0b161275d9394701805f5a9e3b14def1a"},"archive":{"entries":16,"bytes":14345,"sha256":"499d28574370662812456de257c5651a9043a9d867f02d3a5d1fc30f7652f917"},"files":[{"name":"tool-y-maze-alternation-calculator-record-1.0.0.zip","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/tool-y-maze-alternation-calculator-record-1.0.0.zip","mediaType":"application/zip","sizeBytes":14345,"sha256":"499d28574370662812456de257c5651a9043a9d867f02d3a5d1fc30f7652f917","description":"Complete frozen release: 15 source-manifest files plus MANIFEST.json."},{"name":"cases.csv","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/cases.csv","mediaType":"text/csv","sizeBytes":1879,"sha256":"dbf3b4671e2956f69fba2307779c8421e4e654b9e278bec89a5f08f75b25bb43","description":"The worked examples, one row each: what the case checks, the source of the expected answer, the expected outputs and whether the engine matched them."},{"name":"cases.json","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/cases.json","mediaType":"application/json","sizeBytes":3813,"sha256":"880d9d2672f2ece53188ece46bb8b227020123727219537692b68957ccf5e19b","description":"The worked examples in full: inputs, expected outputs, tolerances, source passage and the arithmetic behind each expected answer."},{"name":"validation-report.json","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/validation-report.json","mediaType":"application/json","sizeBytes":2318,"sha256":"0202497359a891c1972ce63fb8e7d117f08d461103347b01601518a6429fd939","description":"The engine's output for every case, pass or fail, with the byte count and SHA-256 of each calculation and harness file."},{"name":"data_dictionary.csv","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/data_dictionary.csv","mediaType":"text/csv","sizeBytes":472,"sha256":"96b57ee5185ffcccc5397d98673c42bbc53ff77cc7f676fe5789ef04a7648090","description":"Columns of cases.csv."},{"name":"README.md","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/README.md","mediaType":"text/markdown","sizeBytes":1851,"sha256":"88b866589ddc51e7b941ba9dc9b2b0bda913a3c748894eaaebf6b573fb287207","description":"What the tool computes, the files, and how to cite the record."},{"name":"METHODS.md","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/METHODS.md","mediaType":"text/markdown","sizeBytes":2774,"sha256":"9c07b74414816e09b2c67b59a87ce08032c0614244e2ec4a5ed81b24932439a3","description":"Formulas, input rules, conventions, references and what changed on the tool page."},{"name":"MANIFEST.json","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/MANIFEST.json","mediaType":"application/json","sizeBytes":2363,"sha256":"c0058195cbe98ed76b613334f2104dd0b161275d9394701805f5a9e3b14def1a","description":"Byte count and SHA-256 for every file in the source release."},{"name":"CITATION.cff","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/CITATION.cff","mediaType":"text/yaml","sizeBytes":433,"sha256":"16d2b9da9c7b7fe1f021e63bb68e8a3c3c5bef19b4b557ad3bd0985b098efb5a","description":"Citation metadata."},{"name":"LICENSE","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/LICENSE","mediaType":"text/plain","sizeBytes":1361,"sha256":"d2dca2297cc985f3577b9376fbf5a72231ac88be401776098486f6d1e8a4d87a","description":"MIT License for the calculation source files; CC BY 4.0 for everything else."},{"name":"deposit-receipt.json","url":"/data/records/tool-y-maze-alternation-calculator/1.0.0/deposit-receipt.json","mediaType":"application/json","sizeBytes":3063,"sha256":"b82f575d1b98be98f054ec00f16ee4bf45244e1b73e5aa9b943659d8e169f30f","description":"ConductScience verification and packaging receipt."}],"previewFile":"cases.csv","preview":{"columns":["id","title","source_type","expected","pass"],"rows":[["hand-worked-sequence","Ten arm entries with five spontaneous alternations","hand-worked","{\"entries\":10,\"possible\":8,\"alternations\":5,\"pct\":62.5,\"sameArmReturns\":0}","true"],["hand-worked-with-return","Six arm entries including one return to the same arm","hand-worked","{\"entries\":6,\"possible\":4,\"alternations\":2,\"pct\":50,\"sameArmReturns\":1}","true"],["hand-worked-tracking-rows","Tracking rows with a center zone and a return to the same arm","hand-worked","{\"entries\":4,\"possible\":2,\"alternations\":1,\"pct\":50,\"sameArmReturns\":1}","true"],["edge-fewer-than-three-entries","Two arm entries: no triplet to score","hand-worked","{\"entries\":2,\"possible\":0,\"alternations\":0,\"pct\":null,\"sameArmReturns\":0}","true"]]},"dataDictionary":[{"file":"cases.csv","description":"One row per worked example.","columns":[{"name":"id","type":"string","values":"e.g. hand-worked-sequence","description":"Case identifier; edge cases start with \"edge-\""},{"name":"title","type":"string","values":"","description":"What the case checks"},{"name":"source_type","type":"string","values":"hand-worked","description":"Where the expected answer comes from: published, hand-worked, analytic or cross-check"},{"name":"citation","type":"string","values":"","description":"Source of the method or the expected answer"},{"name":"locator","type":"string","values":"","description":"Section, formula or table of the source that the case relies on"},{"name":"expected","type":"JSON object","values":"null: not computable","description":"Expected outputs as JSON; null means not computable"},{"name":"pass","type":"boolean","values":"true, false","description":"true when every expected output matched the engine within the stated tolerance"}]},{"file":"cases.json","description":"The worked examples in full: inputs, expected outputs, tolerances, source passage and the arithmetic behind each expected answer.","columns":[]},{"file":"validation-report.json","description":"The engine's output for every case, pass or fail, with the byte count and SHA-256 of each calculation and harness file.","columns":[]},{"file":"engine/behavioral/tetragram.ts","description":"Calculation source (MIT). Spontaneous alternation count, turn bias and four-entry pattern (tetragram) statistics for arm-entry sequences.","columns":[]},{"file":"engine/behavioral/ymaze-metrics.ts","description":"Calculation source (MIT). Arm-entry sequences from typed input and tracking rows, and same-arm returns.","columns":[]},{"file":"engine/pilot-tools.ts","description":"Harness source (MIT). Slugs of the ten tools with validation records; the check accepts only these.","columns":[]},{"file":"engine/validation/run.ts","description":"Harness source (MIT). Runs one case: passes its inputs to the tool's adapter and compares each output with the expected value within the tolerance.","columns":[]},{"file":"engine/validation/tools/y-maze-alternation-calculator.ts","description":"Harness source (MIT). Adapter from a case's inputs to this tool's calculation, returning the outputs the cases check.","columns":[]},{"file":"engine/validation/types.ts","description":"Harness source (MIT). Types for cases, tolerances and results.","columns":[]}],"citation":"ConductScience. (2026). ConductScience Y-Maze Spontaneous Alternation Calculator: method and validation record (Version 1.0.0) [Data set]. ConductScience Data. https://doi.org/10.55157/csd.tool.ymaze.2026.001","relatedResearch":[{"title":"ConductScience Y-Maze Spontaneous Alternation Calculator (live tool)","url":"https://conductscience.com/tools/y-maze-alternation-calculator","relation":"Documents"},{"title":"Kraeuter, Guest and Sarnyai (2019). The Y-Maze for Assessment of Spatial Working and Reference Memory in Mice","url":"https://doi.org/10.1007/978-1-4939-8994-2_10","relation":"Reference source"}]}