Skip to content

Fix Adhi yoga: detect benefics occupying 6/7/8 from Moon (all -> any) - #73

Open
dfl wants to merge 1 commit into
naturalstupid:mainfrom
dfl:bugfix/adhi-yoga-benefic-quantifier
Open

Fix Adhi yoga: detect benefics occupying 6/7/8 from Moon (all -> any)#73
dfl wants to merge 1 commit into
naturalstupid:mainfrom
dfl:bugfix/adhi-yoga-benefic-quantifier

Conversation

@dfl

@dfl dfl commented Aug 9, 2026

Copy link
Copy Markdown

Summary

adhi_yoga() and adhi_yoga_from_jd_place() detect Adhi yoga with

all(p_to_h[pid] in houses_from_moon for pid in _natural_benefics)

which requires every natural benefic to lie in the 6th/7th/8th from the Moon. A benefic placed outside that zone therefore cancels the yoga.

That inverts the classical rule. Adhi yoga constrains the houses — are the 6th/7th/8th from the Moon occupied by benefics? — not the benefics (it does not require all benefics to be confined there). Varāhamihira grades the yoga by how many benefics fall in the zone: one benefic → moderate, two → higher, three → "ruler-like", so it forms with as few as one benefic present.

The one-word fix is allany.

References

  • Bṛhat Parāśara Horā Śāstra ch. 38 / Varāhamihira: benefics (Jupiter, Mercury, Venus) in the 6th, 7th and 8th from the Moon; results graded by the number of benefics.

Note (not changed here)

In adhi_yoga(), _natural_benefics = const.natural_benefics followed by _natural_benefics += [const.MERCURY_ID] mutates the module-level const.natural_benefics list in place (aliasing), so Mercury can leak into the global default across calls. Left untouched to keep this PR single-purpose, but flagging it — _natural_benefics = _natural_benefics + [const.MERCURY_ID] would be safer.

🤖 Generated with Claude Code

…onfined there

adhi_yoga() and adhi_yoga_from_jd_place() used
`all(benefic in {6,7,8} from Moon)`, which requires *every* natural
benefic to lie inside that zone. A benefic placed elsewhere (e.g.
Jupiter in the 11th from the Moon) then cancels the yoga.

The classical rule constrains the houses (are the 6th/7th/8th from the
Moon occupied by benefics?), not the benefics (are all benefics confined
there). Varahamihira grades the yoga by how many benefics fall in the
zone (one = moderate, two = higher, three = ruler-like), so it forms
with as few as one benefic present. Changed `all` -> `any` so the yoga
is detected when a benefic occupies the 6th/7th/8th from the Moon.

This also aligns PyJHora with JHora's own output.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant