Expert Systems are AI programs designed to mimic the decision-making abilities of human experts in specific domains by using a knowledge base of facts and a set of logical rules to draw conclusions, mainly using if-then rules. They were created in the 1970s and were some of the first successful forms of AI software. Unlike modern machine learning systems that learn from data, Expert Systems rely on explicitly programmed knowledge from domain experts, making them highly interpretable but limited to narrow, well-defined problem areas.
HW1.1: ពន្យល់ ២០០–៣០០ ពាក្យ៖ Expert System vs Keyword Lookup
+ Expert System: An expert system is a specialized computer program designed to
simulate the decision-making and problem-solving abilities of a human
expert within a specific field. Developed heavily in the 1970s and
1980s, expert system were among the very first highly successful form
of artificial intelligence (AI) software.
A standard expert system relies on three interconnected pillars to
function:
- The Knowledge Base: The system’s digital brain. it stores an
accumulated repository of domain-specific facts and logical
relationships (usually structure as IF-THEN).
- The Inference Engine: The processing unit or thinking mechanism.
it applies logical reasoning to the knowledge base to draw
conclusions. it matches user inputs against the system’s rules
using two primary reasoning methods:
- Forward Chaining
- Backward Chaining
- The User Interface: The communication layer where a non-expert
user inputs data, answers prompts, and receives clear advice or
diagnostics.
+ Keyword Lookup: in Python can refer to a few different concepts depending on the context of your project: checking if a specific word is a reserved language keyword, searching text for specific terms (string matching), or looking up values using keyword arguments/keys in data structures.
(IEEE) GeeksforGeeks and SystemDR – Scalable System Design
(YouTube)
HW1.2: បង្កើត ៣ ករណី Python: Syntax / Runtime / Logic
+ Syntax Error:
if x == 10
SyntaxError: expected ':'
if x == 10:
+ Runtime Error:
age = 5 || fix age = “5”
message = “I am ” + age + “year old”
Error: cannot concatenate str and int
+ Logic Error:
num1 = 80; num2 = 20
aver = num1 + num2 / 2
print(aver)
Division happens before addition. Python divides score2 by 2
(45) and adds it to score1 (80).
The intended math is: (80 + 90) / 2 = 85
HW1.3: Explain Logic error + Insufficient Evidence
Code:
def can_buy_item(customer):
if customer.get(“age”, 0) < 18:
return True
return False
គោលគៅ: ចង់បានចាប់ពី ១៨ ឆ្នាំឡើង
1. Insufficient Evidence: ប្រសិនបើគេហទំព័រផ្ញើទិន្នន័យអតិថិជនមកត្រឹម {name: "Somalen"} ដោយគ្នានអាយុ (age) មកជាមួយទេ កម្មវិធីនឹងស្ថិតក្នុងស្ថានភាពខ្វះទិន្នន័យ។
2. Logic Error: ឧបមាថាមានទិន្នន័យអាយុមក ១៩ឆ្នាំ តែដោយសារអ្នកសរសេរកូដច្រឡុំដាក់សញ្ញាតូចជាង (< 18) លទ្ធផលវាបែរជាអោយក្មេងក្រោម ១៨ឆ្នាំ ទិញបាន (ខុសអំពីគោលដៅ)
មតិយោបល់ 0