0.98.0: weighted rotation on Odyssey, Wild, Orbit X, ToonZ and Tots Morning and Playtime
Per-block switch keeps Tots' Wind Down and Night on equal turns; per-block weights put ToonZ's teatime trio level with the core in teatime only. Tiers from each channel's brief. Four-week real-pool replays with clash avoidance and restarts, and fingerprints against 0.97.0, in docs/replays. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,8 @@ android {
|
||||
applicationId = "tv.orbit.classic"
|
||||
minSdk = 26
|
||||
targetSdk = 36
|
||||
versionCode = 128
|
||||
versionName = "0.97.0-weighted-three"
|
||||
versionCode = 129
|
||||
versionName = "0.98.0-weighted-rollout"
|
||||
}
|
||||
buildFeatures { compose = true }
|
||||
compileOptions { sourceCompatibility = JavaVersion.VERSION_17; targetCompatibility = JavaVersion.VERSION_17 }
|
||||
|
||||
@@ -171,6 +171,8 @@ internal val OrbitXDayParts get() = listOf(
|
||||
internal val OrbitXMixed get() = setOf("Biker Mice from Mars", "Teenage Mutant Ninja Turtles", "The Transformers", "He-Man and the Masters of the Universe", "ThunderCats",
|
||||
"The Real Ghostbusters", "G.I. Joe", "G.I. Joe: A Real American Hero", "Street Sharks", "SWAT Kats: The Radical Squadron", "Captain Planet and the Planeteers", "M.A.S.K.",
|
||||
"Inspector Gadget", "She-Ra: Princess of Power")
|
||||
/** Orbit X's tiers, from docs/channels/orbit-x.md: the core and its earlier names 3, everything else 2. */
|
||||
internal val OrbitXTiers: Map<String, Double> get() = (OrbitXCore + OrbitXEarlierNames).associate { seriesKey(it) to TIER_CORE }
|
||||
|
||||
/** Rewind, the after-school 2000s: Cartoon Network at its heart, with Nickelodeon, Kids' WB and a little Disney. */
|
||||
private val RewindCore = listOf("Dexter's Laboratory", "Johnny Bravo", "The Powerpuff Girls", "Cow and Chicken", "I Am Weasel", "Ed, Edd n Eddy", "Ed Edd n Eddy",
|
||||
@@ -193,9 +195,13 @@ private val ToonZSupporting = listOf("Wacky Races", "Top Cat", "Hong Kong Phooey
|
||||
private val ToonZTeatime = listOf("Danger Mouse", "Count Duckula", "Bananaman")
|
||||
internal val ToonZShows get() = (ToonZCore + ToonZSupporting + ToonZTeatime).distinct()
|
||||
internal val ToonZDayParts get() = listOf(
|
||||
DayPart(6, 10, ToonZCore + ToonZSupporting), DayPart(10, 16, ToonZCore + ToonZSupporting), DayPart(16, 18, ToonZTeatime + ToonZCore),
|
||||
DayPart(6, 10, ToonZCore + ToonZSupporting), DayPart(10, 16, ToonZCore + ToonZSupporting),
|
||||
// Teatime is the British trio's block, so there they're level with the core (approved 4 November 2026).
|
||||
DayPart(16, 18, ToonZTeatime + ToonZCore, weights = ToonZTeatime.associate { seriesKey(it) to TIER_CORE }),
|
||||
DayPart(18, 0, ToonZCore + ToonZSupporting), DayPart(0, 6, ToonZShows))
|
||||
internal val ToonZMixed get() = ToonZShows.toSet()
|
||||
/** ToonZ's tiers, from docs/channels/toonz.md: the core 3, everything else 2. The teatime trio's own block weights them 3 there. */
|
||||
internal val ToonZTiers: Map<String, Double> get() = ToonZCore.associate { seriesKey(it) to TIER_CORE }
|
||||
|
||||
/** Terra, after Eden: natural history watched and understood. The animals and places are the story. */
|
||||
private val TerraLandmarks = listOf("Life on Earth", "The Living Planet", "The Trials of Life", "The Blue Planet", "Blue Planet II", "Planet Earth", "Planet Earth II", "Planet Earth III",
|
||||
@@ -224,6 +230,9 @@ internal val WildDayParts get() = listOf(
|
||||
// Late is where the dangerous jobs live.
|
||||
DayPart(22, 6, WildFrontier))
|
||||
internal val WildMixed get() = WildShows.toSet() - setOf("Alone", "Expedition Tiger", "Running Wild with Bear Grylls: The Challenge")
|
||||
/** Wild's tiers, from docs/channels/wild.md: core 3, supporting 2, Dirty Jobs the surprise at 1. */
|
||||
internal val WildTiers: Map<String, Double> get() =
|
||||
(WildSurvival + listOf("The Crocodile Hunter", "River Monsters")).associate { seriesKey(it) to TIER_CORE } + mapOf(seriesKey("Dirty Jobs") to TIER_SURPRISE)
|
||||
|
||||
/** Odyssey, after Discovery Science: space, science and engineering, with a weekend of human journeys. */
|
||||
private val OdysseySpace = listOf("Cosmos", "Cosmos: A Spacetime Odyssey", "Wonders of the Universe", "Wonders of the Solar System", "The Universe", "How the Universe Works",
|
||||
@@ -246,6 +255,10 @@ internal val OdysseyDayParts get() = listOf(
|
||||
DayPart(6, 18, OdysseyEngineering + OdysseySpace - setOf("Horizon", "Through the Wormhole", "The Sky at Night"), group = "all"), DayPart(18, 23, OdysseySpace), DayPart(23, 6, OdysseyDisasters))
|
||||
internal val OdysseyMixed get() = setOf("The Universe", "How the Universe Works", "Horizon", "Impossible Engineering", "Engineering the Impossible", "Extreme Engineering", "Megastructures",
|
||||
"Big Bigger Biggest", "How Do They Do It?", "Seconds from Disaster", "Air Crash Investigation", "Mayday", "Through the Wormhole", "The Sky at Night", "Parts Unknown")
|
||||
/** Odyssey's tiers, from docs/channels/odyssey.md: core 3, everything else 2, so Journeys are equal within their weekend block. */
|
||||
internal val OdysseyTiers: Map<String, Double> get() = listOf("The Universe", "How the Universe Works", "Cosmos", "Cosmos: A Spacetime Odyssey", "Wonders of the Universe",
|
||||
"Wonders of the Solar System", "Horizon", "Through the Wormhole", "The Sky at Night", "The Planets (2019)", "Wonders of Life", "Human Universe", "Forces of Nature with Brian Cox",
|
||||
"Brian Cox's Adventures in Space and Time", "When We Left Earth: The NASA Missions", "Impossible Engineering", "Extreme Engineering", "Megastructures").associate { seriesKey(it) to TIER_CORE }
|
||||
|
||||
/** Dark Files: real crime by day, mysteries in the evening, the paranormal at night, and long-form case files at weekends. */
|
||||
private val DarkFilesCaseFiles = listOf("Making a Murderer", "The Staircase", "The Jinx", "The Keepers", "Wild Wild Country", "Conversations with a Killer: The Ted Bundy Tapes",
|
||||
|
||||
@@ -9,7 +9,11 @@ internal data class DayPart(val fromHour: Int, val toHour: Int, val titles: List
|
||||
/** One start a night: once a programme from this event has started, the rest of its window goes to the usual block. */
|
||||
val once: Boolean = false,
|
||||
/** The block's or event's presentation, such as "riot.laughs": its own ident on entering it. Empty for ordinary blocks. */
|
||||
val key: String = "") {
|
||||
val key: String = "",
|
||||
/** On a channel with weighted rotation: false keeps this block on equal turns, as Tots' Wind Down and Night (4 November 2026). */
|
||||
val weighted: Boolean = true,
|
||||
/** On a channel with weighted rotation: tier weights for this block only, over the channel's, as ToonZ's teatime trio. */
|
||||
val weights: Map<String, Double> = emptyMap()) {
|
||||
fun covers(hour: Int) = if (fromHour <= toHour) hour in fromHour until toHour else hour >= fromHour || hour < toHour
|
||||
/** An event that runs past midnight belongs to the night it started, so its small hours count from the day before. */
|
||||
fun covers(hour: Int, day: java.time.DayOfWeek) = covers(hour) && (days.isEmpty() || (if (fromHour > toHour && hour < toHour) day.minus(1) else day) in days)
|
||||
@@ -91,15 +95,16 @@ internal val SmartChannels = listOf(
|
||||
SuggestionRule("night", "Evening", "Series", listOf("Anime", "Action"), 1985..2020, 7f, setOf("TV-MA"), 30))),
|
||||
// Reads every show on its list, as the other curated channels do. Its old limit of 20 dates from when the list was short.
|
||||
ChannelProgramming(201, "Terra", TerraShows, seriesCount = TerraShows.size, finishTogether = true, exactTitles = true, dayParts = TerraDayParts),
|
||||
ChannelProgramming(TOTS_NUMBER, "Tots", TotsShows, seriesCount = 40, finishTogether = true, exactTitles = true, dayParts = TotsDayParts, shuffleEpisodes = true),
|
||||
ChannelProgramming(TOTS_NUMBER, "Tots", TotsShows, seriesCount = 40, finishTogether = true, exactTitles = true, dayParts = TotsDayParts, shuffleEpisodes = true,
|
||||
tierWeights = TotsTiers),
|
||||
ChannelProgramming(106, "Paradox", ParadoxShows, seriesCount = 20, finishTogether = true, exactTitles = true, dayParts = ParadoxDayParts, shuffleTitles = ParadoxStandalones.toSet())) +
|
||||
ChannelPresets.filter { it.smartOnly }.map { ChannelProgramming(it.number, it.name, it.searches, seriesCount = if (it.films) it.searches.size else 60, finishTogether = !it.films, exactTitles = true,
|
||||
filmRestMs = if (it.films) 7 * 24 * 60 * 60_000L else null,
|
||||
suggestionRules = SmartChannelRules[it.number].orEmpty(), dayParts = SmartChannelParts[it.number].orEmpty(), shuffleTitles = SmartChannelMixed[it.number].orEmpty(),
|
||||
channelFilms = if (it.number == 401) PpvSunday else emptyList(), tierWeights = SmartChannelTiers[it.number]) }
|
||||
|
||||
/** Editorially weighted rotation, per channel, once its tiers are approved. Orbit Three only for now (4 November 2026). */
|
||||
private val SmartChannelTiers: Map<Int, Map<String, Double>> get() = mapOf(103 to ThreeTiers)
|
||||
/** Editorially weighted rotation, per channel, once its tiers are approved: Orbit Three (0.97.0), then Odyssey, Wild, Orbit X and ToonZ (0.98.0). */
|
||||
private val SmartChannelTiers: Map<Int, Map<String, Double>> get() = mapOf(103 to ThreeTiers, 202 to OdysseyTiers, 203 to WildTiers, 603 to OrbitXTiers, 605 to ToonZTiers)
|
||||
|
||||
/** Shows that play in a mixed order on channels whose identity is agreed. See ChannelIdentities.kt. */
|
||||
private val SmartChannelMixed: Map<Int, Set<String>> get() = mapOf(101 to Orbit1Mixed, 102 to Orbit2Mixed, 103 to ThreeMixed, 104 to GoldMixed, 105 to RiotMixed,
|
||||
@@ -373,7 +378,8 @@ internal fun extendWeighted(pool: List<PoolSeries>, cursor: ScheduleCursor, from
|
||||
val why = "$block; weighted: lowest tally for its tier (${"%.0f".format(tally[series.id])})" + if (eligible.size < clear.size) ", others resting or just played" else ""
|
||||
val item = if (series.isFilm) SampleItem(series.title, "Movie", episode.durationMs / 60_000, "", episode.id, episode.durationMs) else scheduledItem(series.title, episode)
|
||||
entries += ScheduleEntry(series.id, episode.mark, ScheduledMedia(item, episode.sourceId, episode.durationMs), start, why, if (series in available) part?.key.orEmpty() else "")
|
||||
tally[series.id] = tally[series.id]!! + episode.durationMs / 60_000.0 / weightOf(series)
|
||||
val weight = part?.takeIf { series in available }?.weights?.get(seriesKey(series.title)) ?: weightOf(series)
|
||||
tally[series.id] = tally[series.id]!! + episode.durationMs / 60_000.0 / weight
|
||||
marks[series.id] = episode.mark
|
||||
aired[episode.id] = start
|
||||
// The start of a run: its first episode in season order, or the first of its shuffled deck.
|
||||
@@ -385,6 +391,41 @@ internal fun extendWeighted(pool: List<PoolSeries>, cursor: ScheduleCursor, from
|
||||
return ChannelPlan(entries, ScheduleCursor(last, marks, shown, cursor.blockLast, tallies, runStarted))
|
||||
}
|
||||
|
||||
/**
|
||||
* Weighted rotation for a channel whose blocks don't all use it: each stretch of weighted blocks goes to [extendWeighted],
|
||||
* each stretch of the others to [extendSchedule], exactly as they'd be planned on their own, carrying the cursor across.
|
||||
* With every block weighted, this is one call to [extendWeighted].
|
||||
*/
|
||||
internal fun extendByBlock(pool: List<PoolSeries>, cursor: ScheduleCursor, fromMs: Long, untilMs: Long, weightOf: (PoolSeries) -> Double,
|
||||
dayParts: List<DayPart>, zone: java.time.ZoneId, avoid: ProgrammeClash, shuffle: Boolean, mixed: (PoolSeries) -> Boolean, finishTogether: Boolean,
|
||||
recentFiles: Map<String, Long> = emptyMap(), runBefore: Int = 0): ChannelPlan {
|
||||
fun weightedAt(at: Long) = dayPartFor(pool, dayParts, at, zone).third?.weighted != false
|
||||
val hour = 60 * 60_000L
|
||||
val entries = mutableListOf<ScheduleEntry>()
|
||||
var tail = cursor
|
||||
var start = fromMs
|
||||
while (start < untilMs) {
|
||||
val weighted = weightedAt(start)
|
||||
// Blocks change on the hour, so the stretch ends at the first hour that changes the rule.
|
||||
var end = java.time.Instant.ofEpochMilli(start).atZone(zone).truncatedTo(java.time.temporal.ChronoUnit.HOURS).toInstant().toEpochMilli() + hour
|
||||
while (end < untilMs && weightedAt(end) == weighted) end += hour
|
||||
val stretch = if (weighted) {
|
||||
val recent = recentFiles + entries.filter { it.startMs >= start - SAME_FILE_MS }.associate { it.media.item.id to it.startMs }
|
||||
extendWeighted(pool, tail, start, minOf(end, untilMs), weightOf, dayParts, zone, avoid, shuffle, mixed, recent)
|
||||
} else {
|
||||
val trailing = entries.lastOrNull()?.let { t -> entries.asReversed().takeWhile { it.seriesId == t.seriesId }.size } ?: runBefore
|
||||
extendSchedule(pool, tail, start, minOf(end, untilMs), null, finishTogether, dayParts, zone, avoid, shuffle, mixed, trailing).let { plan ->
|
||||
// Equal turns know nothing of tallies; they wait unchanged for the next weighted stretch.
|
||||
plan.copy(tail = plan.tail.copy(tallies = tail.tallies, runStarted = tail.runStarted))
|
||||
}
|
||||
}
|
||||
entries += stretch.entries
|
||||
tail = stretch.tail
|
||||
start = stretch.entries.lastOrNull()?.endMs ?: break
|
||||
}
|
||||
return ChannelPlan(entries, tail)
|
||||
}
|
||||
|
||||
/** Shows take turns, one episode each, back to back from [fromMs] until [untilMs] is covered. */
|
||||
internal fun extendSchedule(pool: List<PoolSeries>, cursor: ScheduleCursor, fromMs: Long, untilMs: Long, filmRestMs: Long? = null, finishTogether: Boolean = false,
|
||||
dayParts: List<DayPart> = emptyList(), zone: java.time.ZoneId = java.time.ZoneId.systemDefault(), avoid: ProgrammeClash = { _, _, _ -> false }, shuffle: Boolean = false,
|
||||
@@ -535,7 +576,7 @@ internal fun topUpPlan(existing: ChannelPlan?, aired: ScheduleCursor, pool: List
|
||||
val trailing = kept?.entries?.lastOrNull()?.let { tail -> kept.entries.asReversed().takeWhile { it.seriesId == tail.seriesId }.size } ?: 0
|
||||
val added = if (weightOf != null && filmRestMs == null) {
|
||||
val recent = kept?.entries.orEmpty().filter { it.startMs >= from - SAME_FILE_MS }.associate { it.media.item.id to it.startMs }
|
||||
extendWeighted(pool, existing?.tail ?: aired, from, nowMs + SCHEDULE_AHEAD_MS, weightOf, dayParts, zone, avoid, shuffle, mixed, recent)
|
||||
extendByBlock(pool, existing?.tail ?: aired, from, nowMs + SCHEDULE_AHEAD_MS, weightOf, dayParts, zone, avoid, shuffle, mixed, finishTogether, recent, trailing)
|
||||
} else extendSchedule(pool, existing?.tail ?: aired, from, nowMs + SCHEDULE_AHEAD_MS, filmRestMs, finishTogether, dayParts, zone, avoid, shuffle, mixed, trailing, noThirdInARow, blockRotation)
|
||||
return ChannelPlan(kept?.entries.orEmpty() + added.entries, added.tail)
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ internal class HttpsEmbyTransport(internal val deviceId: String = UUID.randomUUI
|
||||
connection.connectTimeout = 10_000
|
||||
connection.readTimeout = request.readTimeoutMs ?: if (request.path == "/Sessions/Logout") 5_000 else 15_000
|
||||
connection.setRequestProperty("Accept", "application/json")
|
||||
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.97.0\"")
|
||||
connection.setRequestProperty("X-Emby-Authorization", "Emby Client=\"Orbit TV\", Device=\"Orbit TV\", DeviceId=\"$deviceId\", Version=\"0.98.0\"")
|
||||
request.token?.let { connection.setRequestProperty("X-Emby-Token", it) }
|
||||
if (request.method == "POST") {
|
||||
val bytes = request.body.orEmpty().toByteArray(Charsets.UTF_8)
|
||||
|
||||
@@ -33,7 +33,7 @@ internal class SecureMediaDataSource(private val session: EmbySampleSession) : B
|
||||
next.instanceFollowRedirects = false
|
||||
next.connectTimeout = 10_000
|
||||
next.readTimeout = 20_000
|
||||
next.setRequestProperty("User-Agent", "OrbitTV/0.97.0")
|
||||
next.setRequestProperty("User-Agent", "OrbitTV/0.98.0")
|
||||
next.setRequestProperty("Accept-Encoding", "identity")
|
||||
session.mediaHeaders(address).forEach { (key, value) -> next.setRequestProperty(key, value) }
|
||||
if (dataSpec.position != 0L || dataSpec.length != C.LENGTH_UNSET.toLong()) {
|
||||
|
||||
@@ -14,7 +14,11 @@ private val TotsPlaytime = listOf("Peppa Pig", "Ben and Holly's Little Kingdom",
|
||||
internal val TotsWindDown = listOf("CBeebies Bedtime Stories", "In The Night Garden", "Clangers", "BeddyByes")
|
||||
|
||||
internal val TotsShows get() = TotsMorning + TotsPlaytime + TotsWindDown
|
||||
internal val TotsDayParts get() = listOf(DayPart(6, 9, TotsMorning), DayPart(9, 17, TotsMorning + TotsPlaytime), DayPart(17, 21, TotsWindDown), DayPart(21, 6, TotsWindDown))
|
||||
// Wind Down and Night keep equal turns: four shows can't share 13 hours a day fairly without heavy repeats. Their own decision comes later.
|
||||
internal val TotsDayParts get() = listOf(DayPart(6, 9, TotsMorning), DayPart(9, 17, TotsMorning + TotsPlaytime), DayPart(17, 21, TotsWindDown, weighted = false),
|
||||
DayPart(21, 6, TotsWindDown, weighted = false))
|
||||
/** Tots has no tiers: Morning and Playtime share their airtime equally by minutes (4 November 2026). */
|
||||
internal val TotsTiers: Map<String, Double> get() = emptyMap()
|
||||
|
||||
internal enum class TotsMood(val video: Int, val still: Int, val lengthMs: Long, val fadeMs: Int, val sings: Boolean) {
|
||||
Morning(R.raw.ident_614_morning, R.drawable.orbit_tots_still_morning, 5_000, 400, true),
|
||||
|
||||
@@ -9,7 +9,7 @@ import java.io.File
|
||||
* Four weeks of top-ups on every channel from copies of the box's committed plans and pools, run by hand:
|
||||
* ORBIT_REPLAY_DIR=<copies of the box's files> ./gradlew :app:testDebugUnitTest --tests '*ReplayFingerprintTest*'
|
||||
* Writes replay-fingerprints.txt there, one line per channel: a fingerprint of every programme booked and why. Run it
|
||||
* on two versions of the app to show which channels a change touches. Only uses what every version has.
|
||||
* on two versions of the app to show which channels a change touches. Needs 0.97.0 or later (weighted rotation).
|
||||
*/
|
||||
class ReplayFingerprintTest {
|
||||
private val dir = System.getenv("ORBIT_REPLAY_DIR")?.let(::File)
|
||||
@@ -51,7 +51,7 @@ class ReplayFingerprintTest {
|
||||
val all = committed.entries.toMutableList()
|
||||
while (now < end) {
|
||||
current = topUpPlan(current, current.tail, series, now, programming.filmRestMs, programming.finishTogether, programming.dayParts, zone,
|
||||
shuffle = programming.shuffleEpisodes, mixed = programming::mixes) ?: break
|
||||
shuffle = programming.shuffleEpisodes, mixed = programming::mixes, weightOf = programming.tierWeights?.let { programming::weightOf }) ?: break
|
||||
current.entries.filter { e -> all.none { it.startMs == e.startMs } }.forEach { all += it }
|
||||
now += 6 * 60 * 60_000L
|
||||
}
|
||||
|
||||
+60
-52
@@ -2,45 +2,26 @@ package tv.orbit.classic
|
||||
|
||||
import org.json.JSONObject
|
||||
import org.junit.Assert.assertEquals
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Assume.assumeTrue
|
||||
import org.junit.Test
|
||||
import java.io.File
|
||||
|
||||
/**
|
||||
* The rollout proposal after Orbit Three (4 November 2026): read-only, nothing here is used by the app. For Tots, ToonZ,
|
||||
* Odyssey, Wild and Orbit X, four weeks of new bookings after each committed plan, from copies of the box's files, both
|
||||
* the rule each channel has today and weighted rotation with the tiers proposed from its own brief:
|
||||
* ORBIT_REPLAY_DIR=<copies of the box's files> ./gradlew :app:testDebugUnitTest --tests '*RolloutProposalReplayTest*'
|
||||
* Writes rollout-proposal-replay.txt there.
|
||||
* 0.98.0's check: weighted rotation on Odyssey, Wild, Orbit X, ToonZ and Tots (Morning and Playtime only), as configured in
|
||||
* the app. For each, four weeks of new bookings after its committed plan, from copies of the box's files, today's rule
|
||||
* against the app's, with other channels' programmes avoided as the box avoids them, and once more with a save and
|
||||
* reload every 18 hours. Run by hand:
|
||||
* ORBIT_REPLAY_DIR=<copies of the box's files> ./gradlew :app:testDebugUnitTest --tests '*WeightedRolloutReplayTest*'
|
||||
* Writes weighted-rollout-replay.txt there, and fails on any broken rule.
|
||||
*/
|
||||
class RolloutProposalReplayTest {
|
||||
class WeightedRolloutReplayTest {
|
||||
private val dir = System.getenv("ORBIT_REPLAY_DIR")?.let(::File)
|
||||
private val zone = java.time.ZoneId.of("Europe/London")
|
||||
private val day = 24 * 60 * 60_000L
|
||||
private val hour = 60 * 60_000L
|
||||
|
||||
private class Proposal(val number: Int, val name: String, val tiers: Map<String, Double>, val note: String, val alternatives: List<Pair<String, Map<String, Double>>> = emptyList())
|
||||
private fun tiers(core: List<String>, surprise: List<String> = emptyList(), other: Map<String, Double> = emptyMap()) =
|
||||
core.associate { seriesKey(it) to TIER_CORE } + surprise.associate { seriesKey(it) to TIER_SURPRISE } + other.mapKeys { seriesKey(it.key) }
|
||||
|
||||
// Each channel's tiers, from its own brief in docs/channels. Anything not named is supporting (2).
|
||||
private val proposals = listOf(
|
||||
Proposal(614, "Tots", emptyMap(), "No tiers in the brief: every show equal (2), so airtime is shared by minutes, not by episode count.",
|
||||
listOf("Night Garden anchors bedtime (3), Clangers and BeddyByes light (1)" to tiers(listOf("In The Night Garden"), surprise = listOf("Clangers", "BeddyByes")))),
|
||||
Proposal(605, "ToonZ", tiers(listOf("Looney Tunes", "Tom and Jerry", "Scooby-Doo, Where Are You!", "The Flintstones", "The Jetsons", "The Yogi Bear Show", "Popeye the Sailor", "Popeye")),
|
||||
"Core 3 and supporting 2 from the brief. The British teatime trio counts as supporting (2), not surprise: teatime is their block.",
|
||||
listOf("teatime trio at 3, level with the core" to tiers(listOf("Looney Tunes", "Tom and Jerry", "Scooby-Doo, Where Are You!", "The Flintstones", "The Jetsons", "The Yogi Bear Show",
|
||||
"Popeye the Sailor", "Popeye", "Danger Mouse", "Count Duckula", "Bananaman")))),
|
||||
Proposal(202, "Odyssey", tiers(listOf("The Universe", "How the Universe Works", "Cosmos", "Cosmos: A Spacetime Odyssey", "Wonders of the Universe", "Wonders of the Solar System",
|
||||
"Horizon", "Through the Wormhole", "The Sky at Night", "The Planets (2019)", "Wonders of Life", "Human Universe", "Forces of Nature with Brian Cox",
|
||||
"Brian Cox's Adventures in Space and Time", "When We Left Earth: The NASA Missions", "Impossible Engineering", "Extreme Engineering", "Megastructures")),
|
||||
"Core 3 and supporting 2 from the brief. The Journeys titles are equal (2) within their weekend block."),
|
||||
Proposal(203, "Wild", tiers(listOf("Man vs. Wild", "Running Wild with Bear Grylls", "Survivorman", "Dual Survival", "Naked and Afraid", "Alone", "Survival with Ray Mears",
|
||||
"Bear Grylls: Mission Survive", "The Crocodile Hunter", "River Monsters"), surprise = listOf("Dirty Jobs")),
|
||||
"Core 3, supporting 2 and Dirty Jobs as the surprise (1), all from the brief."),
|
||||
Proposal(603, "Orbit X", tiers(listOf("Biker Mice from Mars", "Digimon: Digital Monsters", "Teenage Mutant Ninja Turtles", "The Transformers", "He-Man and the Masters of the Universe",
|
||||
"ThunderCats", "Gargoyles", "The Real Ghostbusters", "Power Rangers", "G.I. Joe", "Digimon Adventure", "Mighty Morphin Power Rangers", "G.I. Joe: A Real American Hero")),
|
||||
"Core 3 (with the earlier names of the same shows) and supporting 2 from the brief, X-Men and Spider-Man included as the brief lists them."))
|
||||
private val channels = listOf(TOTS_NUMBER, 605, 202, 203, 603)
|
||||
|
||||
private fun plan(file: File): ChannelPlan {
|
||||
val root = JSONObject(file.readText()); val rows = root.getJSONArray("entries"); val t = root.getJSONObject("tail"); val marks = t.getJSONObject("marks")
|
||||
@@ -65,25 +46,29 @@ class RolloutProposalReplayTest {
|
||||
}
|
||||
}
|
||||
|
||||
private fun replay(committed: ChannelPlan, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: ((PoolSeries) -> Double)?): List<ScheduleEntry> {
|
||||
private fun replay(committed: ChannelPlan, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: ((PoolSeries) -> Double)?,
|
||||
avoid: ProgrammeClash = { _, _, _ -> false }, restartEvery: Int = 0, keepCommitted: Boolean = false): List<ScheduleEntry> {
|
||||
var current = committed
|
||||
var now = committed.entries.first().startMs + SCHEDULE_KEEP_PAST_MS
|
||||
val end = committed.endMs + 28 * day
|
||||
val all = committed.entries.toMutableList()
|
||||
val folder = java.nio.file.Files.createTempDirectory("rollout").toFile()
|
||||
var step = 0
|
||||
while (now < end) {
|
||||
current = topUpPlan(current, current.tail, series, now, programming.filmRestMs, programming.finishTogether, programming.dayParts, zone,
|
||||
if (restartEvery > 0 && ++step % restartEvery == 0) { ScheduleStore(folder).savePlan("user", programming.number, current); current = ScheduleStore(folder).loadPlan("user", programming.number)!! }
|
||||
current = topUpPlan(current, current.tail, series, now, programming.filmRestMs, programming.finishTogether, programming.dayParts, zone, avoid,
|
||||
shuffle = programming.shuffleEpisodes, mixed = programming::mixes, weightOf = weightOf) ?: break
|
||||
current.entries.filter { e -> all.none { it.startMs == e.startMs } }.forEach { all += it }
|
||||
now += 6 * hour
|
||||
}
|
||||
all.sortBy { it.startMs }
|
||||
assertEquals("${programming.name}: committed programmes kept", committed.entries, all.take(committed.entries.size))
|
||||
return all.filter { it.startMs >= committed.endMs && it.startMs < end }
|
||||
return if (keepCommitted) all.filter { it.startMs < end } else all.filter { it.startMs >= committed.endMs && it.startMs < end }
|
||||
}
|
||||
|
||||
private fun pct(x: Double) = "%.0f%%".format(100 * x)
|
||||
|
||||
private fun report(label: String, entries: List<ScheduleEntry>, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: (PoolSeries) -> Double, out: StringBuilder) {
|
||||
private fun report(label: String, entries: List<ScheduleEntry>, series: List<PoolSeries>, programming: ChannelProgramming, weightOf: (PoolSeries) -> Double, others: ProgrammeClash, out: StringBuilder): Map<String, Int> {
|
||||
val byId = series.associateBy { it.id }
|
||||
fun tier(id: String) = when (weightOf(byId.getValue(id))) { TIER_CORE -> "core"; TIER_SURPRISE -> "surprise"; else -> "supporting" }
|
||||
fun minutes(es: List<ScheduleEntry>) = es.groupBy { it.seriesId }.mapValues { (_, x) -> x.sumOf { it.media.durationMs } / 60_000.0 }
|
||||
@@ -100,13 +85,17 @@ class RolloutProposalReplayTest {
|
||||
// Repeats: the same file again, within a day and within a week.
|
||||
val gapsByFile = entries.groupBy { it.media.item.id }.values.flatMap { es -> es.zipWithNext().map { (a, b) -> b.startMs - a.startMs } }
|
||||
val sameDay = gapsByFile.count { it < day }; val sameWeek = gapsByFile.count { it < 7 * day }
|
||||
fun weightedAt(e: ScheduleEntry) = dayPartFor(series, programming.dayParts, e.startMs, zone).third?.weighted != false
|
||||
val sameDayWeighted = entries.groupBy { it.media.item.id }.values.sumOf { es -> es.zipWithNext().count { (a, b) -> b.startMs - a.startMs < day && weightedAt(b) } }
|
||||
out.appendLine(" repeats: ${entries.map { it.media.item.id }.distinct().size} different episodes; same file again within 24 h $sameDay, within 7 days $sameWeek" +
|
||||
(if (gapsByFile.isNotEmpty()) ", median ${"%.1f".format(gapsByFile.sorted()[gapsByFile.size / 2] / day.toDouble())} days between repeats" else ""))
|
||||
(if (gapsByFile.isNotEmpty()) ", median ${"%.1f".format(gapsByFile.sorted()[gapsByFile.size / 2] / day.toDouble())} days between repeats" else "") +
|
||||
(if (programming.dayParts.any { !it.weighted }) " (within 24 h in weighted blocks: $sameDayWeighted)" else ""))
|
||||
val first = entries.first().startMs; val last = entries.last().endMs
|
||||
val waits = inBlocks.associate { s -> s.title to (listOf(first) + entries.filter { it.seriesId == s.id }.map { it.startMs } + listOf(last)).zipWithNext().maxOf { (a, b) -> b - a } / day.toDouble() }
|
||||
val never = inBlocks.filter { s -> entries.none { it.seriesId == s.id } }.map { it.title }
|
||||
out.appendLine(" starvation: never aired ${never.ifEmpty { listOf("none") }.joinToString()}; longest waits " + waits.entries.sortedByDescending { it.value }.take(4).joinToString { "${it.key} ${"%.1f".format(it.value)} d" })
|
||||
val twice = entries.zipWithNext().count { (a, b) -> a.seriesId == b.seriesId }
|
||||
val twice = entries.zipWithNext().count { (a, b) -> a.seriesId == b.seriesId && weightedAt(b) }
|
||||
val clashes = entries.count { others(byId.getValue(it.seriesId), it.startMs, it.endMs) }
|
||||
val ordered = series.filter { !(programming.shuffleEpisodes || programming.mixes(it)) }.associateBy { it.id }
|
||||
val back = entries.filter { it.seriesId in ordered }.groupBy { it.seriesId }.values.sumOf { es -> es.zipWithNext().count { (a, b) -> b.mark <= a.mark && b.mark != ordered.getValue(a.seriesId).episodes.first().mark } }
|
||||
val decks = series.filter { programming.shuffleEpisodes || programming.mixes(it) }.associate { s -> s.id to shuffledEpisodes(s).map { it.mark } }
|
||||
@@ -114,31 +103,50 @@ class RolloutProposalReplayTest {
|
||||
val gaps = entries.zipWithNext().count { (a, b) -> a.endMs != b.startMs }
|
||||
val outside = entries.count { e -> dayPartFor(series, programming.dayParts, e.startMs, zone).first.none { it.id == e.seriesId } }
|
||||
val bursts = entries.indices.count { i -> val w = entries.drop(i).takeWhile { it.startMs < entries[i].startMs + 3 * hour }; w.size >= 4 && w.count { it.seriesId == entries[i].seriesId } * 2 > w.size }
|
||||
out.appendLine(" rules: same show twice running $twice; three-hour stretches over half one show $bursts; in-order stepping back $back; shuffled off its deck $offDeck; gaps $gaps; outside its block $outside")
|
||||
out.appendLine(" on another channel at the same time: $clashes")
|
||||
out.appendLine(" rules: same show twice running (weighted blocks) $twice; three-hour stretches over half one show $bursts; in-order stepping back $back; shuffled off its deck $offDeck; gaps $gaps; outside its block $outside")
|
||||
return mapOf("sameDay" to sameDayWeighted, "twice" to twice, "back" to back, "offDeck" to offDeck, "gaps" to gaps, "outside" to outside, "never" to never.size, "clashes" to clashes)
|
||||
}
|
||||
|
||||
@Test fun rolloutChannels() {
|
||||
assumeTrue(dir != null && dir.isDirectory)
|
||||
val out = StringBuilder("Rollout proposal replays: four weeks of new bookings after each committed plan, today's rule against weighted rotation with the proposed tiers.\n" +
|
||||
"Read-only: the tiers below are proposals, defined only in this test.\n\n")
|
||||
for (p in proposals) {
|
||||
val programming = SmartChannels.first { it.number == p.number }
|
||||
val committedFile = File(dir, "schedule-${p.number}.json"); val poolFile = File(dir, "episodes-${p.number}.json")
|
||||
if (!committedFile.exists() || !poolFile.exists()) { out.appendLine("== ${p.name}: no files"); continue }
|
||||
val committed = plan(committedFile); val series = pool(poolFile)
|
||||
val weightOf = { s: PoolSeries -> p.tiers[seriesKey(s.title)] ?: TIER_SUPPORTING }
|
||||
out.appendLine("== ${p.name} (${p.number}), committed plan ends ${java.time.Instant.ofEpochMilli(committed.endMs).atZone(zone).toLocalDateTime().withNano(0)}")
|
||||
out.appendLine(" ${p.note}")
|
||||
if (p.tiers.isNotEmpty()) out.appendLine(" in the pool: ${series.size} shows; core ${series.count { weightOf(it) == TIER_CORE }}, supporting ${series.count { weightOf(it) == TIER_SUPPORTING }}, surprise ${series.count { weightOf(it) == TIER_SURPRISE }}")
|
||||
report("Today", replay(committed, series, programming, null), series, programming, weightOf, out)
|
||||
report("Weighted", replay(committed, series, programming, weightOf), series, programming, weightOf, out)
|
||||
for ((label, alt) in p.alternatives) {
|
||||
val altWeight = { s: PoolSeries -> alt[seriesKey(s.title)] ?: TIER_SUPPORTING }
|
||||
report("Alternative, $label", replay(committed, series, programming, altWeight), series, programming, altWeight, out)
|
||||
val out = StringBuilder("0.98.0: four weeks of new bookings after each committed plan, today's rule against the app's weighted rotation, avoiding\n" +
|
||||
"every other channel's programmes as the box does. Copies of the box's files from 3 November.\n\n")
|
||||
// Every other channel's four weeks on today's rules, for clash avoidance.
|
||||
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 }.takeIf { p.number == 103 }, keepCommitted = true)
|
||||
}
|
||||
for (number in channels) {
|
||||
val programming = SmartChannels.first { it.number == number }
|
||||
val committed = plan(File(dir, "schedule-$number.json")); val series = pool(File(dir, "episodes-$number.json"))
|
||||
val weightOf = programming::weightOf
|
||||
val others = clashesWith(baseline.filterKeys { it != number }.values.map { ChannelPlan(it, ScheduleCursor()) })
|
||||
out.appendLine("== ${programming.name} ($number), committed plan ends ${java.time.Instant.ofEpochMilli(committed.endMs).atZone(zone).toLocalDateTime().withNano(0)}")
|
||||
out.appendLine(" in the pool: ${series.size} shows; core ${series.count { weightOf(it) == TIER_CORE }}, supporting ${series.count { weightOf(it) == TIER_SUPPORTING }}, surprise ${series.count { weightOf(it) == TIER_SURPRISE }}" +
|
||||
programming.dayParts.filter { !it.weighted }.joinToString("") { "; ${it.fromHour}-${it.toHour} stays on equal turns" } +
|
||||
programming.dayParts.filter { it.weights.isNotEmpty() }.joinToString("") { p -> "; ${p.fromHour}-${p.toHour} weights ${p.weights.size} shows ${p.weights.values.first()}" })
|
||||
val today = replay(committed, series, programming, null, others)
|
||||
val weighted = replay(committed, series, programming, weightOf, others)
|
||||
val restarted = replay(committed, series, programming, weightOf, others, restartEvery = 3)
|
||||
report("Today", today, series, programming, weightOf, others, out)
|
||||
val after = report("Weighted (0.98.0)", weighted, series, programming, weightOf, others, out)
|
||||
assertEquals("${programming.name}: a restart changes nothing", weighted, restarted)
|
||||
out.appendLine(" a save and reload every 18 hours gives the identical four weeks: true")
|
||||
for (key in listOf("sameDay", "twice", "back", "offDeck", "gaps", "outside", "never")) assertEquals("${programming.name}: $key", 0, after[key])
|
||||
// Blocks left on equal turns keep today's rule. Their programmes start at slightly different times, as the day before
|
||||
// them now ends at different moments, so the sequence shifts at block edges; the rule and the shares stay the same.
|
||||
programming.dayParts.filter { !it.weighted }.forEach { part ->
|
||||
fun inPart(e: ScheduleEntry) = dayPartFor(series, programming.dayParts, e.startMs, zone).third == part
|
||||
val a = today.filter(::inPart); val b = weighted.filter(::inPart)
|
||||
assertTrue("${programming.name}: ${part.fromHour}-${part.toHour} stays on equal turns", b.isNotEmpty() && b.none { "weighted" in it.why })
|
||||
fun shares(es: List<ScheduleEntry>) = es.groupBy { it.seriesId }.mapValues { (_, x) -> x.sumOf { it.media.durationMs }.toDouble() / es.sumOf { it.media.durationMs } }
|
||||
val sa = shares(a); val sb = shares(b)
|
||||
out.appendLine(" ${part.fromHour}-${part.toHour} on equal turns, share today -> 0.98.0: " + sa.keys.joinToString { id -> "${series.first { it.id == id }.title} ${pct(sa.getValue(id))} -> ${pct(sb[id] ?: 0.0)}" })
|
||||
sa.keys.forEach { id -> assertEquals("${programming.name}: ${part.fromHour}-${part.toHour} share", sa.getValue(id), sb[id] ?: 0.0, 0.05) }
|
||||
}
|
||||
out.appendLine()
|
||||
}
|
||||
File(dir, "rollout-proposal-replay.txt").writeText(out.toString())
|
||||
File(dir, "weighted-rollout-replay.txt").writeText(out.toString())
|
||||
println(out)
|
||||
}
|
||||
}
|
||||
@@ -151,8 +151,61 @@ class WeightedRotationTest {
|
||||
sketch.forEachIndexed { i, mark -> assertEquals(deck[(at + i) % deck.size], mark) }
|
||||
}
|
||||
|
||||
@Test fun onlyOrbitThreeIsWeighted() {
|
||||
assertEquals(listOf(103), SmartChannels.filter { it.tierWeights != null }.map { it.number })
|
||||
@Test fun blocksLeftOnEqualTurnsPlanExactlyAsTheyDidAndWeightedOnesCarryOn() {
|
||||
// Tots' shape: a weighted day, and a night on equal turns with finish-together, sharing no shows.
|
||||
val day = listOf(show("A", 40, 10), show("B", 60, 12))
|
||||
val night = listOf(show("Big", 145, 26), show("Small", 26, 10), show("Mid", 52, 11))
|
||||
val pool = day + night
|
||||
val parts = listOf(DayPart(6, 17, listOf("A", "B")), DayPart(17, 6, night.map { it.title }, weighted = false))
|
||||
val mixed = { _: PoolSeries -> true }
|
||||
val plan = extendByBlock(pool, ScheduleCursor(), start, start + 14 * this.day, weights(), parts, zone, { _, _, _ -> false }, true, mixed, true)
|
||||
// The night, programme by programme, is what equal turns book there today, with the day on equal turns too.
|
||||
val nights = plan.entries.filter { it.seriesId in night.map { s -> s.id } }
|
||||
val alone = extendSchedule(pool, ScheduleCursor(), start, start + 30 * this.day, null, true, parts, zone, shuffle = true, mixed = mixed).entries.filter { it.seriesId in night.map { s -> s.id } }
|
||||
assertEquals(alone.take(nights.size).map { it.seriesId to it.mark }, nights.map { it.seriesId to it.mark })
|
||||
assertTrue(nights.none { "weighted" in it.why }); assertTrue(plan.entries.filter { it.seriesId in listOf("A", "B") }.all { "weighted" in it.why })
|
||||
plan.entries.zipWithNext().forEach { (a, b) -> assertEquals(a.endMs, b.startMs) }
|
||||
// And a top-up in the middle changes nothing.
|
||||
val first = extendByBlock(pool, ScheduleCursor(), start, start + 5 * this.day + 3 * 3_600_000L, weights(), parts, zone, { _, _, _ -> false }, true, mixed, true)
|
||||
val rest = topUpPlan(first, first.tail, pool, first.endMs - SCHEDULE_AHEAD_MS + 1, finishTogether = true, dayParts = parts, zone = zone, shuffle = true, mixed = mixed, weightOf = weights())!!
|
||||
assertEquals(plan.entries.map { it.seriesId to it.mark }.take(rest.entries.size), rest.entries.map { it.seriesId to it.mark })
|
||||
}
|
||||
|
||||
@Test fun aBlocksOwnWeightsApplyOnlyThere() {
|
||||
val core = (1..4).map { show("Core $it", 300) }; val trio = (1..3).map { show("Trio $it", 300) }
|
||||
val parts = listOf(DayPart(16, 18, (trio + core).map { it.title }, weights = trio.associate { seriesKey(it.title) to TIER_CORE }), DayPart(18, 16, (trio + core).map { it.title }))
|
||||
val plan = run(core + trio, weights(*core.map { it.title to TIER_CORE }.toTypedArray()), parts = parts)
|
||||
fun share(teatime: Boolean) = plan.entries.filter { (java.time.Instant.ofEpochMilli(it.startMs).atZone(zone).hour in 16..17) == teatime }
|
||||
.let { es -> es.count { it.seriesId.startsWith("Trio") }.toDouble() / es.size }
|
||||
assertEquals(3.0 / 7, share(true), 0.05)
|
||||
assertEquals(6.0 / 18, share(false), 0.05)
|
||||
}
|
||||
|
||||
@Test fun aShowAiringElsewhereIsSkipped() {
|
||||
val pool = listOf(show("Shared", 100), show("B", 100), show("C", 100))
|
||||
val busy = { show: PoolSeries, from: Long, _: Long -> show.title == "Shared" && java.time.Instant.ofEpochMilli(from).atZone(zone).hour in 18..21 }
|
||||
val plan = extendWeighted(pool, ScheduleCursor(), start, start + 7 * day, weights(), emptyList(), zone, busy, false, { false })
|
||||
assertTrue(plan.entries.none { busy(pool[0], it.startMs, it.endMs) && it.seriesId == "Shared" })
|
||||
assertTrue(plan.entries.any { it.seriesId == "Shared" })
|
||||
}
|
||||
|
||||
@Test fun theApprovedChannelsAreWeightedAndTotsBedtimeIsNot() {
|
||||
assertEquals(listOf(103, 202, 203, 603, 605, 614), SmartChannels.filter { it.tierWeights != null }.map { it.number }.sorted())
|
||||
val tots = SmartChannels.first { it.number == TOTS_NUMBER }
|
||||
assertEquals(listOf(true, true, false, false), tots.dayParts.map { it.weighted })
|
||||
val toonz = SmartChannels.first { it.number == 605 }
|
||||
val teatime = toonz.dayParts.single { it.weights.isNotEmpty() }
|
||||
assertEquals(16 to 18, teatime.fromHour to teatime.toHour)
|
||||
assertEquals(setOf("Danger Mouse", "Count Duckula", "Bananaman").map(::seriesKey).toSet(), teatime.weights.keys)
|
||||
assertEquals(TIER_SUPPORTING, toonz.weightOf(show("Danger Mouse", 1)), 0.0)
|
||||
assertEquals(TIER_CORE, toonz.weightOf(show("Looney Tunes", 1)), 0.0)
|
||||
assertEquals(TIER_SURPRISE, SmartChannels.first { it.number == 203 }.weightOf(show("Dirty Jobs", 1)), 0.0)
|
||||
assertEquals(TIER_CORE, SmartChannels.first { it.number == 603 }.weightOf(show("Mighty Morphin Power Rangers", 1)), 0.0)
|
||||
assertEquals(TIER_CORE, SmartChannels.first { it.number == 202 }.weightOf(show("Cosmos", 1)), 0.0)
|
||||
assertTrue(SmartChannels.filter { it.number !in setOf(103, 202, 203, 603, 605, 614) }.all { p -> p.dayParts.all { it.weighted && it.weights.isEmpty() } })
|
||||
}
|
||||
|
||||
@Test fun orbitThreesTiers() {
|
||||
val three = SmartChannels.first { it.number == 103 }
|
||||
assertTrue(three.searches.none { seriesKey(it) == seriesKey("Family Guy") })
|
||||
assertEquals(TIER_CORE, three.weightOf(show("Gavin & Stacey", 1)), 0.0)
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
# Orbit TV 0.98.0: weighted rotation on Odyssey, Wild, Orbit X, ToonZ and Tots (Morning and Playtime)
|
||||
|
||||
Paul approved the rollout on 4 November 2026 at 00:21, with these decisions per channel. The change is to scheduling only: playback, presentation, assets and the homepage are unchanged. Orbit Three stays as 0.97.0 made it.
|
||||
|
||||
## What's in it
|
||||
|
||||
- **Odyssey (202), Wild (203) and Orbit X (603)** use weighted rotation with their briefs' tiers. These are now in the app as `OdysseyTiers`, `WildTiers` and `OrbitXTiers` in ChannelIdentities.kt.
|
||||
- **Odyssey:** the brief's core is 3 and everything else is 2, so the Journeys titles are equal within their weekend block.
|
||||
- **Wild:** the survival shows, The Crocodile Hunter and River Monsters are 3, supporting is 2, and Dirty Jobs is 1.
|
||||
- **Orbit X:** the core and its earlier names are 3, and everything else is 2.
|
||||
- **ToonZ (605)** has its core at 3 and everything else at 2. Danger Mouse, Count Duckula and Bananaman are weighted 3 within the British teatime block (16:00 to 18:00) only, through a new per-block override (`DayPart.weights`). Every other daypart is as approved.
|
||||
- **Tots (614)** has weighted rotation for Morning (06:00 to 09:00) and Playtime (09:00 to 17:00) only, with every show equal. Wind Down (17:00 to 21:00) and Night (21:00 to 06:00) stay on today's equal turns through a new per-block switch (`DayPart.weighted = false`).
|
||||
- Bedtime keeps its shows, shuffle, finish-together and soothing identity.
|
||||
- Wind Down Now is unchanged.
|
||||
- **New `extendByBlock`** (ChannelSchedule.kt) plans each stretch of weighted blocks with the 0.97.0 rule and each stretch of the others with the existing rule, carrying the cursor across.
|
||||
- On a channel where every block is weighted, such as Orbit Three, it makes exactly one call to the 0.97.0 rule. The fingerprint below confirms Three is unchanged.
|
||||
- **Unchanged:** shuffled and in-order episode choice, cursors and decks, cross-channel clash avoidance (checked first, as before), every block, event and timing, every committed booking, and the other 24 channels.
|
||||
|
||||
## Checks before install
|
||||
|
||||
- **397 unit tests pass**, including the hand-run replays on copies of the box's files. Lint has no errors.
|
||||
- **Three new unit tests** in WeightedRotationTest:
|
||||
- A block left on equal turns books exactly what equal turns book today, and a top-up in the middle changes nothing.
|
||||
- A block's own weights apply only in that block.
|
||||
- A show airing on another channel is skipped.
|
||||
- **One configuration test:** exactly 103, 202, 203, 603, 605 and 614 are weighted. Only Tots' Wind Down and Night are off, only ToonZ's teatime has its own weights, and no other channel has either.
|
||||
- **Four-week replay on each channel's real pool** (docs/replays/weighted-rollout-replay-0.98.0.txt, WeightedRolloutReplayTest).
|
||||
- Today's rule and 0.98.0 both top up every six hours from the box's committed plan.
|
||||
- Both avoid every other channel's programmes, as the box does.
|
||||
- It was run again with a save and reload every 18 hours.
|
||||
|
||||
| | Core airtime | Variety, main block (effective shows) | Same file within 7 days; median gap | Never aired / longest wait | Same show twice running |
|
||||
|---|---|---|---|---|---|
|
||||
| Wild today → 0.98.0 | 50% → 50% | evening 3.8 → 9.9 of 10 | 0 → 60; 25.3 → 6.7 d | none / 26.8 d → none / 2.2 d (Dirty Jobs 13.8 d, Saturdays only) | 9 → 0 |
|
||||
| Orbit X | 80% → 64% (Saturday morning and after school 75% → 88%) | evening 8.7 → 20.2 of 21 | 239 → 108; 4.9 → 10.2 d | Bucky O'Hare, Visionaries / 28 d → none / 2.0 d | 29 → 0 |
|
||||
| Odyssey | 66% → 69% | evening 4.9 → 15.5 of 16 | 153 → 248; 5.6 → 5.1 d | 7 shows / 28 d → none / 13.9 d (The Civil War, weekends only) | 12 → 0 |
|
||||
| ToonZ | 72% → 58%; teatime trio about 30% of teatime | daytime 7.2 → 13.5 of 14 | 898 → 953; 2.4 → 7.3 d | none / 16.3 d → none / 1.6 d | 40 → 0 |
|
||||
| Tots, Morning and Playtime | (no tiers) | morning 4.6 → 9 of 9; playtime 22.9 → 32 of 32 | 439 → 621 for the whole channel; 7.1 → 7.0 d | Andy's Dinosaur Adventures / 28 d → none | 4 → 0 |
|
||||
| Tots, Wind Down and Night | unchanged | Night Garden 76% → 76%, 75% → 74%; every share within a point | on today's rule | unchanged | today's rule |
|
||||
|
||||
- **In every 0.98.0 run:**
|
||||
- No file airs again within 24 hours in a weighted block.
|
||||
- No in-order show steps back, and no shuffled show leaves its deck.
|
||||
- There are no gaps, overlaps or programmes outside their block, and nothing in a block is never aired.
|
||||
- Committed programmes come through exactly.
|
||||
- The save-and-reload run is identical.
|
||||
- **Clash avoidance:** 0.98.0 has no programme on at the same time as the same show on another channel, on all five channels. Today's rule had one, on Tots.
|
||||
- **Tots' bedtime blocks** carry only today's reasons, with no weighted bookings. Their shares match today's within a point. Their programmes start at slightly different times, because the day before them now ends at different moments, so the order shifts at block edges. The unit test shows that with the same timing the bookings are identical.
|
||||
- **Every other channel:** the four-week replay of all 30 channels was run on 0.97.0 and on 0.98.0 (docs/replays/replay-fingerprints-0.98.0.txt), each topping up as its app does.
|
||||
- Every committed fingerprint is identical.
|
||||
- Only 202, 203, 603, 605 and 614 differ, as intended.
|
||||
- Orbit Three (103) and the other 24 channels are identical.
|
||||
- The Three replay (0.97.0's figures) and the presentation replay (83 transitions, committedKeptExactly=true) are unchanged.
|
||||
|
||||
## Known limits
|
||||
|
||||
- **On air from about 10 November.** Each channel's committed plan runs to about 10 November, so 0.98.0 starts booking from there and the change shows on air as the plans roll forward.
|
||||
- **The cost is more repeats of small shows.** Short catalogues now get their fair share, so some of their episodes come round within a week (Wild 0 → 60, Odyssey 153 → 248, Tots 439 → 621). None comes round within 24 hours in a weighted block. Orbit X's repeats fall.
|
||||
- **Not covered by the replays:**
|
||||
- The replays use copies of the box's files from 3 November.
|
||||
- Clash avoidance in the replays is against other channels' replayed plans, which is close to, but not exactly, the order the box tops up in.
|
||||
- Tested here as scheduling logic only. What airs needs checking on the box.
|
||||
- **Tots bedtime** is unchanged, as asked. The future read-only proposal will look at separating Wind Down from overnight and at more bedtime titles from the library.
|
||||
|
||||
## Rollback
|
||||
|
||||
Install 0.97.0. It reads the same cursor fields, and the new DayPart fields exist only in code, so saved plans load unchanged.
|
||||
@@ -0,0 +1,85 @@
|
||||
# Four-week replay fingerprints, 0.97.0 (88e8021) against 0.98.0, each topping up as the app does (weighted where configured)
|
||||
|
||||
## 0.97.0
|
||||
101 committed=840c3b65fd909abf kept=true fourWeeks=e094e45ac7f3f489 programmes=2129
|
||||
102 committed=7ed018e151da9e1b kept=true fourWeeks=d4608c190a1df463 programmes=1282
|
||||
103 committed=b9a32f1cd8b8c6ca kept=true fourWeeks=f749aafba58ca7c3 programmes=1809
|
||||
104 committed=fa96701157492ea5 kept=true fourWeeks=5cb590ff849c62a1 programmes=1706
|
||||
105 committed=ede4d27708287a02 kept=true fourWeeks=9e42e2a1a520b9e1 programmes=2438
|
||||
106 committed=c6e05fe7b6b8119e kept=true fourWeeks=26f095b2150baf74 programmes=1158
|
||||
107 committed=5f64ad62f2ba89e5 kept=true fourWeeks=6a0675caf3561133 programmes=947
|
||||
201 committed=dc8869b8ce635e9a kept=true fourWeeks=fb9add3f61acfeba programmes=945
|
||||
202 committed=156aae666e58cfe4 kept=true fourWeeks=4226e4c5a3d51e7f programmes=1179
|
||||
203 committed=8e067822f46cafca kept=true fourWeeks=81ebfc4281670881 programmes=1075
|
||||
204 committed=6ca233f2ac9cf4a1 kept=true fourWeeks=4400eee18348f845 programmes=1179
|
||||
301 committed=a366040ccc54b12f kept=true fourWeeks=12c5b036edae175e programmes=356
|
||||
302 committed=137c4a9234258f80 kept=true fourWeeks=391a4456ada2683e programmes=440
|
||||
303 committed=b6c2d88f2604a452 kept=true fourWeeks=366e574763b92fb8 programmes=416
|
||||
304 committed=7241ac7470f6abf8 kept=true fourWeeks=94c07a1904e72658 programmes=491
|
||||
305 committed=6188e9c6e014c2a0 kept=true fourWeeks=7a86ddd82fe02edb programmes=466
|
||||
306 committed=3ee1d14f9d6cfe1e kept=true fourWeeks=a5ee7035b6febc2d programmes=483
|
||||
307 committed=4f7338c2b013e02f kept=true fourWeeks=4248b99368962d00 programmes=433
|
||||
308 committed=0eeae8fbb0089be5 kept=true fourWeeks=737bc88204988895 programmes=507
|
||||
309 committed=b2c3d6abe1c22853 kept=true fourWeeks=ec915b9db5a309f3 programmes=490
|
||||
401 committed=688529b06ec10271 kept=true fourWeeks=ad70bbedc533af1f programmes=872
|
||||
601 committed=b36f48539d13de10 kept=true fourWeeks=f50d223e2b0e6ad2 programmes=2130
|
||||
602 committed=29d1438c5b40b144 kept=true fourWeeks=7b0950692ef18715 programmes=2275
|
||||
603 committed=f3c481ac51c14d44 kept=true fourWeeks=2c7db9fbcabef784 programmes=2274
|
||||
604 committed=b2fb73b2b766be7a kept=true fourWeeks=995461f802aa9956 programmes=2899
|
||||
605 committed=603c75c5d4f6ad50 kept=true fourWeeks=19a0d54636140448 programmes=4494
|
||||
611 committed=77a3d29c095f8ad1 kept=true fourWeeks=b12d8cd3f51eaa74 programmes=2990
|
||||
612 committed=bd4147ddf93b22ea kept=true fourWeeks=c5c0658fd688013f programmes=568
|
||||
613 committed=cd6dfd1e4f97948d kept=true fourWeeks=429d10fa9694af8b programmes=514
|
||||
614 committed=10ab3c9c03ae82fa kept=true fourWeeks=5ff09b5be9295129 programmes=3671
|
||||
|
||||
## 0.98.0
|
||||
101 committed=840c3b65fd909abf kept=true fourWeeks=e094e45ac7f3f489 programmes=2129
|
||||
102 committed=7ed018e151da9e1b kept=true fourWeeks=d4608c190a1df463 programmes=1282
|
||||
103 committed=b9a32f1cd8b8c6ca kept=true fourWeeks=f749aafba58ca7c3 programmes=1809
|
||||
104 committed=fa96701157492ea5 kept=true fourWeeks=5cb590ff849c62a1 programmes=1706
|
||||
105 committed=ede4d27708287a02 kept=true fourWeeks=9e42e2a1a520b9e1 programmes=2438
|
||||
106 committed=c6e05fe7b6b8119e kept=true fourWeeks=26f095b2150baf74 programmes=1158
|
||||
107 committed=5f64ad62f2ba89e5 kept=true fourWeeks=6a0675caf3561133 programmes=947
|
||||
201 committed=dc8869b8ce635e9a kept=true fourWeeks=fb9add3f61acfeba programmes=945
|
||||
202 committed=156aae666e58cfe4 kept=true fourWeeks=da3d0853c28014cc programmes=1076
|
||||
203 committed=8e067822f46cafca kept=true fourWeeks=78cef32e791758a4 programmes=1126
|
||||
204 committed=6ca233f2ac9cf4a1 kept=true fourWeeks=4400eee18348f845 programmes=1179
|
||||
301 committed=a366040ccc54b12f kept=true fourWeeks=12c5b036edae175e programmes=356
|
||||
302 committed=137c4a9234258f80 kept=true fourWeeks=391a4456ada2683e programmes=440
|
||||
303 committed=b6c2d88f2604a452 kept=true fourWeeks=366e574763b92fb8 programmes=416
|
||||
304 committed=7241ac7470f6abf8 kept=true fourWeeks=94c07a1904e72658 programmes=491
|
||||
305 committed=6188e9c6e014c2a0 kept=true fourWeeks=7a86ddd82fe02edb programmes=466
|
||||
306 committed=3ee1d14f9d6cfe1e kept=true fourWeeks=a5ee7035b6febc2d programmes=483
|
||||
307 committed=4f7338c2b013e02f kept=true fourWeeks=4248b99368962d00 programmes=433
|
||||
308 committed=0eeae8fbb0089be5 kept=true fourWeeks=737bc88204988895 programmes=507
|
||||
309 committed=b2c3d6abe1c22853 kept=true fourWeeks=ec915b9db5a309f3 programmes=490
|
||||
401 committed=688529b06ec10271 kept=true fourWeeks=ad70bbedc533af1f programmes=872
|
||||
601 committed=b36f48539d13de10 kept=true fourWeeks=f50d223e2b0e6ad2 programmes=2130
|
||||
602 committed=29d1438c5b40b144 kept=true fourWeeks=7b0950692ef18715 programmes=2275
|
||||
603 committed=f3c481ac51c14d44 kept=true fourWeeks=e7e55cd1a46e8137 programmes=2264
|
||||
604 committed=b2fb73b2b766be7a kept=true fourWeeks=995461f802aa9956 programmes=2899
|
||||
605 committed=603c75c5d4f6ad50 kept=true fourWeeks=cfc9bba814d15412 programmes=4284
|
||||
611 committed=77a3d29c095f8ad1 kept=true fourWeeks=b12d8cd3f51eaa74 programmes=2990
|
||||
612 committed=bd4147ddf93b22ea kept=true fourWeeks=c5c0658fd688013f programmes=568
|
||||
613 committed=cd6dfd1e4f97948d kept=true fourWeeks=429d10fa9694af8b programmes=514
|
||||
614 committed=10ab3c9c03ae82fa kept=true fourWeeks=477e941c7d3a939a programmes=3881
|
||||
|
||||
## Differences
|
||||
9,10c9,10
|
||||
< 202 committed=156aae666e58cfe4 kept=true fourWeeks=4226e4c5a3d51e7f programmes=1179
|
||||
< 203 committed=8e067822f46cafca kept=true fourWeeks=81ebfc4281670881 programmes=1075
|
||||
---
|
||||
> 202 committed=156aae666e58cfe4 kept=true fourWeeks=da3d0853c28014cc programmes=1076
|
||||
> 203 committed=8e067822f46cafca kept=true fourWeeks=78cef32e791758a4 programmes=1126
|
||||
24c24
|
||||
< 603 committed=f3c481ac51c14d44 kept=true fourWeeks=2c7db9fbcabef784 programmes=2274
|
||||
---
|
||||
> 603 committed=f3c481ac51c14d44 kept=true fourWeeks=e7e55cd1a46e8137 programmes=2264
|
||||
26c26
|
||||
< 605 committed=603c75c5d4f6ad50 kept=true fourWeeks=19a0d54636140448 programmes=4494
|
||||
---
|
||||
> 605 committed=603c75c5d4f6ad50 kept=true fourWeeks=cfc9bba814d15412 programmes=4284
|
||||
30c30
|
||||
< 614 committed=10ab3c9c03ae82fa kept=true fourWeeks=5ff09b5be9295129 programmes=3671
|
||||
---
|
||||
> 614 committed=10ab3c9c03ae82fa kept=true fourWeeks=477e941c7d3a939a programmes=3881
|
||||
@@ -0,0 +1,129 @@
|
||||
0.98.0: four weeks of new bookings after each committed plan, today's rule against the app's weighted rotation, avoiding
|
||||
every other channel's programmes as the box does. Copies of the box's files from 3 November.
|
||||
|
||||
== Tots (614), committed plan ends 2026-11-10T00:40:57
|
||||
in the pool: 36 shows; core 0, supporting 36, surprise 0; 17-21 stays on equal turns; 21-6 stays on equal turns
|
||||
Today: 2869 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%, CBeebies Bedtime Stories 10%, Clangers 9%
|
||||
block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 75%, CBeebies Bedtime Stories 10%, Clangers 10%
|
||||
block 6-9: core 0%, 8 shows, effectively 4.6 equal shows; top Teletubbies 36%, Clifford the Big Red Dog 19%, Bluey (2018) 15%
|
||||
block 9-17: core 0%, 30 shows, effectively 22.9 equal shows; top Rusty Rivets 7%, Teletubbies 6%, Shimmer and Shine 6%
|
||||
repeats: 1864 different episodes; same file again within 24 h 8, within 7 days 439, median 7.1 days between repeats (within 24 h in weighted blocks: 0)
|
||||
starvation: never aired Andy's Dinosaur Adventures; longest waits Andy's Dinosaur Adventures 28.0 d, Andy's Baby Animals 27.7 d, Balamory (2026) 27.3 d, Noddy's Toyland Adventures 23.4 d
|
||||
on another channel at the same time: 1
|
||||
rules: same show twice running (weighted blocks) 4; three-hour stretches over half one show 488; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
Weighted (0.98.0): 3058 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%, CBeebies Bedtime Stories 10%, Clangers 9%
|
||||
block 21-6: core 0%, 4 shows, effectively 1.7 equal shows; top In The Night Garden 74%, CBeebies Bedtime Stories 10%, Clangers 10%
|
||||
block 6-9: core 0%, 9 shows, effectively 9.0 equal shows; top Clifford the Big Red Dog 11%, Teletubbies 11%, Andy's Wild Adventures 11%
|
||||
block 9-17: core 0%, 32 shows, effectively 32.0 equal shows; top Paw Patrol 3%, Nella the Princess Knight 3%, Rusty Rivets 3%
|
||||
repeats: 1771 different episodes; same file again within 24 h 6, within 7 days 621, 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 5.0 d, Angelina Ballerina 1.9 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 0; three-hour stretches over half one show 492; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
a save and reload every 18 hours gives the identical four weeks: true
|
||||
17-21 on equal turns, share today -> 0.98.0: CBeebies Bedtime Stories 10% -> 10%, In The Night Garden 76% -> 76%, Clangers 9% -> 9%, BeddyByes 5% -> 5%
|
||||
21-6 on equal turns, share today -> 0.98.0: In The Night Garden 75% -> 74%, CBeebies Bedtime Stories 10% -> 10%, Clangers 10% -> 10%, BeddyByes 6% -> 6%
|
||||
|
||||
== ToonZ (605), committed plan ends 2026-11-10T10:17:11
|
||||
in the pool: 17 shows; core 7, supporting 10, surprise 0; 16-18 weights 3 shows 3.0
|
||||
Today: 3852 programmes
|
||||
airtime by tier: core 72%, supporting 28%, surprise 0%
|
||||
block 0-6: core 61%, 17 shows, effectively 8.7 equal shows; top Looney Tunes 21%, Tom and Jerry 18%, Count Duckula 10%
|
||||
block 10-16: core 76%, 14 shows, effectively 7.2 equal shows; top Looney Tunes 25%, Tom and Jerry 21%, The Flintstones 12%
|
||||
block 16-18: core 72%, 10 shows, effectively 6.9 equal shows; top Looney Tunes 23%, Tom and Jerry 18%, Count Duckula 13%
|
||||
block 18-0: core 76%, 14 shows, effectively 6.8 equal shows; top Looney Tunes 28%, Tom and Jerry 19%, The Flintstones 11%
|
||||
block 6-10: core 76%, 14 shows, effectively 6.7 equal shows; top Looney Tunes 28%, Tom and Jerry 20%, The Flintstones 12%
|
||||
repeats: 2213 different episodes; same file again within 24 h 1, within 7 days 898, median 2.4 days between repeats
|
||||
starvation: never aired none; longest waits Wacky Races 16.3 d, Scooby-Doo, Where Are You! 16.0 d, Dastardly & Muttley in Their Flying Machines 14.4 d, Bananaman 13.9 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 40; three-hour stretches over half one show 836; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
Weighted (0.98.0): 3646 programmes
|
||||
airtime by tier: core 58%, supporting 42%, surprise 0%
|
||||
block 0-6: core 51%, 17 shows, effectively 16.4 equal shows; top Scooby-Doo, Where Are You! 7%, The Jetsons 7%, The Flintstones 7%
|
||||
block 10-16: core 60%, 14 shows, effectively 13.5 equal shows; top The Flintstones 9%, The Jetsons 9%, Scooby-Doo, Where Are You! 9%
|
||||
block 16-18: core 70%, 10 shows, effectively 10.0 equal shows; top The Jetsons 11%, Danger Mouse 10%, Count Duckula 10%
|
||||
block 18-0: core 60%, 14 shows, effectively 13.5 equal shows; top Scooby-Doo, Where Are You! 9%, The Flintstones 9%, Popeye the Sailor 9%
|
||||
block 6-10: core 60%, 14 shows, effectively 13.5 equal shows; top The Jetsons 9%, Scooby-Doo, Where Are You! 9%, The Yogi Bear Show 8%
|
||||
repeats: 1583 different episodes; same file again within 24 h 0, within 7 days 953, median 7.3 days between repeats
|
||||
starvation: never aired none; longest waits Danger Mouse 1.6 d, Count Duckula 1.5 d, Top Cat 1.1 d, Bananaman 0.8 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
a save and reload every 18 hours gives the identical four weeks: true
|
||||
|
||||
== Odyssey (202), committed plan ends 2026-11-10T12:30:42
|
||||
in the pool: 36 shows; core 17, supporting 19, surprise 0
|
||||
Today: 981 programmes
|
||||
airtime by tier: core 66%, supporting 34%, surprise 0%
|
||||
block 18-23: core 99%, 13 shows, effectively 4.9 equal shows; top Horizon 28%, Through the Wormhole 22%, The Universe 22%
|
||||
block 23-6: core 44%, 4 shows, effectively 2.8 equal shows; top Mayday 43%, The Universe 39%, Seconds From Disaster 13%
|
||||
block all: core 72%, 15 shows, effectively 4.4 equal shows; top The Universe 39%, How Do They Do It? 20%, Impossible Engineering 14%
|
||||
event 14-18: core 0%, 8 shows, effectively 3.7 equal shows; top The World at War 38%, Long Way Down 29%, An Idiot Abroad 18%
|
||||
repeats: 759 different episodes; same file again within 24 h 0, within 7 days 153, median 5.6 days between repeats
|
||||
starvation: never aired Cosmos, Wonders of the Universe, Wonders of the Solar System, James May's Man Lab, The Ascent of Man, The Story of Maths, Walking with Dinosaurs; longest waits Cosmos 28.0 d, Wonders of the Universe 28.0 d, Wonders of the Solar System 28.0 d, James May's Man Lab 28.0 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 12; three-hour stretches over half one show 101; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
Weighted (0.98.0): 874 programmes
|
||||
airtime by tier: core 69%, supporting 31%, surprise 0%
|
||||
block 18-23: core 93%, 16 shows, effectively 15.5 equal shows; top Human Universe 7%, Wonders of the Solar System 7%, Forces of Nature with Brian Cox 7%
|
||||
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 75%, 22 shows, effectively 20.8 equal shows; top Wonders of the Solar System 5%, Wonders of the Universe 5%, Forces of Nature with Brian Cox 5%
|
||||
event 14-18: core 0%, 8 shows, effectively 8.0 equal shows; top The World at War 14%, Long Way Down 13%, An Idiot Abroad 13%
|
||||
repeats: 551 different episodes; same file again within 24 h 0, within 7 days 248, median 5.1 days between repeats
|
||||
starvation: never aired none; longest waits The Civil War 13.9 d, The Story of India 7.9 d, The World at War 7.1 d, Civilisation 7.0 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 0; three-hour stretches over half one show 2; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
a save and reload every 18 hours gives the identical four weeks: true
|
||||
|
||||
== Orbit Wild (203), committed plan ends 2026-11-10T12:10:59
|
||||
in the pool: 25 shows; core 10, supporting 14, surprise 1
|
||||
Today: 846 programmes
|
||||
airtime by tier: core 50%, supporting 50%, surprise 0%
|
||||
block 18-22: core 100%, 10 shows, effectively 3.8 equal shows; top Alone 36%, Naked and Afraid 33%, Man vs. Wild 13%
|
||||
block 22-6: core 0%, 7 shows, effectively 7.0 equal shows; top Swamp People 15%, Mountain Men 15%, Life Below Zero 14%
|
||||
block 6-18: core 66%, 17 shows, effectively 7.0 equal shows; top Alone 24%, Naked and Afraid 23%, Whale Wars 12%
|
||||
event 22-6: core 0%, 8 shows, effectively 7.9 equal shows; top Mountain Men 15%, Deadliest Catch 14%, Swamp People 14%
|
||||
repeats: 830 different episodes; same file again within 24 h 0, within 7 days 0, median 25.3 days between repeats
|
||||
starvation: never aired none; longest waits Dual Survival 26.8 d, Running Wild with Bear Grylls 26.2 d, Survival with Ray Mears 24.6 d, Expedition Tiger 23.4 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 9; three-hour stretches over half one show 14; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
Weighted (0.98.0): 896 programmes
|
||||
airtime by tier: core 50%, supporting 49%, surprise 0%
|
||||
block 18-22: core 100%, 10 shows, effectively 9.9 equal shows; top Naked and Afraid 11%, The Crocodile Hunter 11%, Running Wild with Bear Grylls 10%
|
||||
block 22-6: core 0%, 7 shows, effectively 7.0 equal shows; top Ax Men 14%, Ice Road Truckers 14%, Life Below Zero 14%
|
||||
block 6-18: core 67%, 17 shows, effectively 16.4 equal shows; top River Monsters 7%, Running Wild with Bear Grylls 7%, Man vs. Wild 7%
|
||||
event 22-6: core 0%, 8 shows, effectively 7.8 equal shows; top Ax Men 14%, Ice Road Truckers 14%, Deadliest Catch 14%
|
||||
repeats: 797 different episodes; same file again within 24 h 0, within 7 days 60, median 6.7 days between repeats
|
||||
starvation: never aired none; longest waits Dirty Jobs 13.8 d, Shark Week 2.2 d, Whale Wars 2.2 d, Survival with Ray Mears 2.1 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
a save and reload every 18 hours gives the identical four weeks: true
|
||||
|
||||
== Orbit X (603), committed plan ends 2026-11-10T09:25:30
|
||||
in the pool: 21 shows; core 10, supporting 11, surprise 0
|
||||
Today: 1838 programmes
|
||||
airtime by tier: core 80%, supporting 20%, surprise 0%
|
||||
block 18-23: core 68%, 19 shows, effectively 8.7 equal shows; top G.I. Joe 20%, Power Rangers 20%, X-Men: The Animated Series 11%
|
||||
block 23-6: core 86%, 17 shows, effectively 6.0 equal shows; top G.I. Joe 28%, Power Rangers 26%, Teenage Mutant Ninja Turtles 8%
|
||||
block 6-18: core 85%, 17 shows, effectively 6.2 equal shows; top G.I. Joe 27%, Power Rangers 25%, Teenage Mutant Ninja Turtles 8%
|
||||
event 15-18: core 74%, 12 shows, effectively 8.4 equal shows; top G.I. Joe 19%, Power Rangers 17%, X-Men: The Animated Series 15%
|
||||
event 7-12: core 75%, 12 shows, effectively 6.6 equal shows; top G.I. Joe 24%, Power Rangers 22%, X-Men: The Animated Series 14%
|
||||
repeats: 1527 different episodes; same file again within 24 h 0, within 7 days 239, median 4.9 days between repeats
|
||||
starvation: never aired Bucky O'Hare and the Toad Wars!, Visionaries: Knights of the Magical Light; longest waits Bucky O'Hare and the Toad Wars! 28.0 d, Visionaries: Knights of the Magical Light 28.0 d, She-Ra: Princess of Power 26.1 d, Street Sharks 25.9 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 29; three-hour stretches over half one show 432; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
Weighted (0.98.0): 1828 programmes
|
||||
airtime by tier: core 64%, supporting 36%, surprise 0%
|
||||
block 18-23: core 57%, 21 shows, effectively 20.2 equal shows; top Biker Mice from Mars 6%, He-Man and the Masters of the Universe 6%, Digimon: Digital Monsters 6%
|
||||
block 23-6: core 62%, 19 shows, effectively 18.3 equal shows; top G.I. Joe 6%, The Real Ghostbusters 6%, Biker Mice from Mars 6%
|
||||
block 6-18: core 63%, 19 shows, effectively 18.3 equal shows; top G.I. Joe 6%, Teenage Mutant Ninja Turtles 6%, The Transformers 6%
|
||||
event 15-18: core 88%, 12 shows, effectively 11.8 equal shows; top Digimon: Digital Monsters 9%, The Transformers 9%, Teenage Mutant Ninja Turtles 9%
|
||||
event 7-12: core 88%, 12 shows, effectively 11.7 equal shows; top Gargoyles 9%, The Real Ghostbusters 9%, G.I. Joe 9%
|
||||
repeats: 1535 different episodes; same file again within 24 h 0, within 7 days 108, median 10.2 days between repeats
|
||||
starvation: never aired none; longest waits X-Men: The Animated Series 2.0 d, Spider-Man: The Animated Series 1.9 d, Bucky O'Hare and the Toad Wars! 1.3 d, Swat Kats: The Radical Squadron 1.2 d
|
||||
on another channel at the same time: 0
|
||||
rules: same show twice running (weighted blocks) 0; three-hour stretches over half one show 0; in-order stepping back 0; shuffled off its deck 0; gaps 0; outside its block 0
|
||||
a save and reload every 18 hours gives the identical four weeks: true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Weighted rotation rollout proposal: Tots, ToonZ, Odyssey, Wild, Orbit X
|
||||
|
||||
Read-only proposal, 4 November 2026, after 0.97.0 put weighted rotation on Orbit Three. Nothing here is implemented or installed. The tiers are defined only in the replay test (`RolloutProposalReplayTest`).
|
||||
Read-only proposal, 4 November 2026, after 0.97.0 put weighted rotation on Orbit Three. Nothing here is implemented or installed. The tiers were defined only in the replay test (`RolloutProposalReplayTest`, since replaced by `WeightedRolloutReplayTest` for 0.98.0).
|
||||
|
||||
## How the figures were made
|
||||
|
||||
|
||||
Reference in New Issue
Block a user