diff --git a/android/app/src/test/java/tv/orbit/classic/WeightedRolloutReplayTest.kt b/android/app/src/test/java/tv/orbit/classic/WeightedRolloutReplayTest.kt index 974c934f..5d49f74c 100644 --- a/android/app/src/test/java/tv/orbit/classic/WeightedRolloutReplayTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/WeightedRolloutReplayTest.kt @@ -231,4 +231,32 @@ class WeightedRolloutReplayTest { println(out) } + + /** + * Read-only (4 November 2026): the catalogue hybrid tried on ToonZ, Tots, Odyssey and Orbit Three, each as built + * against the same with weights scaled under 12 and 24 hours of episodes. Tots' Wind Down and Night stay on equal turns + * in every variant. Writes hybrid-comparison.txt. + */ + @Test fun hybridComparison() { + assumeTrue(dir != null && File(dir, "episodes-605.json").exists()) + val out = StringBuilder("Hybrid comparison: four weeks of new bookings after each committed plan, avoiding every other channel as the box does. Read-only.\n\n") + val baseline = SmartChannels.filter { File(dir, "schedule-${it.number}.json").exists() && File(dir, "episodes-${it.number}.json").exists() }.associate { p -> + p.number to replay(plan(File(dir, "schedule-${p.number}.json")), pool(File(dir, "episodes-${p.number}.json")), p, p.tierWeights?.let { p::weightOf }, keepCommitted = true) + } + for (number in listOf(605, TOTS_NUMBER, 202, 103)) { + val base = SmartChannels.first { it.number == number } + val committed = plan(File(dir, "schedule-$number.json")); val series = pool(File(dir, "episodes-$number.json")) + val others = clashesWith(baseline.filterKeys { it != number }.values.map { ChannelPlan(it, ScheduleCursor()) }) + val hours = series.associate { it.title to it.episodes.sumOf { e -> e.durationMs } / 3_600_000.0 } + out.appendLine("== ${base.name} ($number): ${series.size} shows; under 24 h of episodes: ${hours.filterValues { it < 24 }.keys.joinToString().ifEmpty { "none" }}") + for ((label, scale) in listOf("As built" to null, "Hybrid under 12 h" to 12.0, "Hybrid under 24 h" to 24.0)) { + val p = base.copy(catalogueScaleHours = scale) + report(label, replay(committed, series, p, p::weightOf, others), series, p, p::weightOf, others, out) + } + out.appendLine() + } + File(dir, "hybrid-comparison.txt").writeText(out.toString()) + println(out) + } + } diff --git a/docs/replays/hybrid-comparison-2026-11-04.md b/docs/replays/hybrid-comparison-2026-11-04.md new file mode 100644 index 00000000..e703ff94 --- /dev/null +++ b/docs/replays/hybrid-comparison-2026-11-04.md @@ -0,0 +1,38 @@ +# Catalogue hybrid for ToonZ, Tots, Odyssey and Orbit Three + +This is a read-only comparison from 4 November 2026, approved as read-only work by Paul at 10:33. Nothing is enabled. + +It covers four weeks of new bookings after each committed plan, on box copies taken at 10:36, with each channel avoiding every other channel as the box does. Each channel is compared as built against the hybrid, which scales a show's tier weight down when it has under 12 or under 24 hours of episodes. Tots' Wind Down and Night stay on equal turns in every variant. The full figures are in docs/replays/hybrid-comparison-2026-11-04.txt (WeightedRolloutReplayTest.hybridComparison). + +| Channel | Variant | Core airtime | Different episodes | Same file within 7 days | Longest wait | +|---|---|---|---|---|---| +| ToonZ | as built | 58% | 1,584 | 981 | 1.8 d | +| | **hybrid 24 h** | **70%** | **1,843** | **0** | 2.2 d | +| Tots | as built | (no tiers) | 1,767 | 642 | 9.9 d (bedtime, equal turns) | +| | **hybrid 24 h** | | **1,974** | **431** (the rest are Wind Down and Night, unchanged) | 9.8 d (bedtime) | +| Odyssey | as built | 69% | 569 | 235 | 21 d (Journeys, weekends only) | +| | **hybrid 24 h** | **72%** | **706** | **0** | 21 d (Journeys) | +| Orbit Three | as built | 51% | 853 | 219 | 4.1 d | +| | **hybrid 24 h** | **54%** | **913** | **0** | 6.0 d (surprises) | + +In every variant: +- no file aired again within 24 hours in a weighted block +- no in-order show stepped back, and no shuffled show left its deck +- there were no gaps and nothing outside its block +- no show aired twice running where its block had a choice +- nothing went unaired + +The hybrid at 12 hours lands in between on every channel. + +## What it shows + +On all four channels the 24-hour hybrid is clearly better: +- **Weekly repeats:** they disappear on ToonZ, Odyssey and Three. On Tots they fall by a third; the rest are the bedtime blocks, which you chose to leave on equal turns. +- **Variety:** different episodes over four weeks rise by 7% to 24%. +- **Core:** representation rises or holds: ToonZ 58% to 70%, Odyssey 69% to 72%, Three 51% to 54%. +- **Starvation:** nothing goes unaired. The longest waits are the same, except Three's surprise shows, which go from at most 4 to at most 6 days apart. +- **Unchanged:** ToonZ's teatime trio keeps its own block weights, and Tots' Wind Down and Night keep their rule. + +## Recommendation + +Enable the 24-hour hybrid on all four in one isolated scheduler release, with the usual checks. diff --git a/docs/replays/hybrid-comparison-2026-11-04.txt b/docs/replays/hybrid-comparison-2026-11-04.txt new file mode 100644 index 00000000..f1d30c0a --- /dev/null +++ b/docs/replays/hybrid-comparison-2026-11-04.txt @@ -0,0 +1,136 @@ +Hybrid comparison: four weeks of new bookings after each committed plan, avoiding every other channel as the box does. Read-only. + +== ToonZ (605): 17 shows; under 24 h of episodes: Tom and Jerry, Scooby-Doo, Where Are You!, The Yogi Bear Show, Wacky Races, Top Cat, Hong Kong Phooey, The Huckleberry Hound Show, The Looney Tunes Show, Dastardly & Muttley in Their Flying Machines, The Pink Panther, Danger Mouse, Bananaman + As built: 3656 programmes + airtime by tier: core 58%, supporting 42%, surprise 0% + block 0-6: core 51%, 17 shows, effectively 16.3 equal shows; top The Flintstones 7%, The Jetsons 7%, Scooby-Doo, Where Are You! 7% + block 10-16: core 60%, 14 shows, effectively 13.5 equal shows; top Scooby-Doo, Where Are You! 9%, The Flintstones 9%, Looney Tunes 9% + block 16-18: core 70%, 10 shows, effectively 10.0 equal shows; top The Jetsons 10%, Count Duckula 10%, The Flintstones 10% + block 18-0: core 60%, 14 shows, effectively 13.5 equal shows; top The Jetsons 9%, The Yogi Bear Show 9%, Scooby-Doo, Where Are You! 9% + block 6-10: core 60%, 14 shows, effectively 13.5 equal shows; top The Flintstones 9%, The Jetsons 9%, The Yogi Bear Show 9% + repeats: 1584 different episodes; same file again within 24 h 0, within 7 days 981, median 7.3 days between repeats + starvation: never aired none; longest waits Danger Mouse 1.8 d, Count Duckula 1.5 d, Top Cat 1.1 d, Hong Kong Phooey 0.8 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 12 h: 3588 programmes + airtime by tier: core 63%, supporting 37%, surprise 0% + block 0-6: core 57%, 17 shows, effectively 14.9 equal shows; top The Jetsons 9%, Scooby-Doo, Where Are You! 8%, Popeye the Sailor 8% + block 10-16: core 65%, 14 shows, effectively 12.5 equal shows; top The Jetsons 10%, Scooby-Doo, Where Are You! 10%, The Flintstones 10% + block 16-18: core 69%, 10 shows, effectively 9.9 equal shows; top Count Duckula 10%, The Flintstones 10%, Danger Mouse 10% + block 18-0: core 65%, 14 shows, effectively 12.5 equal shows; top Looney Tunes 10%, Scooby-Doo, Where Are You! 10%, The Jetsons 10% + block 6-10: core 65%, 14 shows, effectively 12.5 equal shows; top The Flintstones 10%, Scooby-Doo, Where Are You! 10%, Looney Tunes 10% + repeats: 1661 different episodes; same file again within 24 h 0, within 7 days 422, median 8.8 days between repeats + starvation: never aired none; longest waits Count Duckula 1.5 d, Dastardly & Muttley in Their Flying Machines 1.4 d, Danger Mouse 1.3 d, Hong Kong Phooey 1.1 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 24 h: 3580 programmes + airtime by tier: core 70%, supporting 30%, surprise 0% + block 0-6: core 62%, 17 shows, effectively 12.8 equal shows; top The Jetsons 11%, Looney Tunes 11%, Popeye the Sailor 11% + block 10-16: core 73%, 14 shows, effectively 10.5 equal shows; top The Jetsons 13%, The Flintstones 13%, Popeye the Sailor 13% + block 16-18: core 66%, 10 shows, effectively 9.5 equal shows; top The Flintstones 12%, Popeye the Sailor 12%, Danger Mouse 11% + block 18-0: core 73%, 14 shows, effectively 10.6 equal shows; top The Flintstones 13%, Looney Tunes 13%, Popeye the Sailor 13% + block 6-10: core 73%, 14 shows, effectively 10.6 equal shows; top Looney Tunes 13%, The Jetsons 13%, The Flintstones 13% + repeats: 1843 different episodes; same file again within 24 h 0, within 7 days 0, median 9.1 days between repeats + starvation: never aired none; longest waits Dastardly & Muttley in Their Flying Machines 2.2 d, Danger Mouse 1.5 d, Top Cat 1.3 d, Count Duckula 1.3 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + +== Tots (614): 36 shows; under 24 h of episodes: Balamory (2026), Bluey (2018), Numberblocks, Andy's Wild Adventures, Andy's Dinosaur Adventures, Andy's Baby Animals, Something Special, Ben and Holly's Little Kingdom, Paw Patrol, Digby Dragon, Floogals, Blaze and the Monster Machines, Roary the Racing Car, Noddy's Toyland Adventures, Bananas In Pyjamas, Angelina Ballerina, Olivia, Mr Men, Octonauts, CBeebies Bedtime Stories, Clangers, BeddyByes + As built: 3047 programmes + airtime by tier: core 0%, supporting 100%, surprise 0% + block 17-21: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 75%, Clangers 10%, CBeebies Bedtime Stories 10% + block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 74%, Clangers 11%, CBeebies Bedtime Stories 9% + block 6-9: core 0%, 9 shows, effectively 9.0 equal shows; top Teletubbies 11%, Andy's Wild Adventures 11%, Bluey (2018) 11% + block 9-17: core 0%, 32 shows, effectively 32.0 equal shows; top Rusty Rivets 3%, Something Special 3%, Nella the Princess Knight 3% + repeats: 1767 different episodes; same file again within 24 h 6, within 7 days 642, median 7.0 days between repeats (within 24 h in weighted blocks: 0) + starvation: never aired none; longest waits BeddyByes 9.9 d, Clangers 8.1 d, CBeebies Bedtime Stories 4.9 d, Angelina Ballerina 2.0 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 496; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 12 h: 3061 programmes + airtime by tier: core 0%, supporting 100%, surprise 0% + block 17-21: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 75%, Clangers 10%, CBeebies Bedtime Stories 9% + block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 74%, Clangers 10%, CBeebies Bedtime Stories 10% + block 6-9: core 0%, 9 shows, effectively 7.2 equal shows; top Clifford the Big Red Dog 16%, Something Special 16%, Bluey (2018) 16% + block 9-17: core 0%, 32 shows, effectively 28.8 equal shows; top Rusty Rivets 4%, Nella the Princess Knight 4%, Teletubbies 4% + repeats: 1919 different episodes; same file again within 24 h 5, within 7 days 428, median 7.1 days between repeats (within 24 h in weighted blocks: 0) + starvation: never aired none; longest waits BeddyByes 9.9 d, Clangers 8.2 d, CBeebies Bedtime Stories 5.0 d, Noddy's Toyland Adventures 3.0 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 501; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 24 h: 3026 programmes + airtime by tier: core 0%, supporting 100%, surprise 0% + block 17-21: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 76%, Clangers 10%, CBeebies Bedtime Stories 9% + block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 74%, Clangers 11%, CBeebies Bedtime Stories 10% + block 6-9: core 0%, 9 shows, effectively 6.3 equal shows; top Teletubbies 21%, Clifford the Big Red Dog 21%, Bluey (2018) 16% + block 9-17: core 0%, 32 shows, effectively 25.6 equal shows; top Teletubbies 5%, Shimmer and Shine 5%, The Adventures of Paddington 5% + repeats: 1974 different episodes; same file again within 24 h 5, within 7 days 431, median 7.1 days between repeats (within 24 h in weighted blocks: 0) + starvation: never aired none; longest waits BeddyByes 9.8 d, Clangers 8.2 d, Noddy's Toyland Adventures 5.0 d, CBeebies Bedtime Stories 5.0 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 489; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + +== Odyssey (202): 43 shows; under 24 h of episodes: Cosmos, Cosmos (2014), Wonders of the Universe, Wonders of the Solar System, The Planets (2019), The Planets, Wonders of Life, Human Universe, Forces of Nature with Brian Cox, Brian Cox's Adventures in Space and Time, Brian Cox: Life of a Universe, When We Left Earth: The NASA Missions, James May's Man Lab, The Ascent of Man, The Story of Maths, Walking with Dinosaurs, Civilisation, Civilisations (2018), The World at War, The Vietnam War (2017), The Civil War, The Story of India, Ancient Apocalypse (2022), Long Way Round, Long Way Down, An Idiot Abroad, Himalaya with Michael Palin, Pole to Pole with Michael Palin, Around the World in 80 Days, Band of Brothers + As built: 878 programmes + airtime by tier: core 69%, supporting 31%, surprise 0% + block 18-23: core 93%, 17 shows, effectively 16.5 equal shows; top Wonders of Life 6%, Cosmos 6%, When We Left Earth: The NASA Missions 6% + block 23-6: core 54%, 5 shows, effectively 4.5 equal shows; top How the Universe Works 27%, The Universe 27%, Mayday 18% + block all: core 76%, 23 shows, effectively 21.7 equal shows; top Human Universe 5%, Brian Cox's Adventures in Space and Time 5%, Wonders of the Solar System 5% + event 14-18: core 0%, 14 shows, effectively 13.7 equal shows; top The Vietnam War (2017) 9%, The Civil War 9%, The World at War 8% + repeats: 569 different episodes; same file again within 24 h 0, within 7 days 235, median 5.2 days between repeats + starvation: never aired none; longest waits The Civil War 21.0 d, The Vietnam War (2017) 20.9 d, Civilisations (2018) 15.0 d, Civilisation 14.0 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 1; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 12 h: 888 programmes + airtime by tier: core 71%, supporting 29%, surprise 0% + block 18-23: core 96%, 17 shows, effectively 13.4 equal shows; top Horizon 10%, How the Universe Works 10%, Cosmos (2014) 9% + block 23-6: core 57%, 5 shows, effectively 4.2 equal shows; top How the Universe Works 29%, The Universe 29%, Seconds From Disaster 19% + block all: core 76%, 23 shows, effectively 17.8 equal shows; top Cosmos 8%, Megastructures 8%, How the Universe Works 8% + event 14-18: core 0%, 14 shows, effectively 13.1 equal shows; top Civilisations (2018) 9%, The Vietnam War (2017) 9%, An Idiot Abroad 9% + repeats: 644 different episodes; same file again within 24 h 0, within 7 days 20, median 10.7 days between repeats + starvation: never aired none; longest waits The Story of India 20.0 d, Around the World in 80 Days 15.9 d, The Vietnam War (2017) 14.9 d, The Civil War 14.1 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 1; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 24 h: 903 programmes + airtime by tier: core 72%, supporting 28%, surprise 0% + block 18-23: core 98%, 17 shows, effectively 10.6 equal shows; top Through the Wormhole 12%, How the Universe Works 12%, Horizon 12% + block 23-6: core 59%, 5 shows, effectively 4.0 equal shows; top How the Universe Works 29%, The Universe 29%, Mayday 20% + block all: core 78%, 23 shows, effectively 14.2 equal shows; top How the Universe Works 10%, The Universe 10%, Impossible Engineering 10% + event 14-18: core 0%, 14 shows, effectively 11.4 equal shows; top The Vietnam War (2017) 14%, The World at War 13%, Anthony Bourdain: Parts Unknown 12% + repeats: 706 different episodes; same file again within 24 h 0, within 7 days 0, median 16.3 days between repeats + starvation: never aired none; longest waits The Story of India 21.0 d, The Civil War 20.0 d, Around the World in 80 Days 16.8 d, Himalaya with Michael Palin 15.1 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + +== Orbit Three (103): 44 shows; under 24 h of episodes: The Inbetweeners, Bad Education, Uncle, Him & Her, Coupling, Cuckoo, Lunch Monkeys, Man Like Mobeen, People Just Do Nothing, Black Books, Limmy's Show!, Burnistoun, Chewin' the Fat, Gary: Tank Commander, Scot Squad, Gavin & Stacey, The Mighty Boosh, Spaced, Fresh Meat, Phoenix Nights, Green Wing, This Country, Extras, The Office (UK), Toast of London, Peep Show, The IT Crowd, Little Britain, The League of Gentlemen, Nighty Night, Snuff Box, Monkey Dust, Psychoville, Garth Marenghi's Darkplace, Brass Eye, The Day Today, Nathan Barley, Bo' Selecta!, Stressed Eric + As built: 1453 programmes + airtime by tier: core 51%, supporting 37%, surprise 11% + block 18-22: core 39%, 13 shows, effectively 12.6 equal shows; top Spaced 10%, Phoenix Nights 10%, Gavin & Stacey 10% + block 2-6: core 91%, 8 shows, effectively 7.9 equal shows; top Limmy's Show! 13%, Burnistoun 13%, Gavin & Stacey 13% + block 22-2: core 20%, 13 shows, effectively 10.7 equal shows; top Little Britain 20%, Snuff Box 7%, Garth Marenghi's Darkplace 7% + block 6-18: core 49%, 18 shows, effectively 17.3 equal shows; top Still Game 7%, Chewin' the Fat 7%, Burnistoun 7% + event 21-0: core 79%, 7 shows, effectively 6.8 equal shows; top Still Game 17%, Chewin' the Fat 17%, Burnistoun 17% + repeats: 853 different episodes; same file again within 24 h 0, within 7 days 219, median 10.0 days between repeats + starvation: never aired none; longest waits Being Human 4.1 d, Green Wing 3.9 d, The League of Gentlemen 3.1 d, Bo' Selecta! 3.0 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 12 h: 1433 programmes + airtime by tier: core 52%, supporting 38%, surprise 10% + block 18-22: core 33%, 13 shows, effectively 12.1 equal shows; top Gavin & Stacey 10%, The Mighty Boosh 10%, Green Wing 10% + block 2-6: core 93%, 8 shows, effectively 7.5 equal shows; top Still Game 17%, Two Pints of Lager and a Packet of Crisps 17%, Gavin & Stacey 13% + block 22-2: core 28%, 13 shows, effectively 7.5 equal shows; top Little Britain 28%, Inside No. 9 12%, Bo' Selecta! 9% + block 6-18: core 48%, 18 shows, effectively 16.6 equal shows; top Still Game 8%, Two Pints of Lager and a Packet of Crisps 8%, Rab C. Nesbitt 8% + event 21-0: core 78%, 7 shows, effectively 6.6 equal shows; top Still Game 20%, Rab C. Nesbitt 19%, Chewin' the Fat 16% + repeats: 896 different episodes; same file again within 24 h 0, within 7 days 132, median 10.1 days between repeats + starvation: never aired none; longest waits Nathan Barley 5.9 d, Brass Eye 5.9 d, Snuff Box 5.9 d, Garth Marenghi's Darkplace 5.8 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 + Hybrid under 24 h: 1417 programmes + airtime by tier: core 54%, supporting 35%, surprise 11% + block 18-22: core 27%, 13 shows, effectively 10.5 equal shows; top Being Human 16%, Peep Show 14%, Fresh Meat 11% + block 2-6: core 95%, 8 shows, effectively 5.8 equal shows; top Two Pints of Lager and a Packet of Crisps 26%, Still Game 26%, Gavin & Stacey 10% + block 22-2: core 25%, 13 shows, effectively 7.2 equal shows; top Little Britain 25%, Inside No. 9 21%, Bo' Selecta! 8% + block 6-18: core 55%, 18 shows, effectively 13.2 equal shows; top Still Game 13%, Rab C. Nesbitt 13%, Two Pints of Lager and a Packet of Crisps 13% + event 21-0: core 80%, 7 shows, effectively 5.4 equal shows; top Still Game 26%, Rab C. Nesbitt 25%, Scot Squad 14% + repeats: 913 different episodes; same file again within 24 h 0, within 7 days 0, median 12.8 days between repeats + starvation: never aired none; longest waits The Day Today 6.0 d, Snuff Box 6.0 d, Garth Marenghi's Darkplace 6.0 d, Brass Eye 5.9 d + on another channel at the same time: 0 + rules: same show twice running (weighted blocks with a choice) 0, plus 0 where every other show airs elsewhere; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0 +