Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Docs: R-HOUSE-005 records the owner's ruling that formations are not housed (Refs #1703) (#2334)

Eyal Golan834a113237ff
diff --git a/docs/rules/mvp.md b/docs/rules/mvp.md
index 6fc41b3bd..141a899b7 100644
--- a/docs/rules/mvp.md
+++ b/docs/rules/mvp.md
@@ -136,11 +136,11 @@ For R-HOUSE-002, inactive gdd-0.3 synthetic arithmetic prices the surcharge as `
R-HOUSE-003: The people who take a city's housing (`housed`) are its civilians, its craftsmen, its recruits and its groups in training, a halutz group included until it becomes a movable unit. Halutz units do not (Q-HOUSE-5, owner, 15 October 2026). Refugees wait for housing and are not in it.
-For R-HOUSE-003, the inactive gdd-0.3 helper takes independently supplied surcharge, pre-arrival and cohesion resident counts plus own population; it selects no residents and substitutes none of those counts for another (`sim/Statecraft.Sim/Gdd03HousingFormula.cs:68-85@7ec122145`, `:107-125`; `sim/Statecraft.Sim.Tests/Gdd03HousingFormulaTests.cs:39-47@7ec122145`). Negative counts, capacity or upkeep, overpayment, cohesion residents above total own population, and condition outside 0..1 are refused. A zero-population cohesion input therefore requires zero cohesion residents (`docs/gdd/cities.md:27,31@605277dfa511dc512562ececeb273b8393b21d35`). Source: `docs/gdd/cities.md:25@605277dfa511dc512562ececeb273b8393b21d35`, "A civilian resident without dedicated reception, teacher or military-training housing uses ordinary housing."; `docs/gdd/loop-switch.md:33` at that revision says, "use pre-arrival residents for overcrowding deterioration". Those are producer requirements, not resident-selection behavior implemented here. Live status selection (#1689), regions/approved housing locations (#1691; #1690 closed on 2 November 2026, its post-MVP regional pools moved to #2233) and which residents to count (#1668) remain pending under the #1703 status comment, which says, "Regional housing settlement is not yet implemented". The preceding legacy/gdd-0.1 resident set remains unchanged. Under `gdd-0.3` (#1703) a city's Israeli formations are not housed: `housed` is its civilians, craftsmen, recruits and groups in training, so the formations whose home it is no longer count toward its overflow, R-HOUSE-004's weights or R-OBJ-004 (27M-18, owner-approved 1 November 2026: "Housed = civilians, craftsmen, recruits and groups in training. Refugees and pioneer units are not housed."). `gdd-0.1` keeps counting them (Q-HOUSE-5; `Cities.Housed`).
+For R-HOUSE-003, the inactive gdd-0.3 helper takes independently supplied surcharge, pre-arrival and cohesion resident counts plus own population; it selects no residents and substitutes none of those counts for another (`sim/Statecraft.Sim/Gdd03HousingFormula.cs:68-85@7ec122145`, `:107-125`; `sim/Statecraft.Sim.Tests/Gdd03HousingFormulaTests.cs:39-47@7ec122145`). Negative counts, capacity or upkeep, overpayment, cohesion residents above total own population, and condition outside 0..1 are refused. A zero-population cohesion input therefore requires zero cohesion residents (`docs/gdd/cities.md:27,31@605277dfa511dc512562ececeb273b8393b21d35`). Source: `docs/gdd/cities.md:25@605277dfa511dc512562ececeb273b8393b21d35`, "A civilian resident without dedicated reception, teacher or military-training housing uses ordinary housing."; `docs/gdd/loop-switch.md:33` at that revision says, "use pre-arrival residents for overcrowding deterioration". Those are producer requirements, not resident-selection behavior implemented here. Live status selection (#1689), regions/approved housing locations (#1691; #1690 closed on 2 November 2026, its post-MVP regional pools moved to #2233) and which residents to count (#1668) remain pending under the #1703 status comment, which says, "Regional housing settlement is not yet implemented". The preceding legacy/gdd-0.1 resident set remains unchanged. Under `gdd-0.3` (#1703) a city's Israeli formations are not housed: `housed` is its civilians, craftsmen, recruits and groups in training, so the formations whose home it is no longer count toward its overflow, R-HOUSE-004's weights or R-OBJ-004 (27M-18, owner-approved 1 November 2026: "Housed = civilians, craftsmen, recruits and groups in training. Refugees and pioneer units are not housed."; confirmed by the owner, 3 November 2026: "Yes, formations not housed (Recommended)"). `gdd-0.1` keeps counting them (Q-HOUSE-5; `Cities.Housed`).
R-HOUSE-004: In the GDD loop the base of the national `housing` indicator is the people-weighted mean of the cities' housing condition, each city weighed by its housed people (R-HOUSE-003): `sum(condition * housed) / sum(housed)`. Policy effects, map actions and events still act on top, as on any indicator. Decided (owner, 17 Oct 2026, option (a) of Q-PR3-A, relayed on [#855 at 06:33Z](https://github.com/eyalgolan/statecraft-israel/pull/855#issuecomment-6230731177)): the national housing base is the people-weighted mean of city condition, with policy, map actions and events still applied on top. When no city houses anybody the mean is undefined, and the base is `model.yaml`'s. Capacity reaches the level through overflow and condition (R-HOUSE-002).
-R-HOUSE-005: Under `gdd-0.3` only (#1703, the MVP's per-city housing condition), the housing step after R-CITY-004 settles, in #1703's order ("Price the surcharge from pre-deterioration condition, then deteriorate once, then apply cohesion once."), for every city with a condition, with R its housed people (R-HOUSE-003) and P all own population (every city's housed people and refugees plus the strength of every player unit, halutz units included): (1) a surcharge of `R * max(0, money_threshold - c) * money_slope` Money a turn from the condition c before this turn's deterioration, summed over the cities into one Money line (`housing_surcharge`) and borrowed when the Treasury is short (R-MONEY-003); `money_threshold` is 0.50 and `money_slope` is 0.1 Money per housed population unit (owner, 2 November 2026: "Scale it to unit size (Recommended)"; the option read: "0.1 per unit (as #2112 did for Industry), about 7.6 Money a turn at start."), so the shipped census start charges 511 housed units x 0.15 x 0.1 = 7.665 Money on the opening turn; (2) overflow deterioration of `overflow_deterioration * max(0, R - housing_capacity) / R` percentage points (5 pp; owner, 2 November 2026: "Yes, 5 pp under GDD 0.3 (Recommended)"), never below 0, in place of R-HOUSE-002's `overflow_condition_loss`; zero housed loses nothing; (3) a Social cohesion loss of `max_cohesion_loss * sum((R / P) * max(0, (cohesion_threshold - c') / cohesion_threshold))` displayed points (`max_cohesion_loss` 2, `cohesion_threshold` 0.25; owner, 2 November 2026: "Keep the 2-point loss (Recommended)") from the condition c' after deterioration, applied once to `morale` through its permanent shift with one cause line (`housing_cohesion`); zero own population loses nothing. The legacy `homes_lift_morale` link from `housing` into `morale` adds nothing under `gdd-0.3`, so housing lowers Social cohesion only through (3) (#1703 Done-when, with #1715; the Food term stays #1715's). There is no housing upkeep (27M-17, IL 0m), so no unpaid-upkeep deterioration. Values: `content/gdd03-balance.yaml` (`housing.*`), read by `Gdd03HousingFormula`; code: `Cities.UpdateCondition` and `Cities.SettleGdd03`, `EffectsSystem.RetiredGdd03Link`; tests: `Gdd03HousingConditionTests`, `Gdd03MoneyLedgerTests`. The issue's three rules run under `gdd-0.3`: the 5 pp overflow (owner, 2 November 2026: "Yes, 5 pp under GDD 0.3 (Recommended)") and the cohesion term (owner, 2 November 2026: "Keep the 2-point loss (Recommended)"; the option read: "As issue #1703 specifies, GDD 0.3 only."). P is the 12 cities' people as built, plus the player units (owner, 2 November 2026: "The 12 cities' people (Recommended)"; the option read: "As built: only the cities whose housing is tracked."). R is counted after the step's housing arrivals (owner, 2 November 2026: "After housing arrivals (Recommended)"; 27M-15). Formations not housed is a default pending the owner's confirmation on #1703; repairs wait on #1700.
+R-HOUSE-005: Under `gdd-0.3` only (#1703, the MVP's per-city housing condition), the housing step after R-CITY-004 settles, in #1703's order ("Price the surcharge from pre-deterioration condition, then deteriorate once, then apply cohesion once."), for every city with a condition, with R its housed people (R-HOUSE-003) and P all own population (every city's housed people and refugees plus the strength of every player unit, halutz units included): (1) a surcharge of `R * max(0, money_threshold - c) * money_slope` Money a turn from the condition c before this turn's deterioration, summed over the cities into one Money line (`housing_surcharge`) and borrowed when the Treasury is short (R-MONEY-003); `money_threshold` is 0.50 and `money_slope` is 0.1 Money per housed population unit (owner, 2 November 2026: "Scale it to unit size (Recommended)"; the option read: "0.1 per unit (as #2112 did for Industry), about 7.6 Money a turn at start."), so the shipped census start charges 511 housed units x 0.15 x 0.1 = 7.665 Money on the opening turn; (2) overflow deterioration of `overflow_deterioration * max(0, R - housing_capacity) / R` percentage points (5 pp; owner, 2 November 2026: "Yes, 5 pp under GDD 0.3 (Recommended)"), never below 0, in place of R-HOUSE-002's `overflow_condition_loss`; zero housed loses nothing; (3) a Social cohesion loss of `max_cohesion_loss * sum((R / P) * max(0, (cohesion_threshold - c') / cohesion_threshold))` displayed points (`max_cohesion_loss` 2, `cohesion_threshold` 0.25; owner, 2 November 2026: "Keep the 2-point loss (Recommended)") from the condition c' after deterioration, applied once to `morale` through its permanent shift with one cause line (`housing_cohesion`); zero own population loses nothing. The legacy `homes_lift_morale` link from `housing` into `morale` adds nothing under `gdd-0.3`, so housing lowers Social cohesion only through (3) (#1703 Done-when, with #1715; the Food term stays #1715's). There is no housing upkeep (27M-17, IL 0m), so no unpaid-upkeep deterioration. Values: `content/gdd03-balance.yaml` (`housing.*`), read by `Gdd03HousingFormula`; code: `Cities.UpdateCondition` and `Cities.SettleGdd03`, `EffectsSystem.RetiredGdd03Link`; tests: `Gdd03HousingConditionTests`, `Gdd03MoneyLedgerTests`. The issue's three rules run under `gdd-0.3`: the 5 pp overflow (owner, 2 November 2026: "Yes, 5 pp under GDD 0.3 (Recommended)") and the cohesion term (owner, 2 November 2026: "Keep the 2-point loss (Recommended)"; the option read: "As issue #1703 specifies, GDD 0.3 only."). P is the 12 cities' people as built, plus the player units (owner, 2 November 2026: "The 12 cities' people (Recommended)"; the option read: "As built: only the cities whose housing is tracked."). R is counted after the step's housing arrivals (owner, 2 November 2026: "After housing arrivals (Recommended)"; 27M-15). Formations are not housed (owner, 3 November 2026: "Yes, formations not housed (Recommended)", #1703); repairs wait on #1700.
## City projects