From bc07add030276a2aa0fddc0cd334ce91e0afea97 Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Sun, 7 Jun 2026 09:07:33 +0800 Subject: [PATCH] Release v6.0.52: fix same_house(self) bug globally in yoga_engine\n\n- Removed 'if a==b: return False' guard from same_house() function\n- A planet is trivially in the same house as itself (lord(X) == planet case)\n- Prior workaround in mathibhramana variation_2 now redundant but harmless\n- FN: 79->74 (-5). Recall: 92.47%->92.95% (+0.48%). F1: 93.54%->93.80% (+0.26%)\n- kapata: 8->5 FN (3 auto-fixed from global fix)\n- Other rules with same_house(lord, planet) patterns also benefit --- scripts/yoga_engine.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/yoga_engine.py b/scripts/yoga_engine.py index 0de6b389..7c2284e7 100644 --- a/scripts/yoga_engine.py +++ b/scripts/yoga_engine.py @@ -1041,9 +1041,7 @@ class YogaEngine: # v6.0.32: 修复 custom 规则中常用的缺失辅助函数 def same_house(a, b): - """两颗行星是否同宫""" - if a == b: - return False + """两颗行星是否同宫(允许自比较:同星恒为 True)""" ha = ctx.house_of(a) hb = ctx.house_of(b) return ha is not None and ha == hb