simon-git: puzzles (main): Simon Tatham

Commits to Tartarus hosted VCS tartarus-commits at lists.tartarus.org
Sun Sep 21 21:40:34 BST 2025


TL;DR:
  6e8a892 Loopy: fix return type of penrose_relative_probability.

Repository:     https://git.tartarus.org/simon/puzzles.git
On the web:     https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer:      Simon Tatham <anakin at pobox.com>
Date:           2025-09-21 21:40:34

commit 6e8a89202cef96f141ed89d78948b556e6a00a3e
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=6e8a89202cef96f141ed89d78948b556e6a00a3e;hp=2376227855422b01ed36a1c9fa83739fce96053d
Author: Simon Tatham <anakin at pobox.com>
Date:   Sun Sep 21 21:27:54 2025 +0100

    Loopy: fix return type of penrose_relative_probability.
    
    This function had return type 'bool' instead of an integer type, which
    meant that the carefully skewed probabilities of higher-order Penrose
    tiles were being silently normalised to 1. This didn't affect
    correctness of any generated grid, but did mean that the Penrose
    tiling fragments weren't (as I intended) selected from the limiting
    probability distribution over the plane.
    
    With that fixed, random_upto started failing an assertion because I'd
    asked it to generate numbers with too high a limit. Fixed that by
    moving to two smaller Fibonacci numbers than the two I'd originally
    picked.

 penrose.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)



More information about the tartarus-commits mailing list