From d3cc37b45c3d2f95448bd41d808595356e13aae8 Mon Sep 17 00:00:00 2001 From: 732642856 <732642856@qq.com> Date: Sat, 6 Jun 2026 23:49:03 +0800 Subject: [PATCH] =?UTF-8?q?Release=20v6.0.49:=20fix=20D9=20context=20injec?= =?UTF-8?q?tion=20+=20theevrabuddhi=20(BVR-232);=20Precision=2092.95%?= =?UTF-8?q?=E2=86=9294.69%\n\n1.=20D9=20context=20injection=20fix=20(valid?= =?UTF-8?q?ate=5Flogic=5Fv2.py):\n=20=20=20-=20Bug:=20context=20was=20read?= =?UTF-8?q?=20from=20planet=5Fpositions=5F60.json=20(no=20D9=20data)\n=20?= =?UTF-8?q?=20=20-=20Fix:=20read=20context=20from=20standard=5Ftest=5Fchar?= =?UTF-8?q?ts.json=20(has=20full=20D9/Navamsa/Upagraha)\n=20=20=20-=20Impa?= =?UTF-8?q?ct:=20all=20D9-dependent=20rules=20can=20now=20query=20D9=20pos?= =?UTF-8?q?itions\n\n2.=20theevrabuddhi=5Fyoga=20(BVR-232):\n=20=20=20-=20?= =?UTF-8?q?Old:=20checked=20Mercury's=20D1=20strength=20(completely=20wron?= =?UTF-8?q?g=20logic)\n=20=20=20-=20New:=20L5=20benefic=20in=20D1=20AND=20?= =?UTF-8?q?in=20Navamsa=20Lagna;=20D9=20L1=20lord=20benefic/aspected\n=20?= =?UTF-8?q?=20=20-=20FP:=2019=20=E2=86=92=200=20(clean=20fix=20via=20D9=20?= =?UTF-8?q?engine)\n\n3.=20Metrics:=20Precision=2092.95%=E2=86=9294.69%,?= =?UTF-8?q?=20FP=2073=E2=86=9254,=20F1=2092.32%=E2=86=9293.17%?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- references/yoga_rules.json | 5 +++-- scripts/validate_logic_v2.py | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/references/yoga_rules.json b/references/yoga_rules.json index a9784587..3245dca4 100644 --- a/references/yoga_rules.json +++ b/references/yoga_rules.json @@ -12857,7 +12857,7 @@ "category": "special", "logic": { "type": "custom", - "expr": "\nmerc_h = ctx.house_of('Mercury') if 'Mercury' in ctx.planets else None\nif merc_h is None: False\nelse:\n merc_strong = ctx.is_exalted('Mercury') or ctx.is_own_sign('Mercury')\n merc_kt = ctx.is_kendra(merc_h) or ctx.is_trikona(merc_h)\n ben_aspect = any(b in ctx.planets and aspect(b, 'Mercury') for b in ['Jupiter','Venus'])\n merc_strong or (merc_kt and ben_aspect)\n" + "expr": "# PyJHora/BVR-232: Lord of 5th in Rasi should be a benefic and should be in Navamsa Lagna.\n# Lord of Navamsa Lagna should be a benefic or aspected by benefic.\nl5 = lord(5)\nif l5 not in ctx.planets: False\nelse:\n nb = pyjhora_natural_benefics()\n cond1 = l5 in nb # L5 is a natural benefic\n cond2 = d9_house_of(l5) == 1 # L5 in Navamsa Lagna\n d9_l1 = d9_lord_of_house(1)\n cond3a = d9_l1 in nb # D9 Lagna lord is benefic\n cond3b = d9_l1 is not None and any(p in nb and p != l5 and aspect(p, d9_l1) for p in ctx.planets)\n cond1 and cond2 and (cond3a or cond3b)\n" }, "effects": [ "Sharp intellect, penetrating mind, quick understanding" @@ -12865,7 +12865,8 @@ "strength": "moderate", "enabled": true, "draft": false, - "evidence_note": "Source: B.V. Raman, BVR: BVR-230" + "evidence_note": "Source: B.V. Raman, BVR: BVR-230", + "accuracy_note": "v6.0.49: rewritten to match PyJHora BVR-232 (D9-dependent: L5 benefic + in Navamsa Lagna; D9 L1 benefic/aspected)" }, { "id": "bvr_thrikaala_gnana_yoga", diff --git a/scripts/validate_logic_v2.py b/scripts/validate_logic_v2.py index a8bffa94..54432dda 100644 --- a/scripts/validate_logic_v2.py +++ b/scripts/validate_logic_v2.py @@ -286,19 +286,19 @@ def main(): name = chart['name'] planets = chart['planets'] ascendant = chart['ascendant'] - context = chart.get('context') - # Skill 引擎检测 + # 从 standard_test_charts.json 取完整 context(含 D9/Navamsa/Upagraha 数据) + pyj_chart = pyj_charts.get(name) + if not pyj_chart: + print(f" WARNING: {name} not in PyJhora data") + continue + context = pyj_chart.get('context', {}) + # Skill 引擎检测(使用含 D9 的完整 context) skill_results = engine.detect(planets, ascendant, context=context) skill_yoga_ids = set(r['rule_id'] for r in skill_results) skill_comp = skill_yoga_ids & comparable_rule_ids # 只保留可对比的 total_skill_comp += len(skill_comp) - # PyJhora 结果 - pyj_chart = pyj_charts.get(name) - if not pyj_chart: - print(f" WARNING: {name} not in PyJhora data") - continue pyj_yoga_names = set(pyj_chart.get('expected_yogas', [])) # 将 PyJhora Yoga名映射到 Skill rule_id