Release v6.0.40 Yoga source parity
This commit is contained in:
@@ -1,5 +1,50 @@
|
||||
# 印度占星 Skill 更新日志
|
||||
|
||||
## v6.0.40(2026-06-05)—— Yoga F1 91% 源码口径续航
|
||||
|
||||
> **目标**:在 v6.0.39 首次突破 F1 90% 后继续推进,但仍保持“准确率优先、源码确认后再改”的路线;优先处理 Top residual 中 PyJHora 源码口径明确、收益高且过拟合风险低的规则。
|
||||
|
||||
### 引擎与 helper 修复
|
||||
|
||||
- `scripts/yoga_engine.py` 新增 `pyjhora_natural_benefics()`,复刻 PyJHora `yoga._get_natural_benefics()`:
|
||||
- natural benefics 默认只含 `Jupiter`、`Venus`;
|
||||
- `Mercury` 只有在独处,或与 `Jupiter` / `Venus` 同宫时才作为 benefic;
|
||||
- 不再把 Moon 无条件纳入这组 PyJHora Yoga helper。
|
||||
|
||||
### 高影响规则对齐
|
||||
|
||||
- `bvr_amala_precise`:对齐 PyJHora/BVR-13 的实际实现,从“第10宫只有吉星”改为“任一 PyJHora natural benefic 落 Lagna 或 Moon 起算第10宫”。
|
||||
- `bvr_kaalanirdesat_puthranaasa_yoga`:Variant 230 改用 `pyjhora_planets_aspecting_raasi()`,对齐 PyJHora `house.planets_aspecting_the_raasi()` 行为,替代常规 `rasi_aspects_house()` 语义。
|
||||
- `bvr_bhaga_chumbana_yoga`:从旧 compound 占位条件改为 custom 源码口径:
|
||||
- 7宫主在4宫且 Venus 在4宫;或
|
||||
- Lagna lord 在 D1 或 Navamsa 落陷。
|
||||
|
||||
### 验证结果
|
||||
|
||||
- `scripts/validate_logic_v2.py`:
|
||||
- Precision **94.63%**(v6.0.39 为 93.82%)
|
||||
- Recall **89.04%**(v6.0.39 为 86.70%)
|
||||
- F1 **91.75%**(v6.0.39 为 90.12%)
|
||||
- FP:54;FN:117
|
||||
- `scripts/run_quality_gate.py --skip-yoga-logic`:通过。
|
||||
- pytest **35 passed**
|
||||
- BPHS/Ashtakavarga 不变量 **18/18**
|
||||
- golden case 通过
|
||||
- capability audit valid,0 problem / 0 warning
|
||||
|
||||
### 规则库状态
|
||||
|
||||
- JSON 规则总数:**475**
|
||||
- 启用规则:**381**
|
||||
- 当前验证报告:`references/validation_logic_report.json`
|
||||
|
||||
### 后续优化点
|
||||
|
||||
- 下一轮 Top residual 仍以源码确认优先:`bvr_vanchana_chora_bheethi_yoga`、`bvr_kapata_yoga`、`bvr_mathibhramana_yoga`、`bvr_sumukha_precise`、`bvr_dama_yoga`、`bvr_matru_sneha_yoga`、`bvr_ayatna_griha_prapta_yoga`。
|
||||
- `bvr_vanchana_chora_bheethi_yoga` 的剩余差异很可能与 Gulika/Maandi house-index、PyJHora `benefics_and_malefics()` 动态凶吉口径有关;下一轮应先复现 PyJHora 输入层再改规则。
|
||||
|
||||
---
|
||||
|
||||
## v6.0.39(2026-06-05)—— Yoga F1 90% 源码口径冲刺
|
||||
|
||||
> **目标**:继续用户要求的“准确率优先”路线,不为指标盲目调参;只在确认 PyJHora 源码口径后修改规则或 helper,使 D1/Rasi Yoga 逻辑验证首次突破 F1 90%。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: jyotish-vedic-astrology
|
||||
version: 6.0.39
|
||||
version: 6.0.40
|
||||
description: 印度占星(Jyotish)专业解盘与推运系统。核心能力:PDF星盘输入→严谨解盘→精确推运应期输出。触发词:印度占星、吠陀占星、Jyotish、解盘、推运、星盘分析、Dasha、Transit、Nakshatra、Yoga、出生时间矫正、PDF星盘、读取PDF、分析PDF星盘、现代解读、误判纠错、Varga分盘、综合分析、过境分析、合盘、婚姻匹配、年运盘、Prashna、Argala、Jaimini、Shadbala、Ashtakavarga、HTML报告、深度解盘。
|
||||
---
|
||||
|
||||
@@ -10,7 +10,7 @@ description: 印度占星(Jyotish)专业解盘与推运系统。核心能力
|
||||
> **严格路由**:`references/strict-workflow-router.md`(⭐涉及事业/婚恋/财务/应期/技法验证时必须优先读取)
|
||||
> **覆盖矩阵**:`references/technique-capability-matrix.md`(⭐判断技法 covered/partial/missing 时必须参考)
|
||||
> **机器注册表**:`references/technique_registry.json` + `scripts/audit_capabilities.py`(⭐用于自动审计与CI门禁)
|
||||
> **版本**:v6.0.39-yoga-f1-90-source-parity | **详细变更**:`CHANGELOG.md`
|
||||
> **版本**:v6.0.40-yoga-f1-91-source-parity | **详细变更**:`CHANGELOG.md`
|
||||
|
||||
---
|
||||
|
||||
@@ -301,9 +301,9 @@ $PYTHON $SCRIPT <子命令> [参数]
|
||||
|
||||
---
|
||||
|
||||
**版本**:v6.0.39-yoga-f1-90-source-parity
|
||||
**版本**:v6.0.40-yoga-f1-91-source-parity
|
||||
**创建日期**:2026-04-20
|
||||
**最后更新**:2026-06-05(v6.0.39 继续对齐 PyJHora Yoga 源码口径,实现 Scorpio/Aquarius 动态 co-lord resolver,修复 `bheri_yoga`、`bvr_sada_sanchara_precise`、`bvr_bandhu_pujya_yoga` 等高影响规则;当前 475 条 JSON 规则、381 条启用规则,D1/Rasi 逻辑验证 Precision=93.82%、Recall=86.70%、F1=90.12%,质量门禁通过,报告以 `references/validation_logic_report.json` 为准)
|
||||
**最后更新**:2026-06-05(v6.0.40 继续坚持 PyJHora 源码口径优先,修复 `bvr_amala_precise`、`bvr_kaalanirdesat_puthranaasa_yoga`、`bvr_bhaga_chumbana_yoga` 并新增 `pyjhora_natural_benefics()` helper;当前 475 条 JSON 规则、381 条启用规则,D1/Rasi 逻辑验证 Precision=94.63%、Recall=89.04%、F1=91.75%,质量门禁通过,报告以 `references/validation_logic_report.json` 为准)
|
||||
|
||||
---
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -8999,7 +8999,7 @@
|
||||
"category": "auspicious",
|
||||
"logic": {
|
||||
"type": "custom",
|
||||
"expr": "\n# Amala Yoga: only natural benefics in 10th from lagna OR from Moon\nbenefics = {'Jupiter', 'Venus', 'Mercury', 'Moon'}\ndef check_amala_from(base_h):\n h10 = ((base_h - 1 + 9) % 12) + 1\n planets_in_h10 = [p for p, info in ctx.planets.items() if info.get('house') == h10]\n if not planets_in_h10:\n return False\n return all(p in benefics for p in planets_in_h10)\nasc_h = ctx.planets.get('Ascendant', {}).get('house', 1)\nmoon_h = ctx.planets.get('Moon', {}).get('house', 1) if 'Moon' in ctx.planets else None\ncheck_amala_from(asc_h) or (moon_h and check_amala_from(moon_h))\n",
|
||||
"expr": "\n# PyJHora/BVR-13 Amala Yoga: any natural benefic in 10th from Lagna or Moon.\n# Source parity: PyJHora natural benefics are Jupiter, Venus, plus Mercury only if alone or with Jupiter/Venus.\nmoon_h = house_of('Moon')\nmoon_10 = ((moon_h - 1 + 9) % 12) + 1 if moon_h else None\nany(house_of(b) in [10, moon_10] for b in pyjhora_natural_benefics())\n",
|
||||
"combo_template": "第10宫只有吉星"
|
||||
},
|
||||
"effects": [
|
||||
@@ -9901,37 +9901,9 @@
|
||||
"bvr_id": null,
|
||||
"category": "kalatra",
|
||||
"logic": {
|
||||
"type": "compound_conditions",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "compound",
|
||||
"operator": "OR",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "compound",
|
||||
"operator": "AND",
|
||||
"conditions": [
|
||||
{
|
||||
"type": "lord_in_house",
|
||||
"lord_of": 7,
|
||||
"house_offset": 3,
|
||||
"note": "7th lord in 4th conjunct Venus"
|
||||
},
|
||||
{
|
||||
"type": "venus_in_house",
|
||||
"house_offset": 3,
|
||||
"note": "Venus in 4th house"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "lagna_lord_debilitated_in_rasi_or_navamsa",
|
||||
"note": "Lagna lord debilitated in rasi or navamsa"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"note": ""
|
||||
"type": "custom",
|
||||
"expr": "\n# PyJHora/BVR-240 Bhaga Chumbana Yoga.\n# A: 7th lord in 4th and Venus in 4th. B: Lagna lord debilitated in D1 or Navamsa.\nl7 = lord(7)\nl1 = lord(1)\nif l7 not in ctx.planets or l1 not in ctx.planets:\n False\nelse:\n path_a = house_of(l7) == 4 and house_of('Venus') == 4\n path_b = debil(l1) or d9_sign_of(l1) == DEBILITATION.get(l1)\n path_a or path_b\n",
|
||||
"combo_template": "7宫主与金星在4宫,或上升主D1/D9落陷"
|
||||
},
|
||||
"effects": [
|
||||
"Excessive sensuality, libidinous nature"
|
||||
@@ -11158,7 +11130,7 @@
|
||||
"category": "putra",
|
||||
"logic": {
|
||||
"type": "custom",
|
||||
"expr": "\n# PyJHora 229/230. Variant 229: Rahu in 5th, L5 joined malefic, Jupiter debilitated.\n# Variant 230: natural malefics occupy or rasi-aspect both 5th from Lagna and 5th from Jupiter.\nl5 = lord(5)\nif l5 not in ctx.planets or 'Jupiter' not in ctx.planets:\n False\nelse:\n cond229 = house_of('Rahu') == 5 and debil('Jupiter') and any(m in ctx.planets and same_house(l5, m) for m in MALEFICS)\n j5 = ((house_of('Jupiter') - 1 + 4) % 12) + 1\n mal_lagna5 = any(m in ctx.planets and (house_of(m) == 5 or rasi_aspects_house(m, 5)) for m in MALEFICS)\n mal_jupiter5 = any(m in ctx.planets and (house_of(m) == j5 or rasi_aspects_house(m, j5)) for m in MALEFICS)\n cond229 or (mal_lagna5 and mal_jupiter5)\n",
|
||||
"expr": "\n# PyJHora 229/230. Variant 229: Rahu in 5th, L5 joined malefic, Jupiter debilitated.\n# Variant 230: natural malefics occupy or PyJHora-style rasi-aspect both 5th from Lagna and 5th from Jupiter.\nl5 = lord(5)\nif l5 not in ctx.planets or 'Jupiter' not in ctx.planets:\n False\nelse:\n cond229 = house_of('Rahu') == 5 and debil('Jupiter') and any(m in ctx.planets and same_house(l5, m) for m in MALEFICS)\n j5 = ((house_of('Jupiter') - 1 + 4) % 12) + 1\n mal_lagna5 = any(m in ctx.planets and (house_of(m) == 5 or pyjhora_planets_aspecting_raasi(m, 5)) for m in MALEFICS)\n mal_jupiter5 = any(m in ctx.planets and (house_of(m) == j5 or pyjhora_planets_aspecting_raasi(m, j5)) for m in MALEFICS)\n cond229 or (mal_lagna5 and mal_jupiter5)\n",
|
||||
"combo_template": "Rahu/L5/木星或凶星影响Lagna与木星起算第5宫"
|
||||
},
|
||||
"effects": [
|
||||
|
||||
@@ -1189,6 +1189,17 @@ class YogaEngine:
|
||||
occupants = ctx.planets_in_house(target)
|
||||
return bool(occupants) and all(p in BENEFICS for p in occupants)
|
||||
|
||||
def pyjhora_natural_benefics():
|
||||
"""Replicate PyJHora yoga._get_natural_benefics(): Jupiter, Venus, plus benefic Mercury."""
|
||||
benefics = [p for p in ["Jupiter", "Venus"] if p in ctx.planets]
|
||||
mercury_house = ctx.house_of("Mercury")
|
||||
if mercury_house is not None:
|
||||
mercury_alone = len(ctx.planets_in_house(mercury_house)) == 1
|
||||
mercury_with_jupiter_or_venus = any(ctx.house_of(p) == mercury_house for p in ["Jupiter", "Venus"] if p in ctx.planets)
|
||||
if mercury_alone or mercury_with_jupiter_or_venus:
|
||||
benefics.append("Mercury")
|
||||
return benefics
|
||||
|
||||
# 辅助:获取星盘所有行星名列表
|
||||
def _planets_list():
|
||||
return list(ctx.planets.keys())
|
||||
@@ -1248,6 +1259,7 @@ class YogaEngine:
|
||||
"only_malefics_in_house": only_malefics_in_house,
|
||||
"house_has_benefic": house_has_benefic, "house_has_malefic": house_has_malefic,
|
||||
"house_sign": house_sign, "movable_house": movable_house,
|
||||
"pyjhora_natural_benefics": pyjhora_natural_benefics,
|
||||
"d9_house_of": d9_house_of, "d9_sign_of": d9_sign_of,
|
||||
"d9_lord_of_house": d9_lord_of_house, "navamsa_dispositor": navamsa_dispositor,
|
||||
"tithi": tithi, "is_waning_moon": is_waning_moon,
|
||||
|
||||
Reference in New Issue
Block a user