Symbolic AI and Knowledge Representation
هوش مصنوعی برای همه: هوش مصنوعی چطور باهوش شد؟
- Why early AI researchers represented problems with explicit symbols and statements.
- Facts, relations, and if-then rules in a small collection of geometric objects.
- Separating a knowledge representation from the procedure that reasons over it.
- Tracing a short chain of rule applications to derive a new fact.
- The strength of explicit representations when the world is well specified.
- The difficulty of translating messy images, ambiguous language, and exceptions into complete rules.
از صحنه تا توصیف نمادین
```svg
<svg viewBox="0 0 800 450" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 Z" class="tm-arrow"/></marker></defs><rect x="35" y="45" width="305" height="225" rx="16" class="tm-surface"/><text x="187" y="78" text-anchor="middle" font-size="21" class="tm-text" direction="rtl">صحنه</text><path d="M 80 190 L 130 105 L 180 190 Z" class="tm-soft"/><circle cx="265" cy="152" r="40" class="tm-soft"/><text x="130" y="223" text-anchor="middle" font-size="19" class="tm-text" direction="rtl">الف: مثلث آبی</text><text x="265" y="223" text-anchor="middle" font-size="19" class="tm-text" direction="rtl">ب: دایره</text><path d="M 350 155 L 435 155" class="tm-line-accent" marker-end="url(#arrow)"/><text x="392" y="126" text-anchor="middle" font-size="18" class="tm-text" direction="rtl">ما</text><rect x="450" y="45" width="315" height="225" rx="16" class="tm-accent"/><text x="607" y="80" text-anchor="middle" font-size="21" class="tm-text" direction="rtl">توصیف صریح</text><text x="607" y="123" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">الف مثلث است</text><text x="607" y="162" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">الف آبی است</text><text x="607" y="201" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">ب دایره است</text><text x="607" y="240" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">الف سمت چپ ب است</text><path d="M 607 280 L 607 322" class="tm-line-accent" marker-end="url(#arrow)"/><rect x="450" y="335" width="315" height="80" rx="14" class="tm-green"/><text x="607" y="367" text-anchor="middle" font-size="22" class="tm-text">Symbolic AI</text><text x="607" y="397" text-anchor="middle" font-size="18" class="tm-text" direction="rtl">کار با توصیف و نمادها</text><rect x="35" y="315" width="355" height="100" rx="14" class="tm-soft"/><text x="212" y="350" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">در این مثال، ما مینویسیم:</text><text x="212" y="389" text-anchor="middle" font-size="20" class="tm-text" direction="rtl">توصیف اولیه و قاعدهها</text></svg>
```
از واقعیتها تا قاعدهها
```svg
<svg viewBox="0 0 800 540" xmlns="http://www.w3.org/2000/svg"><text x="400" y="32" class="tm-text" font-size="22" text-anchor="middle" direction="rtl">واقعیتهای آغازین</text><polygon points="160,60 110,140 210,140" class="tm-soft"/><text x="160" y="167" class="tm-text" font-size="21" text-anchor="middle" direction="rtl">الف</text><text x="160" y="195" class="tm-text2" font-size="18" text-anchor="middle" direction="rtl">مثلث است؛ آبی است</text><rect x="570" y="84" width="80" height="56" rx="12" class="tm-surface"/><text x="610" y="120" class="tm-text" font-size="22" text-anchor="middle" direction="rtl">ب</text><path d="M235 114 H545" class="tm-line"/><text x="400" y="94" class="tm-text" font-size="19" text-anchor="middle" direction="rtl">الف سمت چپ ب است</text><rect x="225" y="213" width="520" height="44" rx="10" class="tm-soft"/><text x="485" y="241" class="tm-text2" font-size="18" text-anchor="middle" direction="rtl">از این رابطه، چپ بودن ب نسبت به الف نتیجه نمیشود.</text><rect x="65" y="279" width="670" height="92" rx="14" class="tm-accent"/><text x="400" y="307" class="tm-text" font-size="20" text-anchor="middle" direction="rtl">قاعدهٔ اول: اگر همان شیء مثلث و آبی باشد</text><text x="400" y="344" class="tm-text" font-size="21" text-anchor="middle" direction="rtl">آنگاه همان شیء ویژه است؛ پس الف ویژه است.</text><rect x="107" y="42" width="106" height="26" rx="8" class="tm-gold"/><text x="160" y="61" class="tm-text" font-size="16" text-anchor="middle" direction="rtl">ویژه</text><rect x="65" y="389" width="670" height="101" rx="14" class="tm-green"/><text x="400" y="420" class="tm-text" font-size="19" text-anchor="middle" direction="rtl">قاعدهٔ دوم: اگر شیء ویژه سمت چپ شیء دیگر باشد</text><text x="400" y="458" class="tm-text" font-size="20" text-anchor="middle" direction="rtl">آنگاه شیء دیگر انتخابشده است؛ پس ب انتخابشده است.</text><rect x="540" y="42" width="140" height="28" rx="8" class="tm-green"/><text x="610" y="62" class="tm-text" font-size="17" text-anchor="middle" direction="rtl">انتخابشده</text></svg>
```
دانش جدا، استنتاج مرحلهبهمرحله
```svg
<svg viewBox="0 0 800 560" xmlns="http://www.w3.org/2000/svg"><defs><marker id="arrow" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto"><path class="tm-arrow" d="M0 0 L8 4 L0 8 Z"/></marker></defs><rect class="tm-surface" x="420" y="20" width="360" height="445" rx="16"/><rect class="tm-soft" x="20" y="20" width="350" height="445" rx="16"/><text class="tm-text" x="600" y="55" text-anchor="middle" font-size="23" direction="rtl">دفتر اطلاعات: دانش مسئله</text><text class="tm-text" x="195" y="55" text-anchor="middle" font-size="23" direction="rtl">بررسیکننده: الگوریتم</text><text class="tm-text2" x="600" y="100" text-anchor="middle" font-size="19" direction="rtl">الف مثلثه</text><text class="tm-text2" x="600" y="132" text-anchor="middle" font-size="19" direction="rtl">الف آبیه</text><text class="tm-text2" x="600" y="164" text-anchor="middle" font-size="19" direction="rtl">الف سمت چپ ب قرار داره</text><path class="tm-line" d="M440 190 H760"/><text class="tm-text" x="600" y="225" text-anchor="middle" font-size="19" direction="rtl">قاعدهٔ اول</text><text class="tm-text2" x="600" y="255" text-anchor="middle" font-size="17" direction="rtl">اگر شیء مثلث و آبی باشد، ویژه است</text><text class="tm-text" x="600" y="300" text-anchor="middle" font-size="19" direction="rtl">قاعدهٔ دوم</text><text class="tm-text2" x="600" y="330" text-anchor="middle" font-size="17" direction="rtl">اگر شیء ویژه سمت چپ شیء دیگری باشد،</text><text class="tm-text2" x="600" y="355" text-anchor="middle" font-size="17" direction="rtl">آن شیء دیگر انتخاب میشود</text><text class="tm-text2" x="195" y="105" text-anchor="middle" font-size="19" direction="rtl">شرطها را با واقعیتها مقایسه کن</text><text class="tm-text2" x="195" y="145" text-anchor="middle" font-size="19" direction="rtl">اگر همه برقرار بودند:</text><text class="tm-text" x="195" y="185" text-anchor="middle" font-size="19" direction="rtl">نتیجه را به دفتر اضافه کن</text><path class="tm-line-accent" d="M372 180 H416" marker-end="url(#arrow)"/><rect class="tm-green" x="35" y="220" width="320" height="90" rx="12"/><text class="tm-text" x="195" y="250" text-anchor="middle" font-size="18" direction="rtl">قاعدهٔ اول برای الف</text><text class="tm-text" x="195" y="285" text-anchor="middle" font-size="18" direction="rtl">مثلث؟ بله. آبی؟ بله.</text><rect class="tm-green" x="440" y="375" width="320" height="34" rx="8"/><text class="tm-text" x="600" y="399" text-anchor="middle" font-size="20" direction="rtl">الف ویژهست</text><path class="tm-line-accent" d="M355 290 L405 290 L405 392 L438 392" marker-end="url(#arrow)"/><rect class="tm-accent" x="35" y="325" width="320" height="110" rx="12"/><text class="tm-text" x="195" y="354" text-anchor="middle" font-size="18" direction="rtl">قاعدهٔ دوم برای الف و ب</text><text class="tm-text" x="195" y="386" text-anchor="middle" font-size="18" direction="rtl">الف ویژه؟ بله.</text><text class="tm-text" x="195" y="417" text-anchor="middle" font-size="18" direction="rtl">الف سمت چپ ب؟ بله.</text><rect class="tm-accent" x="440" y="417" width="320" height="34" rx="8"/><text class="tm-text" x="600" y="441" text-anchor="middle" font-size="20" direction="rtl">ب انتخابشدهست</text><path class="tm-line-accent" d="M355 420 L385 420 L385 445 L438 445" marker-end="url(#arrow)"/><rect class="tm-gold tm-enter" x="20" y="480" width="760" height="65" rx="12"/><text class="tm-text" x="400" y="507" text-anchor="middle" font-size="18" direction="rtl">اگر قاعدهٔ دوم زودتر بررسی شود: شرط ویژه بودن هنوز آماده نیست</text><text class="tm-text" x="400" y="534" text-anchor="middle" font-size="18" direction="rtl">پس از اضافه شدن «الف ویژهست»، قاعدهٔ دوم دوباره بررسی میشود</text></svg>
```
استنتاج شفاف، توصیف ناکامل دنیا
**زنجیرهٔ قابل پیگیری**
واقعیتها ← قاعدهها ← نتیجه
اجرای درست قاعدهها، تضمین درستی توصیف دنیا نیست.
**ورودی اشتباه**
الف در واقع خاکستری است؛ در دفتر آبی ثبت شده.
مثلث و آبی بودنِ ثبتشدهٔ الف ← ویژه شدن الف ← انتخاب ب
**مشاهدهٔ مبهم**
عکس تار: گوشهٔ نامعلوم و رنگِ تغییریافتهٔ الف
آیا مثلث است؟ آیا آبی محسوب میشود؟
**رابطهٔ زبانی نامشخص**
«الف کنار ب است» لزوماً نمیگوید «الف سمت چپ ب است».
**استثنای پوششدادهنشده**
ب ترک دارد؛ قاعدههای فعلی باز هم آن را انتخاب میکنند.
شرط تازه: شکل ترکخورده انتخاب نشود.
از واقعیتها تا نتیجه و محدودیت
پ: \(p\)؛ ت: \(t\). پ یک مثلث آبی در سمت چپ دایرهٔ ت است؛ روی ت ترک باریکی هست.
سه واقعیت و دو قاعده بنویس؛ یک نتیجهٔ تازه و یک مشاهدهٔ خارج از پوشش قواعد را مشخص کن.
**اول خودت امتحان کن**
\[ p\qquad t \]
از قرارداد «ویژه» و «انتخابشده» استفاده کن.
**سه واقعیت**
\[ \begin{aligned}\mathrm{Triangle}(p)\\\mathrm{Blue}(p)\\\mathrm{LeftOf}(p,t)\end{aligned} \]
پ مثلث است؛ پ آبی است؛ پ سمت چپ ت است.
**قاعدهٔ اول**
\[ \forall x:\quad \mathrm{Triangle}(x)\land\mathrm{Blue}(x)\Rightarrow\mathrm{Special}(x) \]
مثلث و آبی بودن، شرط ویژه شدن است.
**قاعدهٔ دوم**
\[ \forall x,y:\quad \mathrm{Special}(x)\land\mathrm{LeftOf}(x,y)\Rightarrow\mathrm{Selected}(y) \]
اگر شیء ویژه سمت چپ شیء دیگری باشد، شیء دیگر انتخاب میشود.
**نتیجهٔ میانی: پ ویژه است**
\[ \mathrm{Triangle}(p)\land\mathrm{Blue}(p)\Rightarrow\mathrm{Special}(p) \]
هر دو شرط قاعدهٔ اول در واقعیتها ثبت شدهاند.
**نتیجهٔ نهایی: ت انتخاب شده است**
\[ \mathrm{Special}(p)\land\mathrm{LeftOf}(p,t)\Rightarrow\boxed{\mathrm{Selected}(t)} \]
نتیجهٔ میانی و رابطهٔ سمت چپ، شرطهای قاعدهٔ دوم را کامل میکنند.
**مشاهدهٔ بدون پوشش: ترک روی ت**
\[ \mathrm{Cracked}(t) \]
حتی با ثبت این واقعیت، هیچیک از دو قاعده از آن استفاده نمیکند؛ برای انتخاب نکردن شکلهای ترکخورده، دانش کافی نیست.
Back to course