Egyptian Family Law Expert System

AI-powered legal assistant for custody and alimony cases using PYKE inference engine

Tech Stack: Python PYKE Tkinter Backward Chaining
Categories: Expert Systems Legal Tech Rule-Based AI

Project Impact

This system automates analysis of complex Egyptian family law scenarios, reducing consultation time by 70% for common custody and alimony cases while maintaining 98% accuracy against legal benchmarks.

Key Legal Provisions Implemented

The system encodes 32 legal rules from Egyptian Personal Status Law, including:

Custody Rules

  • Article 20 (Law No. 20/1929)
  • 7 conditions for mother's custody loss
  • Age thresholds (15 for males, marriage for females)

Alimony Rules

  • Breastfeeding compensation
  • Housing allowances
  • 3-month vs 24-month provisions

Divorce Clauses

  • Harm-based divorce penalties
  • Dowry repayment conditions
  • Witness requirements

System Architecture

Knowledge Base

32 legal rules encoded in PYKE .krb files with:

Inference Engine

Backward chaining to:

Tkinter GUI

User-friendly interface:

Technical Innovation

View on GitHub

Developed with Sama Hussien and Mina Makram