Repository navigation
Third study: the critical point, 2D Ising and site percolation against exact results (#20) - #32
Conversation
critical/model.js runs a 2D Ising lattice (Wolff clusters, seeded xoshiro128**, Ferrenberg-Swendsen reweighting, jackknife errors) and site percolation (Newman-Ziff union-find with the binomial convolution). tests/critical.mjs checks it against the exact results: Onsager's T_c and energy, Yang's magnetisation, beta/nu, gamma/nu, eta and nu, the exponential correlation length above T_c, the Binder cumulant at T_c, p_c = 0.592746 and the spanning cluster's 91/48. critical/table.mjs prints every number in critical/README.md. The README gets a third-study section, a closing paragraph in the opening section on tuned scale invariance against self-organised ranges, a Run-it line and a sources sub-list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfgH6WcwTueUFZKb6fS2s2
zero-aska
left a comment
There was a problem hiding this comment.
Independent review of commit 41b4ab8. Separate agent instances that did not draft the branch wrote it. There were four reviewers (physics; statistics and tests; citations and prose; code) and refuters for each finding (two for blocking ones). All four lenses returned.
What was verified
Physics
- I recomputed the exact values independently:
- T_c.
- Yang's M at T = 2.0-2.2. The 0.21% claim holds.
- Onsager's energy at all 8 temperatures, to 1e-6.
- The exponential ξ above T_c (10.23 to 1.10) and below it (2.19, 3.61, 9.11).
- A = 1/(4K_c) is the exponential amplitude. The test at t = 1e-6 tells it apart from the second-moment amplitude.
- The measured ξ is the exponential one. A 40000-sweep rerun at T = 2.4 gives 10.216 ± 0.065 against 10.228. At T = 4 the Monte Carlo gives 1.11, where a second-moment length would be about 0.5.
- U* = 0.6106924 and the L^-11/4 approach of the Binder crossings are correct. The model's χ at T_c agrees with Caselle et al. 2002's exact torus values: 41.8 against 41.4 at L = 8, 137.6 against 139.6 at L = 16, and the extrapolations up to L = 128.
- Percolation: p_c, the Ziff-Newman crossing shifts (+0.0004 and +0.0001) and D = 91/48 are right. The shortfall in D is a finite-size effect: local slopes keep rising toward 1.896 for L up to 1024.
- The measurement trap is real. The until-N rule size-biases the last cluster (mean 191 against 139.4 = χ_16), so ordered states are over-weighted.
- The 3D Ising values (Kos et al. 2016), the critical point of water (NIST), the Goldstone caveat, K41 and Planck's n_s all match their sources.
Statistics and tests
- Output is byte-identical on Node 18, 20 and 22 apart from the runtime line. xoshiro128** matches the reference C over 1e6 outputs. A NaN central value fails its check, and any failure exits 1. tests/critical.mjs takes about 19-22 s.
- The 120-seed repeat reproduces exactly: 119 sets pass, and k = 52 misses the L = 64/128 crossing by 0.0003. Every quoted Ising seed scatter reproduces, and so does the +0.0015 γ/ν offset.
- The jackknife errors are calibrated: seed scatter over mean jackknife error is 0.92-1.12. Autocorrelation times are 1-2.3 measurements. The reweighting window moves ⟨e⟩ by less than one standard deviation. Fixed-count U matches the exact 8x8 transfer-matrix value (0.61311 ± 0.00017 against 0.613045).
Citations and prose
- All 23 Crossref DOIs match field by field. The NIST DataCite DOI resolves, and all 13 arXiv IDs resolve to the cited papers.
- Quoted values and section numbers were checked against the LaTeX of these papers:
- Caselle et al. 2000 and 2002
- Salas & Sokal
- Pelissetto & Vicari
- Fujimoto & Otsuka (eq. A44)
- Lawler, Schramm & Werner
- Kos et al.
- Anchors resolve, the README additions follow the repo format, and the PR merges cleanly with #29.
Code
- Exact enumeration of L = 2-4 lattices agrees within 1.6 sigma with the Wolff update, the reweighting and the Newman-Ziff percolation code.
- Every number in critical/README.md and in README.md's third study matches the output of critical/table.mjs. The 30 checks split into 6 closed-form and 24 Monte Carlo checks, as stated.
Blocking findings
- tests/critical.mjs:138-139 (also tests/critical.mjs:7-8 and 11-12, critical/README.md:109-114, and the PR body).
- Who raised it: the statistics, citations and code reviewers, each on their own. All five refuters upheld it, four of them as blocking.
- The problem: the L = 32/128 p_c crossing shares the 0.0025 tolerance. Its text says "3 sigma + 0.0005" with sigma 0.0007, which comes to 0.0026, not 0.0025.
- Unrounded figures:
table.mjs scatterprints a scatter of 0.00072 and a shift of +0.00053. On those, the tolerance is only 2.7 sigma after the shift. - What it contradicts:
- The stated rule: "3 to 5 standard deviations ... plus any known finite-size shift".
- The header and README, which name γ/ν (about 3 sigma) and the 64/128 Binder crossing (3.5 sigma) as the tightest checks. This check is tighter than both.
- Why it is not a wrong result: the check passes (off by 0.00119) and cannot flake, because the seeds are fixed. What is wrong is a stated number.
- Fix: give the 32/128 crossing a tolerance of 0.0028. That is 3.2 sigma after the shift.
- The 64/256 crossing can keep 0.0025, or share 0.0028 at 4.7 sigma.
- Do not share 0.003, which puts 64/256 at 5.1 sigma.
- Alternatively, keep 0.0025, restate it as "about 2.7 sigma + 0.0005", add it to the tightest-checks sentence, and qualify the 3-to-5 rule in all three places.
Non-blocking findings
Wording and evidence in the text
- critical/README.md:35, 172-173. "Miss T_c by 6% and the nesting ends at ten lattice spacings" holds only above T_c. At 6% below, ξ is 4.5. Say "6% above", give the below-T_c figure, and keep "76%" tied to "above".
- critical/README.md:129-131 (also :28, README.md:333, PR body). The evidence quoted for "the slope still rises with size" does not show it.
- It is one seed's two overlapping fits, only 1.8 sigma apart on a paired jackknife. That seed shows no rise above L = 64.
- The claim itself is true. Over the eight scatter seeds, local slopes average 1.862 (L = 32-64), 1.875 (64-128) and 1.884 (128-256). Dropping L = 32 raises the fit in every seed, by 0.006 ± 0.001.
- Print these from
table.mjs scatterand quote them. - Do not quote a single L = 512/1024 run. Across six seeds, 256-512 averages 1.879 ± 0.009.
- Reword the PR body's "measured over eight seeds" so it refers to the shortfall.
- tests/critical.mjs:86-92, 115-116. Salas & Sokal's B4 = -0.48 ± 0.23 comes from a fit with Δ free (2.01 ± 0.22). The text applies it with L^-7/4, which roughly doubles the shifts.
- Quote the measured L = 16 shift instead: +0.0007, from S&S's V4(16) = 1.16586(38).
- Then either use an amplitude fitted for L^-7/4 (about -0.27 to -0.35, from the exact 8x8 torus or Caselle's D0) or state the Δ.
- The crossing shifts then become about 1e-4 and 2e-5. The tolerances can stay.
- critical/README.md:114, tests/critical.mjs:12 and 102. The γ/ν finite-size bias "+0.0015" is the 120-seed mean (+0.0015 ± 0.0004). Caselle et al. 2002's exact torus χ_L gives +0.0012. Use +0.0012 and name the source, or say where +0.0015 comes from. "About 3 sigma" is unchanged either way.
- tests/critical.mjs:140 (critical/README.md:124). The text says the 64/256 crossing shows "no detectable shift". The 120-seed repeat detects +0.00015 ± 0.00004, which matches the Ziff-Newman +0.0001 the README predicts. Say the shift is about +0.0001, too small for eight seeds to resolve.
- tests/critical.mjs:9-10, critical/README.md:111-112. "The jackknife error matches the scatter between seeds to within about 10%" is true on average over 120 seeds. This seed's errors at T_c, though, are 7-20% below the scatter. Say so, but do not reword it as a systematic underestimate. (This was raised as blocking; both refuters downgraded it.)
- critical/model.js:133-134, critical/README.md:149. Only the one-particle part of the row-summed correlation is exactly cosh((L/2 - r)/ξ). Three-particle states bias the fit from r = 1 by -0.09% at T = 2.4, and by under 0.01% from T = 2.75 up. Say so.
- critical/README.md:180-181, README.md:338-339. n_s = 1 is "scale-invariant", which is Planck's term. By the study's own definition, any power law is "scale-free". Reword.
- critical/README.md:193-195, 235. The anisotropy gap is not in P&V sec. 5 or 1.6.2. It is in sec. 11.3, and it holds in 3D. In 2D, anisotropy of sixfold or higher symmetry keeps a critical phase over a temperature window (José et al. 1977). Cite sec. 11.3 and scope the sentence to three dimensions.
- critical/README.md:61-62, critical/model.js:29. den Nijs 1979 gave the thermal exponent. 5/48 follows from that and Nienhuis-Riedel-Schick's magnetic exponent through scaling relations, as LSW say. Write "follows from exponents predicted by".
- critical/README.md:72, 226, 240 and the PR body. The PR body says every formula from a paywalled paper was checked against an open source, but the Wolff and Ferrenberg-Swendsen formulas name none.
- The Wolff add probability is in Fujimoto & Otsuka 2020, appendix B. Cite it.
- For Ferrenberg-Swendsen, cite a source, or say the weight is standard and the Monte Carlo checks validate it.
- Correct the PR body.
- critical/table.mjs:1 and the PR body. "Prints every number in critical/README.md" claims too much. No script prints the 120-seed repeat figures, the Ziff-Newman shifts or the 11%. Reword it. Optionally, add an opt-in seeds mode.
- README.md:241-242. The index sentence in the Checks section does not point to the new study's checks. Add critical/README.md#what-it-reproduces.
- critical/README.md:231, README.md:405, PR body. Three small fixes:
- The NIST WebBook entries have no year, while README.md:374 has one. Add a date.
- 52 prose lines in critical/README.md run to 116-119 characters. Rewrap them to 115.
- The PR body says DOIs were checked against Crossref, but the NIST DOI is a DataCite one. Fix the sentence.
Tolerances
- tests/critical.mjs:141-143. The D tolerance of 0.05 is 5.2 sigma plus the shift, measured by the eight-seed scatter. That is outside the stated 3 to 5.
- The tolerance is also symmetric about 91/48, so the high side allows about 8-10 sigma. A mass measured at p = 0.595 still passes.
- Fix with any of these: use 0.045; bound the two sides separately (91/48 - 0.05 ≤ D ≤ 91/48 + 0.03); or state the margin on the high side.
- tests/critical.mjs:12, 92, critical/README.md:114. The header and README call the L = 64/128 crossing tolerance "about 3.4 sigma", but the check text says 3.5 (0.007/0.0020). Use 3.5 everywhere.
Code
- critical/model.js:216-220. xiFromProjected returns NaN once L/2 - r2 > 35.5, for example at L = 128, T = 2.5. The cause is that cosh overflows at the top of the bisection bracket. Shipped sizes are unaffected. Fix: use an overflow-safe log cosh, lc(y) = |y| + log1p(exp(-2|y|)) - ln 2.
- critical/model.js:175, 294, 298-301. gridValue assigns samples to blocks by floor(tB/n), but it subtracts counts using block()'s floor(bn/B) bounds. Its jackknife is therefore wrong when the sample count is not a multiple of the block count. Shipped plans are multiples of 40. Fix: make block() use Math.ceil.
- tests/critical.mjs:31, 39. near() and nearRel() pass on a finite value even when the jackknife error is NaN. Require Number.isFinite(est.err).
- critical/model.js:125-132, 159. simulate({half: true}) silently gives NaN for odd L. Throw a RangeError for odd L.
- critical/model.js:38, critical/table.mjs:45, 100. PERC.oneArm and PERC.pcErr are unused, while table.mjs writes 5/48 by hand. Use PERC.oneArm. Optionally, remove the unused accumulators (masses().spans and the return value of flips()).
- .github/workflows/test.yml:30-33. CI runs every other "Run it" script but not critical/table.mjs. Renaming a model field breaks the table while the tests stay green. Add
node critical/table.mjs, or say in the README that CI does not run it.
Refuted
- The percolation seed is "2.4-2.7 sigma out, not about 2". Refuted. A fresh 240-seed family and a delta-method estimate both put the scatter at about 0.00055; the 120-seed figure of 0.00048 was a low draw. That puts the seed 2.3 sigma from p_c. Writing ± 0.0005 is an optional nit.
- "The same numbers in the short answer" covers the 0.9-1.6% size-ratio errors. Refuted. Those are not table numbers, and the next sentence lists the size ratios as unchecked.
Verdict: do not merge until the L = 32/128 p_c-crossing tolerance at tests/critical.mjs:138-139 and the "3 to 5 standard deviations" and "tightest checks" statements it contradicts are fixed
Generated by Claude Code
|
Independent review verdict, relayed from amp-vela via A: do not merge until the p_c tolerance is fixed. What the test output shows: both spanning-probability crossings sit above Newman and Ziff's 0.59274621 by about 0.0012 (0.59394 and 0.59404), in the same direction. The checks pass, but the tolerance leans on the model's own seed-to-seed scatter plus an open-edge shift term. The tolerance needs rework before this lands.
|
|
Agreed. Our own independent review reached the same verdict on this tolerance (#32 (review)). Your point goes further: a single seed can't tell a ~0.0012 bias from a ~2σ fluctuation, and both crossings lean the same way. The rework, coming in the next push:
The other findings from our review land in the same push, followed by a fresh independent re-review before any merge. Generated by Claude Code |
The L = 32/128 p_c crossing gets its own tolerance (0.0028, 3.2 sigma after its +0.0005 open-edge shift), and the tolerance policy is stated so that every check's sigma count follows it; D and the L = 16 Binder cumulant are bounded on each side. Finite-size shifts now come from measured values (Salas and Sokal's V4(16); Caselle et al.'s exact torus chi_L for gamma/nu) rather than an amplitude fitted with a free exponent. `table.mjs scatter` prints the D slopes between successive sizes over eight seeds, which the text now quotes. Wolff's bond probability and the reweighting weight are checked against open sources; the anisotropy caveat cites Pelissetto and Vicari sec. 11.3 and is scoped to three dimensions. Code: overflow-safe ln cosh, one block convention for the jackknife, checks fail on a non-finite error, a RangeError for odd L with half: true, dead code removed. Wording: "6% above T_c", "nearly scale-invariant", reproducibility statements, CI note, rewrap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfgH6WcwTueUFZKb6fS2s2
A single seed's spanning-probability crossings sat about 0.0012 above p_c, and its tolerance leaned on that seed's scatter (review comment on #32). The percolation runs now use nine independent seeds (the study seed and the eight of the former 'scatter' mode), and the checks test their mean against its standard error with fixed tolerances. The 64/256 crossing averages 0.59292 +- 0.00023, 0.00017 above p_c, against Ziff and Newman's open-edge shift of +0.00012; any offset beyond +0.0010 fails. The 32/128 crossing is checked more loosely, as its shift is 2^(7/4) times larger. D moves to the pooled runs, 1.8798 +- 0.0020, bounded at -0.024/+0.008. A closed-form check confirms the shift formula reproduces Ziff and Newman's coefficient. 'node critical/table.mjs' prints the pooled results; 'scatter' still works as an alias. npm test grows by about 44 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfgH6WcwTueUFZKb6fS2s2
|
The pooled p_c check is in 3afd71c.
A fresh independent review of 3afd71c is running, and nothing merges before it passes. If your team wants to re-check the p_c part, these are the commits. Generated by Claude Code |
zero-aska
left a comment
There was a problem hiding this comment.
Independent re-review of 3afd71c, after the fixes in d6a0adf and 3afd71c. The drafting session spawned separate agent instances that did not draft the branch and did not have its drafting context. Four reviewers covered physics, statistics and tests, citations and prose, and code. Every finding then went to a refuter (two refuters for any blocking finding).
What was verified
Physics
- The exact values were recomputed independently and every quoted value matches: T_c, Yang's M, the Onsager energy, and ξ above and below T_c (below T_c ξ = 2ξ*, Fujimoto-Otsuka eq. A44).
- The measured ξ is the exponential length. An exact transfer matrix on infinite strips reproduces the two-point fit to within 0.08%.
- The measurement-trap explanation is right. In until-N runs the last cluster is size-biased: at T_c, L = 16 it averages 191.4 against a mean cluster of 139.5. That gives U = 0.6288, against 0.6100 for the fixed-count runs.
- The finite-size shifts all recompute: the Binder L^-7/4 shift from Salas-Sokal's V4(16), the +0.0012 γ/ν bias from Caselle et al. 2002 sec. 7.2, and the Ziff-Newman open-edge shifts (+0.00040 and +0.00012).
- The model's percolation agrees with Ziff-Newman 2002 Table 1 at L = 32-256 to within about 1 sigma. So the single-seed +0.0012 was a fluctuation, and the 3afd71c fix is sound.
Statistics and tests
npm testpasses, including all 31 critical checks, on Node 18, 20 and 22. Locally and in CI, the output is identical apart from the runtime line. The generator matches reference xoshiro128** bit for bit.- Every Monte Carlo number in both READMEs reproduces, and so does every sigma count in tests/critical.mjs.
- The 120-seed repeats reproduce. For Ising, 119 of 120 sets pass; k = 52 misses one crossing by 0.0003. For percolation, all 13 disjoint nine-seed sets pass, and 3 or 4 of 200,000 random sets fail, all on D.
- The pooled p_c design is sound. The pool seeds were fixed in advance, and the 64/256 bound fails an observed +0.0012 offset.
Citations and prose
- All 24 DOIs (checked on Crossref) and all 14 arXiv IDs resolve to the cited papers, and their metadata matches the entries.
- Each quoted value and section number was checked in its source: NIST, Planck, Kos et al., Caselle et al., Salas-Sokal, Pelissetto-Vicari, Fujimoto-Otsuka, LSW and Ziff-Newman.
- Each "Not consulted directly" entry is used only for what an open source confirms. The anchors resolve, and the PR merges cleanly with current main (e13792c) and with #26.
Code
- Exact enumeration of small lattices agrees with the Wolff runs (periodic Ising, L = 2-4) and the Newman-Ziff runs (open percolation, L = 2-5) to within 1.2 sigma.
- These are correct: the jackknife blocks, the overflow-safe lnCosh (exact up to L = 2048), the reweighting (largest exponent 2.9), the binomial convolution and edgeShift.
- Every fix asked for in the review of 41b4ab8 is present and correct. No stale single-seed text survives.
Blocking findings
None.
Non-blocking findings
- critical/README.md:55-58 (physics). "At T_c the coarse lattice has the same statistics as the fine one" treats the nearest-neighbour lattice as if it were the fixed point. It actually lies on the critical surface and flows to the fixed point. The study measures that flow itself: the Binder shift, the γ/ν bias and the rise of D. Fix: limit the claim to large-scale statistics and put "details fade" right after it. For example: "At T_c the coarse lattice's large-scale statistics are those of the fine one; only the lattice-scale details differ, and they fade with every step, so repeated zooming out carries it to a fixed point."
- critical/README.md:143-144 and tests/critical.mjs:88-92 (physics). The open-edge check compares the formula with Ziff and Newman's 1.04. That value comes from the same b0 and a1, so the check only catches algebra slips. Fix: say that 1.04 is their prediction and that they measured 1.02, and keep the tolerance. Optionally, print the pooled crossings, R_L(p_c) and p_0.5 next to their Table 1, where all agree to within about 1 sigma. Then cite that agreement as the direct test.
- tests/critical.mjs:182-189 (statistics). The low-side shift for D, 0.016, is the checked runs' own deviation, so the low side passes by construction. Fix: take the shift from the independent 120-seed repeat instead. That gives 0.014 + 4 × 0.0026 = 0.024, the same bound. Then update the wording at tests/critical.mjs:9-10 and 185-188 and critical/README.md:120 and 166-169.
- tests/critical.mjs:22 and 188-189; critical/README.md:135 and 169-170 (statistics). "3.1 sigma on each side ... one of the tightest checks" is true only of the low side. The high bound, 1.9038, sits about 9 sigma above the expected value of about 1.880, so a bug that raised D by about 0.02 would pass. Fix: write "3.1 on the low side" and say the high side catches only gross errors. Optionally, cap the high side at 91/48.
- critical/README.md:153-154 (statistics). "Single seeds scatter by 0.0007" uses the nine-seed standard deviation, and the study seed inflates it at 64/256. Against the repeat's 0.0005, the study seed's 64/256 crossing is about 2.4 sigma high, not about 1.7. Fix: quote the scatter for each crossing: 0.0007 is right at 32/128, and 0.0005 (from the repeat) at 64/256. Call the 64/256 seed about 2.4 sigma high. Optionally, change "~2σ" in the PR body to "2 to 2.4σ".
- critical/README.md:89 (statistics, citations). "Identical values on Node 18 and 22" leaves out Node 20. Fix: write "on Node 18, 20 and 22".
- critical/README.md:8-11 (citations). The header says the trap cumulants are "compared with an exact value". The until-count value, 0.6289, is checked only against the fixed-count one. The header's list of unchecked numbers also leaves out p(R = 1/2) at L = 256. Fix: say the until-count cumulant is checked only against the fixed count, and add the R = 1/2 point to the unchecked list.
- PR description, "Merging with the open PRs" and "Checked" (statistics, citations). #25 and #29 had both merged before the body was last edited. The sentence about CORRECTIONS.md conflicts is false against e13792c, and CI on the merge ref runs 6 check files. Fix: restate both against e13792c. The PR merges cleanly with main and with #26, nothing conflicts, the head has 5 check files and the merge ref has 6.
- PR description, "Reviews so far" (citations). It points to exceptions listed in "that commit's notes", and no such notes exist. Fix: list the two exceptions in the body. José et al. 1977 is not cited; instead the sentence is scoped to 3D and cites P&V sec. 11.3. The opt-in 120-seed mode was not added.
- index.html:238 on main (citations). Once this PR closes #20, the site will still list "why repetition appears at all" as an open question and will not list this study. Fix in a follow-up: add the study, drop that open question, and correct line 236's stale "issue 16 tracks publication" at the same time.
Refuted:
- critical/README.md:221-223, the k^(n_s-1) wording. Refuted: it matches Planck 2018, and density contrasts on superhorizon scales and at horizon entry do scale as k^(n_s-1).
- The runtime of about 65 s. Refuted: the cost is stated in the commit, the PR body and both READMEs, and no budget is set anywhere.
- The 64/256 "rules out" wording at tests/critical.mjs:177. Refuted: the text refers to an observed mean, and the README already quantifies the exclusion as more than 4 standard errors.
- The hot-energy count, 3.6 against 3.5 sigma, at tests/critical.mjs:159-160. Refuted: under either convention the 64/128 crossing is still the tighter of the two, so the list of three tightest checks is right.
- The unused C field in correlationLength, critical/model.js:243. Refuted: the earlier review did not ask for its removal, and it is a correct diagnostic in an exported library function.
Verdict: merge
Generated by Claude Code
|
Merged after the independent re-review of 3afd71c, which found no blocking findings. I'm now preparing a follow-up PR with:
If your team is already editing that list, tell me here and I'll leave it to you. Generated by Claude Code |
…Newman's Table 1, and the site's studies list From the non-blocking findings of #32's independent re-review: - The lattice at T_c lies on the critical surface and flows to the fixed point; it is not the fixed point itself. - The 1.04 open-edge coefficient is Ziff and Newman's prediction from the same b0 and a1 (they measured 1.02), so that check catches algebra slips only. New: 'node critical/table.mjs' prints the nine-seed R(p_c), p where R = 1/2, and L/2-L crossings beside their Table 1 measurements on this same system (all eleven agree within 1.04 standard errors), and tests/critical.mjs checks p where R = 1/2 at L = 32 against their 0.5918352. - D: the low bound matches the independent 120-seed repeat's shortfall; the high side is said to guard only against gross errors, not to be among the tightest checks. - The study seed's 64/256 crossing is about 2.4 single-seed standard deviations from the shift. - Node 18, 20 and 22; the header's lists of checked and printed numbers. Site (index.html, #studies): the critical-point study is listed, quantum paths links its published study (#25), and "why repetition appears at all" leaves the open questions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XfgH6WcwTueUFZKb6fS2s2
Fixes #20. It follows the issue's first steps.
Status: the independent re-review of 3afd71c found no blocking findings (verdict merge), and CI is green on Node 18, 20 and 22. Its non-blocking findings go to a follow-up PR with its own review.
What is new
critical/model.js: a 2D Ising lattice and site percolation, with no dependencies.tests/critical.mjs: 31 checks, about 65 s.critical/table.mjs: prints the Monte Carlo numbers incritical/README.md, including each percolation seed and the mean. No script prints three kinds of number: the one-off 120-seed repeat's results, γ/ν's +0.0012 finite-size bias (worked out from Caselle et al. 2002), and the error-bar uncertainties.critical/README.mdnames them all.critical/README.md: the study.README.md:Results
p_c, after the other team's review. One seed's crossings sat about 0.0012 high, and one seed cannot tell that from a ~2σ fluctuation.
D is 0.8% low, a finite-size shortfall.
Tolerances. Each is a fixed number: 3 to 5 standard deviations of the noisiest estimate it covers, plus any finite-size shift.
Sources.
Merging. #25 and #29 have merged into main (e13792c). This PR merges cleanly with it and with #26, and
npm teston the merged tree passes all 6 check files.npm test. The README says CI does not runcritical/table.mjs, which repeats the tests' runs without checking them.Reviews
🤖 Generated with Claude Code
https://claude.ai/code/session_01XfgH6WcwTueUFZKb6fS2s2