Final Expert System Ai
Final Expert System Ai
Project 1 & 2
Course: CCE414 & ELE355 (Artificial Intelligence)
Marks
Free Topic Description /40
Implementation/Evaluation
Expert System in /60
/Sample output
Prolog
Project interface & Poster Design /40
Total /300
1
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
2
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Table of Contents
Expert System For Real Estate Investment ....................................................................................................................... 2
Abstract ............................................................................................................................................................................. 5
Introduction ....................................................................................................................................................................... 5
Background ................................................................................................................................................................... 5
Individual Investors................................................................................................................................................... 6
3
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Evaluation & Discussion of the Real Estate Investment Expert System ........................................................................ 15
A. Strengths................................................................................................................................................................. 15
Conclusion ...................................................................................................................................................................... 16
References ....................................................................................................................................................................... 17
........................................................................................................................................................................................ 29
4
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Abstract
Real estate market is a significant for economy development. There are several factors affecting real estate markets,
such as marketing demands, land development plans, land taxes, bank interest rates, peoples’ incomes, and so on.
Predicting the real estate market is a challenge task due to these complex and interconnected factors. Over the past
decade, there has been a significant progressive in Artificial Intelligence (AI), which helps many real estate companies
to enhance their day-to-day operations. It is possible to analyze vast amounts of data from different perspectives to
determine if the system is good investment or is not .they would then provide investment recommendations to clients
and customers, guiding them on how to maximize returns. This might involve suggestions on which suburbs to invest
in or to identify the optimal time for selling a property your system implements a rigorous analytical framework
comprising 15 distinct evaluation metrics across four critical investment dimensions: financial viability, locational
attributes, market trends, and regulatory compliance. By systematically applying these evidence-based criteria, the
platform delivers objective, quantifiable assessments that empower stakeholders to make strategically good investment
decisions.
Introduction
Background
The real estate market in Egypt is a key part of the country’s economy. It is active, growing fast, and has attracted
large investments in recent years. This report looks at how much the real estate sector has added to Egypt’s economy
(GDP) over the last three years and studies job creation in the industry. While the exact numbers differ between
sources, the real estate sector has clearly played a major role in Egypt’s economic growth.
When it comes to jobs, the construction part of real estate is one of the biggest employers in the country, though
detailed recent data is limited. The market is currently booming due to new city projects, high demand from Egyptian
buyers, and growing investments from foreign investors, especially from Gulf countries. Technology is also changing
the sector. More companies are using artificial intelligence (AI) to improve services, from property design to customer
support. In this report, we present an AI expert system designed to help investors decide which properties are worth
buying. The system uses AI to analyze factors like location, pricing trends, and future growth potential, giving users
clear advice on where to invest. This tool highlights how technology can support Egypt’s real estate growth while
making investment decisions smarter and easier.
5
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Statement of Problem
The Real Estate Investment Expert System addresses the critical challenge of subjective, inconsistent, and time-
consuming property evaluations that plague both novice and experienced investors. By replacing guesswork with data-
driven analysis, the system solves the fundamental problem of investment risk assessment in an unpredictable market,
the main purpose of this Real Estate Investment Expert System is to solve one of the biggest challenges faced by most
investors: determining whether their investment will be profitable and successful. The system helps investors by
evaluating the success of their investment based on specific predefined rules, it solves the resource-intensive process
of manually researching neighborhood trends, zoning laws, and financial projections. The system mitigates the
common pitfall of emotional decision-making by enforcing strict investment rules and thresholds. It addresses
knowledge gaps for new investors by embedding expert-level analysis into an accessible interface, by integrating
dynamic market data, it helps overcome the limitation of static spreadsheet models.
Individual Investors
First-time Buyers or Small-Scale Investors: This group often lacks in-depth market knowledge and requires guidance
in identifying profitable properties that align with their budget and risk tolerance. The system can assist them by:
1. Individual Investors
Experienced: Seeks rapid KPI-driven assessments, alerts to undervalued or emerging markets, and
advanced tools for portfolio diversification and risk management.
3. Investment Advisors
Integrates objective risk-return analyses (e.g., cap rates, cash-on-cash), clear visual metrics, and cross-asset
comparisons into client portfolios for well-informed real estate allocation.
4. Property Developers
Utilizes site-selection analytics—growth trends, zoning and infrastructure checks, and competitive-landscape
mapping—to support strategic planning of new development projects.
5. Foreign Investors
Requires localized Egypt-specific market data (regulations, crime and vacancy rates), procedural guidance,
and built-in currency-conversion and financial analysis features.
6
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Crime Rates
o Ministry of Interior open-data portal (data.gov.eg/dataset/crime-statistics)
o Local police station monthly bulletins (PDF/Excel)
School Ratings
o Ministry of Education school performance reports
o Edarabia (covers Cairo/Alexandria schools)
Appreciation & Growth
o Central Bank of Egypt real estate credit trends
o Real Estate Valuers’ Syndicate annual market reports
Amenities & Density
o OpenStreetMap + Overpass API: restaurants, malls, transit stops
o CAPMAS census data for population density by governorate/markaz
User-addable
o Community survey uploads (e.g. walkability, noise, flood-risk)
o Shapefile/KML upload from local planning offices
7
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Official Surveys
o CAPMAS Housing & Building Census vacancy tables
o Real Estate Market Reports from JLL Egypt, Knight Frank Egypt
Short-term Rentals
o AirDNA for Cairo/Alexandria Airbnb occupancy
User-addable
o Monthly vacancy logs from property managers (CSV)
o Agent-reported occupancy checklists
8
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
9
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
10
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Knowledge base
The knowledge base represents the core intelligence of our expert system, serving as a structured repository of real
estate investment knowledge encoded in machine-readable format. This comprehensive database captures both static
property characteristics and dynamic market conditions to enable sophisticated investment analysis.
Centralizing Critical Information: Consolidating property details, location attributes, market trends, and
regulatory constraints into a unified framework.
Enabling Intelligent Analysis: Providing the factual foundation for our 15+ investment rules to evaluate
properties objectively.
Reducing Research Burden: Eliminating the need for investors to manually compile and cross-reference
disparate data sources.
2. Property Type: Classification of the property (e.g., single-family, condo, multi-unit) based on its structural
and functional characteristics.
3. Location: The neighborhood or area where the property is situated, linked to broader location intelligence
data.
4. Square Footage: The total livable area of the property measured in square feet, indicating its size and space
capacity.
5. Year Built: The construction year of the property, reflecting its age and potential need for maintenance or
upgrades.
6. Purchase Price: The original acquisition cost of the property, serving as a baseline for investment
calculations.
7. Current Value: The present market worth of the property, derived from recent appraisals or comparable
sales.
8. Monthly Rent: The income generated from renting the property, used to assess cash flow and return on
investment
2. Crime Rate Assessment: The relative safety level of the area, categorized as low, medium, or high based on
reported crime statistics.
3. School District Rating: A numerical score from 1 to 10 representing the quality of local schools, derived
from academic performance and other educational metrics.
4. Annual Appreciation Rate: The percentage increase in property values for the area over the past year,
indicating market growth trends.
5. Growth Potential: A classification (low, medium, or high) predicting future development and value increases
in the area.
6. Available Amenities: A list of nearby facilities and services, such as schools, parks, and public
transportation.
7. Population Density: The number of residents per square mile, reflecting the area's urbanization level.
2. Typical Rental Rates: The average monthly rent for properties in the area, indicating income potential for
investors.
3. Vacancy Rates: The percentage of unoccupied rental properties in the area, signaling demand and rental
market stability.
2. Usage Regulations: Specific rules governing property modifications, rentals, or developments within the
zone. Permit Requirements: Mandatory approvals needed for renovations or new constructions in the area
2. Vacancy Rate: The percentage of unoccupied rental properties in the area, calculated as: (Number of Vacant
Units / Total Rental Units) × 100
12
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Classified as:
Rule Bases
1. Good investment: Capitalization Rate (Cap Rate) measures the annual return on investment based on rental
income. A Cap Rate ≥ 6% indicates strong rental yield relative to property value.
Why It Matters: High cap rates suggest better cash flow. Helps compare properties in different markets.
2. one_percent_rule: A classic real estate heuristic ensuring rent covers at least 1% of the purchase price.
3. high_appreciation: Appreciation rate predicts long-term value growth. ≥5% annual appreciation indicates a
high-growth area.
Why It Matters: Boosts equity over time. Ideal for buy-and-hold investors
4. low_crime_neighborhood: Low crime areas attract stable tenants and higher resale value.
Why It Matters: Ensures steady rental income. Reduces risk of prolonged vacancies.
Why It Matters: Avoids fines or forced modifications. Confirms intended use (e.g., rental, commercial)
11. economically_stable_area: Balanced growth (not too slow, not too crowded).
Why It Matters: Avoids negative cash flow. Covers mortgage and maintenance.
Why It Matters: Ensures fair market value. Reduces risk of negative equity.
o More selective, low-cost checks (e.g. recent_construction/1) are placed earlier to prune the search
space quickly.
o Composite rules (e.g. good_investment/1) that depend on multiple sub-rules are near the bottom, so
only candidates that pass simpler heuristics proceed to expensive calculations (e.g., mortgage
amortization).
14
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
b. Decision Criteria
b) Adding new property manually for new properties: Guided form collects all 8 property attributes Input
validation ensures data quality System confirms successful addition to knowledge base.
15+ Investment Rules systematically evaluate all critical aspects of real estate investments: Financial metrics (Cap
Rate, 1% Rule, Cash-on-Cash Return) Location factors (Crime Rate, School Quality, Amenities) Market trends
(Appreciation, Vacancy Rate, Growth Potential) Regulatory compliance (Zoning, Property Condition) Flexible
Thresholds: Rules can be adjusted for different market conditions (e.g., stricter Cap Rate requirements in high-risk
areas).
15
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
Multi-Dimensional Analysis: Combines property attributes, neighborhood data, and market trends into a unified
decision framework. Expert-Level Insights: Encapsulates real estate investment best practices into executable logic,
reducing reliance on subjective judgment.
Easy to Add New Rules: The Prolog-based knowledge base allows seamless integration of additional investment
criteria (e.g., flood risk assessment, short-term rental potential). Scalable Data Model: New property types, locations,
or regulations can be added without restructuring the entire system
Future Enhancements
1. Improved User Experience
Web/GUI Interface: Develop a React or Flask-based front end with interactive forms, dashboards, and report
generation.
Geospatial Visualization: Plot properties on maps with layered data (crime, schools, amenities)
Adjust rule thresholds dynamically based on historical performance (e.g., lower acceptable Cap Rates in
appreciating markets).
User Feedback Loop: Let investors flag inaccurate recommendations to improve future analyses.
Conclusion:
This Prolog-based Real Estate Investment Expert System successfully bridges the gap between complex real estate
analysis and practical decision-making by encoding domain expertise into a structured, rule-based framework, The
Prolog implementation elegantly captures the multidimensional nature of property investment decisions through its
predicate logic, where each rule functions as a discrete validation checkpoint in the investment decision pipeline.
What makes this approach particularly valuable is its auditability - every recommendation can be traced back to
specific rule evaluations, rule-driven framework for property evaluation, as demonstrated through our detailed
development of the knowledge base (property/8, location/7 predicates), 15+ investment rules (including
good_investment/1 and one_percent_rule/1), and financial analysis predicates (mortgage_payment/4,
cash_on_cash_return/6). The system's architecture effectively bridges theoretical investment principles with practical
application, enabling comprehensive assessment of properties through interconnected checks on financial metrics (cap
rates, cash flow), location factors (crime rates, school quality), and market conditions (vacancy rates, appreciation).the
modular design and clearly documented predicates (property_condition/2, zoning_compatible/2) provide a verified
foundation for the future enhancements outlined in our evaluation, including dynamic data integration and GUI
development. This work delivers a fully functional prototype that systematizes real estate investment analysis while
16
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
maintaining the flexibility for expansion, achieving our goal of transforming subjective property assessment into an
objective, rule-based decision process.
References
SWI-Prolog Manual
Official SWI-Prolog documentation covering the language reference, system predicates, modules, and programming
techniques.
Retrieved from https://www.swi-prolog.org/pldoc/doc_for?object=manual.
17
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
18
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
19
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
20
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
21
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
22
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
23
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
24
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
25
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
26
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
27
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
28
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
29
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
30
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
31
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
32
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
LOAN ANALYSIS:
33
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
34
ELECTRICAL ENGINEERING
COMPUTER SYSTEMS ENGINEERING
CCE414 & ELE355– COURSE PROJECT
(TERM 2)
35