Chapterبەش 2 · Lectureوانە 2.1
Agents, Sensors and Actuators; Rational Agentsئەیجێنتەکان، هەستەوەرەکان و جووڵێنەرەکان؛ ئەیجێنتە عەقڵانییەکان
What an agent is, the kinds of agents (from animals to chatbots and voice assistants), sensors, active sensing and perception, actuators, the vacuum-cleaner world, the agent function , agent = architecture + program, and what makes an agent rational — including limited rationality and why rational is not the same as successful.
چییە، جۆرەکانی (لە ئاژەڵەوە تا و )، ، و ، ، جیهانی گسکی کارەبایی، ، = تەلارسازی + و ئەوەی عەقڵانی دەکات — لەوانە و بۆچی عەقڵانی هەمان سەرکەوتوو نییە.
What you will learnچی فێر دەبیت
- Define an agent and name its parts: environment, sensors, percepts, actions and actuators.
- Give examples of animal, human, robotic and software agents, with today's assistants.
- Explain sensors, active sensing, perception and actuators.
- Describe the vacuum world and the agent function .
- Explain rationality, performance measures and limited rationality, and why rational is not successful.
- پێناسە بکەیت و بەشەکانی ناو ببەیت: ، ، ، و .
- نموونەی ئاژەڵ، مرۆیی، و بهێنیتەوە، لەگەڵ یاریدەدەرەکانی ئەمڕۆ.
- ، ، و ڕوون بکەیتەوە.
- جیهانی گسکی کارەبایی و باس بکەیت.
- ، و ڕوون بکەیتەوە، هەروەها بۆچی عەقڵانی واتای سەرکەوتوو نییە.
Something that senses and actsشتێک کە هەست دەکات و کار دەکات
This chapter is about agents — the heart of this course, because we build AI as rational agents. In everyday words, an agent is anything that can sense what is around it and then do something because of what it sensed. It "sees" or "feels" what is happening, and then it "does" something in response.
ئەم بەشە دەربارەی — دڵی ئەم کۆرسە، چونکە وەک دروست دەکەین. بە زمانی ڕۆژانە، هەر شتێکە کە بتوانێت هەست بەوە بکات کە لە دەوروبەریدایە و پاشان بەهۆی ئەوەی هەستی پێکردووە کارێک بکات. «دەبینێت» یان «هەست دەکات» چی ڕوو دەدات، پاشان وەک وەڵامدانەوە شتێک «دەکات».
Think of a waiter in a tea house. He looks around the room (his eyes are his sensors). He notices an empty tea glass on a table (a percept). He walks over and pours more tea (an action, done with his legs and hands — his actuators). Then he looks around again. Every agent in this course works in this same loop: sense, decide, act, and sense again.
چایچییەکی چایخانە بهێنە پێش چاوت. سەیری ژوورەکە دەکات (چاوەکانی ). سەرنجی پەرداخێکی بەتاڵی چا دەدات لەسەر مێزێک (). دەچێتە لای و چای تێدەکات (، کە بە قاچ و دەستەکانی دەیکات — ). پاشان دیسان سەیری دەوروبەر دەکات. هەموو لەم کۆرسەدا بە هەمان خولگە کار دەکات: هەستکردن، بڕیاردان، کارکردن و دووبارە هەستکردن.
Where the analogy stops workingسنووری ئەم نموونەیە
The waiter decides with a whole human mind and years of experience. A software agent decides only with the program and data that people gave it.
چایچییەکە بە هەموو مێشکی مرۆڤ و ساڵانێک ئەزموونەوە بڕیار دەدات. تەنیا بەپێی ئەو و خەڵک پێیان داوە بڕیار دەدات.
Agents and environmentsئەیجێنتەکان و ژینگەکان
The course notes give two definitions. Short: an agent is an entity that perceives and acts in an environment. Longer: an agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.
تێبینییەکانی کۆرسەکە دوو پێناسە دەدەن. کورتەکەی: بوونەوەرێکە کە لە هەست دەکات و کار دەکات. درێژەکەی: هەر شتێکە کە بتوانرێت وا سەیر بکرێت کە بە هەست بە دەکات و بە کار لەسەر ئەو دەکات.
- Environment: the surroundings in which the agent works. For a robot it may be the real world; for a chatbot it may be the internet.
- Sensors: the tools or "senses" the agent uses to gather information. A robot may use a camera; a chatbot uses text input.
- Percepts: the information the agent gets from its sensors at a moment.
- Actions: what the agent does in response to what it perceives.
- Actuators: the parts that let the agent perform actions — motors that move a robot's arms, or code that sends messages for software.
- : ئەو دەوروبەرەی تێیدا کار دەکات. بۆ لەوانەیە جیهانی ڕاستەقینە بێت؛ بۆ لەوانەیە ئینتەرنێت بێت.
- : ئەو ئامراز یان «هەستانەی» بۆ کۆکردنەوەی بەکاریان دەهێنێت. لەوانەیە کامیرا بەکار بهێنێت؛ دەقی نووسراو وەردەگرێت.
- : ئەو لە ساتێکدا لە وەریدەگرێت.
- : ئەوەی وەک وەڵامدانەوەی ئەوەی هەستی پێکردووە دەیکات.
- : ئەو بەشانەی ڕێگە بە دەدەن ئەنجام بدات — بزوێنەرێک کە قۆڵی دەجووڵێنێت، یان بۆ ، کۆدێک کە نامە دەنێرێت.
Kinds of agentsجۆرەکانی ئەیجێنت
Agents are everywhere. The course notes list four kinds:
لە هەموو شوێنێکدان. تێبینییەکانی کۆرسەکە چوار جۆر دەژمێرن:
- Animal agents — animals such as dogs or birds, which respond to their environment.
- Human agents — people, because we react to things around us.
- Robotic agents (robots) — they use sensors such as cameras or touch sensors to understand their surroundings and take actions.
- Software agents (softbots) — programs that act on the internet or inside software systems.
- ئاژەڵ — ئاژەڵانی وەک سەگ یان باڵندە کە وەڵامی دەدەنەوە.
- مرۆیی — خەڵک، چونکە ئێمە کاردانەوەمان هەیە بەرامبەر شتەکانی دەوروبەرمان.
- () — وەک کامیرا یان دەستلێدان بەکار دەهێنن بۆ تێگەیشتن لە دەوروبەریان و ئەنجامدانی .
- (softbots) — کۆمەڵێک کە لە ئینتەرنێت یان لە ناو سیستەمەکانی کار دەکەن.
Some agents work alone (single-agent). Others work together as a group (multi-agent), like several robots in a warehouse or a team of programs that share a task. AI with many cooperating agents is also called distributed AI. Such groups are multi-agent systems, taught in the lesson on types of agents.
هەندێک بە تەنیا کار دەکەن. هەندێکی تر پێکەوە وەک گرووپێک کار دەکەن، وەک چەند لە کۆگایەکدا یان تیمێک لە کە ئەرکێک بەش دەکەن. کە چەندین هاوکاری تێدا بێت پێی دەگوترێت دابەشکراو. ئەم گرووپانە سیستەمە فرەئەیجێنتەکانن کە لە وانەی جۆرەکانی فێریان دەبیت.
Kinds of agentsجۆرەکانی ئەیجێنت
Software agents around youئەیجێنتە نەرمەواڵەییەکان لە دەوروبەرت
- Internet agents — programs that work online:
- Crawler: goes through websites and gathers information — for example, Google uses crawlers to find new pages.
- Webbot: a bot that performs tasks on websites (for example, checking prices).
- Email agent: manages email automatically — sorting it, filtering spam, sending replies.
- Search agent: a bot that helps find information online.
- Chatbots — programs that talk with users, as when you chat with a company's customer service.
- Voice assistants — they listen to spoken commands and respond, for example Siri, Alexa, Google's Gemini (which is replacing Google Assistant on phones) and Microsoft Copilot.
- ئینتەرنێت — کۆمەڵێک کە ئۆنلاین کار دەکەن:
- : بە ناو دەگەڕێت و کۆ دەکاتەوە — بۆ نموونە Google بەکار دەهێنێت بۆ دۆزینەوەی لاپەڕەی نوێ.
- Webbot: بۆتێک کە ئەرک لەسەر ئەنجام دەدات (بۆ نموونە پشکنینی نرخ).
- : بە شێوەیەکی خۆکار بەڕێوە دەبات — ڕیزکردنیان، فلتەرکردنی و ناردنی وەڵام.
- گەڕان: بۆتێک کە یارمەتی دەدات لە ئینتەرنێتدا بدۆزیتەوە.
- — کۆمەڵێک کە لەگەڵ بەکارهێنەراندا قسە دەکەن، وەک کاتێک لەگەڵ خزمەتگوزاریی کڕیارانی کۆمپانیایەکدا چات دەکەیت.
- — گوێ لە فەرمانی دەنگی دەگرن و وەڵام دەدەنەوە، بۆ نموونە Siri، Alexa، Geminiی Google (کە لە مۆبایلەکاندا جێگەی Google Assistant دەگرێتەوە) و Microsoft Copilot.
Sensorsهەستەوەرەکان
A sensor measures some part of the environment and turns it into data that an agent (a robot or a program) can use as input. Sensors are the agent's senses: they let it "see", "hear", "feel" or detect other things in the world around it.
بەشێک لە دەپێوێت یان هەستی پێ دەکات و دەیکات بە کە ( یان ) بتوانێت وەک بەکاری بهێنێت. هەستەکانی : ڕێگەی پێ دەدەن «ببینێت»، «ببیستێت»، «هەست بکات» یان شتی تر لە جیهانی دەوروبەریدا بدۆزێتەوە.
- The basic senses: vision (cameras or visual sensors let an agent "see"), hearing (microphones pick up sounds) and touch (pressure or touch sensors detect physical contact).
- More than human senses: radio, infrared, GPS and wireless signals. Sensors can measure things that humans cannot sense directly.
- Active sensing: some agents do not just "watch" or "listen". They send out a signal and sense how it reflects off things. Radar sends radio waves and senses how they bounce back to find objects and measure distance. Ultrasound uses sound waves to find objects; it is common in medical imaging and in some robots.
- هەستە سەرەتاییەکان: بینین (کامیرا یان بینین ڕێگە بە دەدەن «ببینێت»)، بیستن ( دەنگ وەردەگرن) و دەستلێدان ( پەستان یان دەستلێدان بەرکەوتنی جەستەیی هەست پێ دەکەن).
- زیاتر لە هەستەکانی مرۆڤ: ڕادیۆ، تیشکی ژێرسوور، GPS و ئاماژەی . دەتوانن ئەو شتانە بپێون کە مرۆڤ ڕاستەوخۆ هەستیان پێ ناکات.
- : هەندێک تەنیا «سەیر» یان «گوێ» ناگرن؛ ئاماژەیەک دەنێرن و هەست دەکەن چۆن لە شتەکانەوە دەگەڕێتەوە. ڕادار شەپۆلی ڕادیۆیی دەنێرێت و هەست دەکات چۆن دەگەڕێنەوە بۆ دۆزینەوەی شت و پێوانی دووری. ئەڵتراساوند (شەپۆلی دەنگیی سەروو بیستن) شەپۆلی دەنگ بۆ دۆزینەوەی شت بەکار دەهێنێت؛ لە وێنەگرتنی پزیشکی و لە هەندێک باوە.
Active sensing gives an agent a clearer picture of its surroundings, because it can analyse how its own signals come back.
وێنەیەکی ڕوونتر لە دەوروبەری دەداتە ، چونکە دەتوانێت شیتەڵی ئەوە بکات کە ئاماژەکانی خۆی چۆن دەگەڕێنەوە.
All of this leads to the Internet of Things (IoT): everyday devices with sensors are connected to the internet. They collect and share data, so agents can get a lot of real-time information about the environment. Examples: smart thermostats, security cameras and wearable fitness trackers send their data online, where it is used to take actions, monitor conditions or study trends. The sensors in a phone and in a smart city are explained in Sensors: how things feel the world. (English words for the connected world: Key words 2.)
هەموو ئەمانە دەمانگەیەننە (IoT): ئامێرە ڕۆژانەکان بە بە ئینتەرنێتەوە دەبەسترێن. کۆ دەکەنەوە و هاوبەشی دەکەن، بۆیە دەتوانن بڕێکی زۆر ڕاستەوخۆ لەسەر بەدەست بهێنن. نموونە: گەرماپێوی زیرەکی ، کامیرای چاودێری و وەرزش خۆیان ئۆنلاین دەنێرن، لەوێ بەکار دەهێنرێن بۆ ئەنجامدانی کار، چاودێریکردنی بارودۆخ یان شیکردنەوەی ڕەوتەکان. ناو مۆبایل و لە هەستەوەرەکان: شتەکان چۆن هەست بە جیهان دەکەنـدا ڕوون کراونەتەوە. (وشە ئینگلیزییەکانی جیهانی بەستراو: وشە سەرەکییەکان ٢.)
Sensorsهەستەوەرەکان
Perceptionهەستپێکردن
Perception is how an agent understands its surroundings: it gets information about the world it lives in by interpreting what its sensors detect. For example, a robot cleaner's sensor detects dirt on the floor; perception helps the robot "understand" that there is dirt in a certain place.
ئەو ڕێگایەیە کە پێی لە دەوروبەری تێدەگات: بە لێکدانەوەی ئەوەی هەستی پێ دەکەن، لەسەر ئەو جیهانەی تێیدا دەژی بەدەست دەهێنێت. بۆ نموونە، پاککەرەوە پیسی لەسەر زەوی هەست پێ دەکات؛ یارمەتیی دەدات «تێبگات» کە لە شوێنێکی دیاریکراودا پیسی هەیە.
The things the agent senses are its percepts — the information it gets. A robot may sense, for example, its distance from an object.
ئەو شتانەی هەستیان پێ دەکات — ئەو وەریدەگرێت. لەوانەیە بۆ نموونە دووریی خۆی لە شتێک هەست پێ بکات.
The process of turning what the sensors detect into useful information about the world, for example understanding that a dark patch on the floor is dirt.
ئەو پرۆسەیەیە کە ئەوەی دەیدۆزنەوە دەیکات بە بەسوود دەربارەی جیهان، بۆ نموونە تێگەیشتن لەوەی کە پەڵەیەکی تاریک لەسەر زەوی پیسییە.
Actuatorsجووڵێنەرەکان
Actuators are the parts that let an agent act in its environment — a bit like a robot's "muscles".
ئەو بەشانەن کە ڕێگە بە دەدەن لە کار بکات — کەمێک وەک «ماسولکەکانی» .
- For humans: hands, legs, the vocal tract (vocal cords) and so on — the parts that help us move or communicate.
- For an automated taxi: the controls a human driver also uses — accelerator, steering, brakes and so on — which the car uses to move, turn or stop.
- For software: code that sends a message, shows text on the screen or writes a file.
- بۆ مرۆڤ: دەست، قاچ، ئەندامەکانی دەنگ (ژێیە دەنگییەکان) و هتد — ئەو بەشانەی یارمەتیمان دەدەن بجووڵێین یان پەیوەندی بکەین.
- بۆ تەکسییەکی خۆکار: ئەو ئامرازانەی شۆفێری مرۆڤیش بەکاریان دەهێنێت — پێدانی گاز، سووکان، بریک و هتد — کە ئۆتۆمبێلەکە بۆ جووڵە، سووڕانەوە یان ڕاوەستان بەکاریان دەهێنێت.
- بۆ : کۆدێک کە نامەیەک دەنێرێت، دەقێک لەسەر شاشە پیشان دەدات یان دەنووسێت.
For each agent, name two sensors and two actuators: (a) a robot vacuum cleaner, (b) a chatbot on a bank's website, (c) you.
بۆ هەر دوو و دوو ناو ببە: (أ) گسکی کارەبایی، (ب) لەسەر بانکێک، (ج) خۆت.
Show answerوەڵامەکە پیشان بدە
| Agent | Sensors | Actuators |
|---|---|---|
| Robot vacuum گسک | dirt sensor, bump sensor, camera پیسی، بەرکەوتن، کامیرا | wheels, suction motor, brushesتایە، بزوێنەری هەڵمژین، فڵچە |
| Bank chatbot بانک | the text box where you type, the button you clickئەو خانەیەی تێیدا دەنووسیت، ئەو دوگمەیەی کرتەی لێ دەکەیت | messages shown on the screen, an email it sendsئەو نامانەی لەسەر شاشە پیشان دەدرێن، کە دەینێرێت |
| Youخۆت | eyes, ears, skinچاو، گوێ، پێست | hands, legs, voiceدەست، قاچ، دەنگ |
What an actuator is: the part that makes a machine move, with electric, hydraulic and pneumatic examples.
چییە: ئەو بەشەی ئامێر دەجووڵێنێت، لەگەڵ نموونەی کارەبایی، هایدرۆلیکی (شلە) و پنیوماتیکی (هەوا).
Whole video: physical actuators, the parts that make machines move (automatic doors, car seats, valves). Software actuators are not covered.
هەموو ڤیدیۆکە: ، ئەو بەشانەی ئامێرەکان دەجووڵێنن (دەرگای خۆکار، کورسیی ئۆتۆمبێل، ڤاڵڤ). ئەوانەی لە هەن باس ناکرێن.
The vacuum-cleaner worldجیهانی گسکی کارەبایی
AI textbooks use a tiny example to explain agents: a robot cleaner — think of a robot vacuum such as an iRobot Roomba — in a world with only two squares, A and B. Each square can be clean or dirty.
کتێبەکانی نموونەیەکی زۆر بچووک بەکار دەهێنن بۆ ڕوونکردنەوەی : پاککەرەوە — گسکێکی وەک iRobot Roomba بهێنە بەرچاوت — لە جیهانێکدا کە تەنیا دوو چوارگۆشەی A و Bـی تێدایە. هەر چوارگۆشەیەک دەکرێت پاک یان پیس بێت.
- Percepts: the cleaner knows its location (square A or B) and the contents of that square (dirty or clean). A percept looks like
[A, Dirty]. - Actions — four possible ones:
Left: move to the left square.Right: move to the right square.Suck: clean up any dirt in the current square.NoOp(no operation): do nothing — useful, for example, when both squares are already clean.
- : گسکەکە شوێنی خۆی دەزانێت (چوارگۆشەی A یان B) و ناوەڕۆکی ئەو چوارگۆشەیە (پیس یان پاک). بەم شێوەیە:
[A, Dirty]. - — چوار دانەی دەکرێت:
Left: بڕۆ بۆ چوارگۆشەی چەپ.Right: بڕۆ بۆ چوارگۆشەی ڕاست.Suck: هەر پیسییەک لە چوارگۆشەی ئێستادا هەیە پاکی بکەرەوە.NoOp(هیچ کار نەکردن): هیچ مەکە — بۆ نموونە بەسوودە کاتێک هەردوو چوارگۆشەکە پێشتر پاکن.
The vacuum-cleaner worldجیهانی گسکی کارەبایی
The agent function: کرداری ئەیجێنت:
An agent is described by its agent function: a rule that maps percept histories to actions. In mathematical notation: .
بە وەسف دەکرێت: یاسایەک کە مێژووی دەبەستێتەوە بە . بە نیشانەی بیرکاری: .
fis the name of the function — the agent's "brain" that decides.P*means everything the agent has sensed so far: the whole list of percepts over time. This list is the percept sequence. (The star means "any number of percepts, one after another".)Ais the action the agent takes next.
fناوی — «مێشکی» کە بڕیار دەدات.P*واتە هەموو ئەوەی تا ئێستا هەستی پێ کردووە: هەموو لیستی بە درێژایی کات. ئەم لیستە . (ئەستێرەکە واتە «هەر ژمارەیەک لە ، یەک لە دوای یەک».)Aئەو کە دواتر دەیکات.
You notice it is getting dark outside (your observations), so you turn on the lights (your action). Your own "agent function" chose the action from what you had observed. If the vacuum agent senses dirt, its function might say Suck; if it senses a clean square, it might say "move to the other square".
سەرنج دەدەیت دەرەوە تاریک دەبێت (تێبینییەکانت)، بۆیە گڵۆپەکان هەڵدەکەیت (). «» خۆت لەسەر بنەمای ئەوەی تێبینیت کردبوو هەڵبژارد. ئەگەر گسکەکە هەست بە پیسی بکات، لەوانەیە بڵێت Suck؛ ئەگەر هەست بە چوارگۆشەیەکی پاک بکات، لەوانەیە بڵێت «بڕۆ بۆ چوارگۆشەکەی تر».
Where the analogy stops workingسنووری ئەم نموونەیە
You also use feelings and habits; an agent function is an exact rule from percept sequences to actions.
تۆ هەست و خووش بەکار دەهێنیت؛ یاسایەکی وردە لە بۆ .
| Percept sequence | Action |
|---|---|
[A, Clean] | Right |
[A, Dirty] | Suck |
[B, Clean] | Left |
[B, Dirty] | Suck |
[A, Clean], [A, Clean] | Right |
[A, Clean], [A, Dirty] | Suck |
| ⋮ | ⋮ |
The course notes ask two questions about this table: What is the right function? and Can it be implemented in a program? Think about both before you open the answer.
تێبینییەکانی کۆرسەکە دوو پرسیار لەسەر ئەم خشتەیە دەکەن: کامەیە؟ و ئایا دەکرێت لە جێبەجێ بکرێت؟ پێش کردنەوەی وەڵامەکە بیر لە هەردووکیان بکەرەوە.
Show answerوەڵامەکە پیشان بدە
The right function depends on what we want — on the performance measure (see Rationality). If we want clean squares, a good function is: if the current square is dirty, Suck; otherwise move to the other square. The table above follows exactly this rule.
بەندە بەوەی چیمان دەوێت — بە (بڕوانە عەقڵانییەت). ئەگەر چوارگۆشەی پاکمان بوێت، باش ئەمەیە: ئەگەر چوارگۆشەی ئێستا پیس بوو، Suck؛ ئەگەرنا بڕۆ بۆ چوارگۆشەکەی تر. خشتەکەی سەرەوە ڕێک شوێن ئەم یاسایە دەکەوێت.
Can it be implemented? Not as a complete table: the list of percept sequences grows forever, so the table would be infinitely long. But the rule fits in a few lines of a program. Turning an agent function into a short agent program is the topic of Agent programs.
ئایا دەکرێت جێبەجێ بکرێت؟ وەک خشتەیەکی تەواو نا: لیستی بۆ هەمیشە گەورە دەبێت، بۆیە خشتەکە بێکۆتایی درێژ دەبێت. بەڵام یاساکە لە چەند دێڕێکی جێی دەبێتەوە. گۆڕینی بۆ کورت بابەتی وانەی بەرنامەکانی ئەیجێنتـە.
The vacuum-cleaner worldجیهانی گسکی کارەبایی
Agent = architecture + programئەیجێنت = تەلارسازی + بەرنامە
How does an agent function become a real agent? The agent program runs on a physical architecture — the computing device with its sensors and actuators — and together they produce the agent function.
چۆن دەبێت بە ڕاستەقینە؟ لەسەر تەلارسازییەکی فیزیایی کار دەکات — ئامێرە ژمێریارییەکە بە و — پێکەوە بەرهەم دەهێنن.
- agent = architecture + program
- program = algorithm + data
- = تەلارسازی +
- = +
A smartphone is the architecture: its camera, microphone and screen are the sensors and actuators. A navigation app is the program. The same phone with a different app becomes a different agent.
تەلارسازییەکەیە: کامیرا، و شاشەکەی و . ڕێنیشاندەر . هەمان مۆبایل بە ترەوە دەبێتە تر.
Where the analogy stops workingسنووری ئەم نموونەیە
A phone app can also change itself with updates; in the basic model the architecture and program are fixed parts.
دەتوانێت بە نوێکردنەوە خۆی بگۆڕێت؛ لە مۆدێلە سادەکەدا تەلارسازی و بەشی جێگیرن.
The computing device, with its sensors and actuators, that an agent program runs on. In the formula agent = architecture + program, it is the 'body'.
ئەو ئامێرە ژمێریارییەیە، لەگەڵ و ، کە لەسەری کار دەکات. لە هاوکێشەی «ئەیجێنت = تەلارسازی + بەرنامە»دا، ئەو «جەستە»یەیە.
Rational agentsئەیجێنتە عەقڵانییەکان
A rational agent does the right, logical thing to get the best performance. It can be a person, a robot or software that makes smart decisions to get the best possible result — it always tries to do the "right thing" for what it wants to achieve.
کاری دروست و لۆجیکی دەکات بۆ بەدەستهێنانی باشترین ئەدا. دەکرێت کەسێک، یان بێت کە بڕیاری زیرەکانە دەدات بۆ گەیشتن بە باشترین ئەنجامی گونجاو — هەمیشە هەوڵ دەدات «کاری دروست» بکات بۆ ئەوەی دەیەوێت بیگاتێ.
How do we know what "right" is? We write the goal as a performance measure: a rule that gives a number (a score) to any history of the environment. The score tells how well the agent is doing, and it changes with what has happened so far.
چۆن دەزانین «دروست» چییە؟ ئامانجەکە وەک دەنووسین: یاسایەک کە ژمارەیەک (نمرەیەک) دەداتە هەر مێژوویەکی . نمرەکە دەڵێت چەند باش کار دەکات و بەپێی ئەوەی تا ئێستا ڕووی داوە دەگۆڕێت.
An agent that, for every percept sequence, chooses the action that is expected to give the best performance measure, using what it has perceived and what it knows.
کە بۆ هەر ئەو هەڵدەبژێرێت کە چاوەڕوان دەکرێت باشترین ئەنجام بەپێی بدات، بە بەکارهێنانی ئەوەی هەستی پێ کردووە و ئەوەی دەیزانێت.
Rational action: whichever action is expected to give the highest value of the performance measure, given the percept sequence so far. In other words, based on what the agent has noticed until now, it picks the action with the best chance of the best score.
عەقڵانی: هەر کە چاوەڕێ دەکرێت بەرزترین بەهای بدات، بەپێی تا ئێستا. بە واتایەکی تر، لەسەر بنەمای ئەوەی تا ئێستا سەرنجی داوە، ئەو هەڵدەبژێرێت کە باشترین ئەگەری باشترین نمرەی هەیە.
Rational agentsئەیجێنتە عەقڵانییەکان
What rationality depends onعەقڵانییەت بەندە بە چییەوە
Rational agentsئەیجێنتە عەقڵانییەکان
Limited rationalityعەقڵانییەتی سنووردار
Perfect rationality would mean checking every possible option and outcome. Real agents — and real humans — cannot: they do not have unlimited time, memory or computing power. This is limited rationality: computational limits make perfect rationality unachievable.
تەواو واتای پشکنینی هەموو بژاردە و ئەنجامێکی گونجاو دەبوو. ڕاستەقینە — و مرۆڤە ڕاستەقینەکان — ناتوانن: کات، یان توانای ژمێرکاریی بێسنووریان نییە. ئەمە : سنوورەکانی ژمێرکاری تەواو بەدەستنەهاتوو دەکەن.
So the practical goal is: design the best program for the machine resources you have.
کەواتە ئامانجە کردەییەکە ئەمەیە: باشترین دروست بکە بۆ ئەو سەرچاوانەی ئامێرەکەت هەیەتی.
The idea that perfect rationality is impossible in practice because time, memory and computing power are limited, so an agent does the best it can with its resources.
ئەو بیرۆکەیەیە کە تەواو لە کردەوەدا مەحاڵە چونکە کات، و توانای ژمێریاری سنووردارن، بۆیە بەپێی سەرچاوەکانی باشترین کار دەکات کە دەتوانێت.
Rational agentsئەیجێنتە عەقڵانییەکان
Rational is not perfectعەقڵانی واتە بێکەموکوڕی نا
- Rational ≠ omniscient. An omniscient agent would know everything. A rational agent knows only what its percepts tell it — and percepts may not give all the relevant information.
- Rational ≠ clairvoyant. A clairvoyant could see the future. A rational agent cannot: the result of an action may not be what was expected.
- Therefore rational ≠ successful. A good decision can still end badly.
- Rational ⇒ exploration, learning, autonomy. Because it does not know everything, a rational agent explores to gather information, learns from experience and decides for itself (it is autonomous).
- عەقڵانی ≠ هەمووشتزان. هەمووشتزان هەموو شتێک دەزانێت. تەنیا ئەوە دەزانێت کە پێی دەڵێن — لەوانەشە هەموو پەیوەندیدار نەدەن.
- عەقڵانی ≠ پێشبین (غەیبزان). کەسێکی غەیبزان داهاتوو دەبینێت. ناتوانێت: لەوانەیە ئەنجامی ئەوە نەبێت کە چاوەڕێ دەکرا.
- بۆیە عەقڵانی ≠ سەرکەوتوو. بڕیارێکی باش هێشتا دەکرێت بە خراپی کۆتایی بێت.
- عەقڵانی ⇐ گەڕان و پشکنین، فێربوون، سەربەخۆیی. چونکە هەموو شتێک نازانێت، دەگەڕێت بۆ کۆکردنەوەی ، لە ئەزموون فێر دەبێت و خۆی بڕیار دەدات (سەربەخۆیە).
Karwan checks the weather app before a trip to Sulaymaniyah. It says 5% chance of rain, so he leaves his umbrella at home. It rains anyway, and he gets wet. Was his choice rational? Yes — with the information he had, leaving the umbrella was sensible. It just was not successful.
کاروان پێش گەشتێک بۆ سلێمانی سەیری کەشوهەوا دەکات. دەڵێت ٥٪ ئەگەری باران هەیە، بۆیە چەترەکەی لە ماڵەوە جێدەهێڵێت. کەچی باران دەبارێت و تەڕ دەبێت. ئایا هەڵبژاردنەکەی عەقڵانی بوو؟ بەڵێ — بەو هەیبوو، جێهێشتنی چەترەکە ژیرانە بوو. تەنیا سەرکەوتوو نەبوو.
Where the analogy stops workingسنووری ئەم نموونەیە
Real people also have feelings and habits; a rational agent follows its performance measure exactly.
خەڵکی ڕاستەقینە هەست و خوویان هەیە؛ بە وردی شوێن دەکەوێت.
Exercise: a performance measure for the cleanerڕاهێنان: پێوانەیەکی ئەدا بۆ گسکەکە
For a rational vacuum agent we need a fixed performance measure that scores the whole sequence of environment states. The course notes suggest three possible measures. Think about what kind of behaviour each one rewards.
بۆ گسکی عەقڵانی پێویستمان بە جێگیر هەیە کە نمرە بداتە هەموو زنجیرەی . تێبینییەکانی کۆرسەکە سێ پێوانەی گونجاو پێشنیار دەکەن. بیر بکەرەوە هەر یەکەیان پاداشتی چ جۆرە ڕەفتارێک دەداتەوە.
Evaluate each measure: (a) one point per square cleaned up in time T; (b) one point per clean square per time step, minus one point per move; (c) a penalty when more than k squares are dirty. What would a clever agent do to get a high score with each one?
هەر پێوانەیەک هەڵبسەنگێنە: (أ) یەک خاڵ بۆ هەر چوارگۆشەیەک کە لە ماوەی Tـدا پاک دەکرێتەوە؛ (ب) یەک خاڵ بۆ هەر چوارگۆشەیەکی پاک لە هەر هەنگاوێکی کاتدا، کەم یەک خاڵ بۆ هەر جووڵەیەک؛ (ج) سزا کاتێک زیاتر لە k چوارگۆشە پیسن. زیرەک چی دەکات بۆ ئەوەی بە هەر یەکەیان نمرەی بەرز بەدەست بهێنێت؟
Show answerوەڵامەکە پیشان بدە
- (a) Points for cleaning in time T. It rewards the act of cleaning, not a clean floor. An agent that could dump dirt back could clean, dump, clean again and score forever. It also ignores wasted moves.
- (b) Clean squares per time step, minus moves. It rewards a floor that stays clean and punishes wasted energy. A rational agent cleans quickly, then stops moving (
NoOp) while both squares are clean — and moves again only when it is worth it. - (c) A penalty for more than k dirty squares. It only cares when the floor gets very dirty. The agent may relax until k squares are dirty — fine if cleaning is expensive, bad if you want a spotless floor.
- (أ) خاڵ بۆ پاککردنەوە لە ماوەی Tـدا. پاداشتی کاری پاککردنەوە دەداتەوە، نەک زەوییەکی پاک. کە بتوانێت پیسی بڕژێنێتەوە، دەتوانێت پاک بکاتەوە، بیڕژێنێتەوە، دیسان پاکی بکاتەوە و بۆ هەمیشە نمرە کۆ بکاتەوە. هەروەها جووڵەی بەفیڕۆچوو پشتگوێ دەخات.
- (ب) چوارگۆشەی پاک لە هەر هەنگاوێکی کاتدا، کەم جووڵەکان. پاداشتی زەوییەک دەداتەوە کە پاک دەمێنێتەوە و سزای وزەی بەفیڕۆچوو دەدات. عەقڵانی بە خێرایی پاک دەکاتەوە، پاشان کاتێک هەردوو چوارگۆشەکە پاکن دەوەستێت (
NoOp) — تەنیا کاتێک دەجووڵێتەوە کە شایەنی بێت. - (ج) سزا بۆ زیاتر لە k چوارگۆشەی پیس. تەنیا کاتێک گرنگی دەدات کە زەوی زۆر پیس بێت. لەوانەیە پشوو بدات تا k چوارگۆشە پیس دەبن — باشە ئەگەر پاککردنەوە گران بێت، خراپە ئەگەر زەوییەکی بێگەردت بوێت.
The lesson: design the performance measure for what you really want in the environment (a clean floor, low energy use), not for how you think the agent should behave. Agents are very good at finding loopholes.
وانەکە: بۆ ئەوەی بەڕاستی لە دەتەوێت دابنێ (زەوییەکی پاک، وزەی کەم)، نەک بۆ ئەوەی پێت وایە چۆن ڕەفتار بکات. لە دۆزینەوەی کەلێنەکاندا زۆر لێهاتوون.
Quick checkپشکنینی خێرا
Define an agent in one sentence.بە یەک ڕستە ئەیجێنت پێناسە بکە.
Anything that perceives its environment through sensors and acts on it through actuators.
هەر شتێکە کە بە هەست بە دەکات و بە کاری لەسەر دەکات.
What is the difference between a percept and a percept sequence?جیاوازیی نێوان هەستپێکراو و زنجیرەی هەستپێکراوەکان چییە؟
A percept is what the agent senses at one moment; the percept sequence is everything it has sensed so far.
ئەوەیە کە لە ساتێکدا هەستی پێ دەکات؛ هەموو ئەوەیە کە تا ئێستا هەستی پێ کردووە.
What does mean? واتای چییە؟
The agent function f chooses an action A from the whole percept sequence P*.
f (A) لە هەموو (P*) هەڵدەبژێرێت.
What is active sensing? Give two examples.هەستپێکردنی چالاک چییە؟ دوو نموونە بهێنەوە.
Sending out a signal and sensing its reflection: radar (radio waves) and ultrasound (sound waves).
ناردنی ئاماژەیەک و هەستکردن بە گەڕانەوەکەی: ڕادار (شەپۆلی ڕادیۆیی) و ئەڵتراساوند (شەپۆلی دەنگ).
Complete: agent = … + …, and program = … + …تەواوی بکە: ئەیجێنت = … + … و بەرنامە = … + …
agent = architecture + program; program = algorithm + data.
= تەلارسازی + ؛ = + .
Why is a rational agent not always successful?بۆچی ئەیجێنتی عەقڵانی هەمیشە سەرکەوتوو نییە؟
It is not omniscient (its percepts may miss information) and not clairvoyant (outcomes may differ from what was expected).
هەمووشتزان نییە ( لەوانەیە لەدەست بدەن) و پێشبینیش نییە (ئەنجامەکان لەوانەیە جیاواز بن لەوەی چاوەڕێ دەکرا).
What is limited rationality?عەقڵانییەتی سنووردار چییە؟
Perfect rationality is impossible because time, memory and computing power are limited, so we design the best program for the available resources.
تەواو مەحاڵە چونکە کات، و توانای ژمێرکاری سنووردارن، بۆیە باشترین بۆ سەرچاوە بەردەستەکان دروست دەکەین.
Summaryپوختە
- An agent perceives its environment through sensors and acts on it through actuators.
- Agents can be animals, humans, robots or software (crawlers, chatbots, voice assistants); they may work alone or in groups.
- Sensors can go beyond human senses; active sensing sends a signal and reads the reflection; IoT connects sensors to the internet.
- The agent function maps percept sequences to actions; agent = architecture + program.
- A rational agent chooses the action with the best expected performance measure; rational ≠ omniscient, clairvoyant or successful.
- Design performance measures for what you want in the environment.
- بە هەست بە دەکات و بە کاری لەسەر دەکات.
- دەکرێت ئاژەڵ، مرۆڤ، یان بن (، ، )؛ دەکرێت بە تەنیا یان بە گرووپ کار بکەن.
- دەتوانن لە هەستەکانی مرۆڤ تێپەڕن؛ ئاماژەیەک دەنێرێت و گەڕانەوەکەی دەخوێنێتەوە؛ بە ئینتەرنێتەوە دەبەستێت.
- دەبەستێتەوە بە ؛ = تەلارسازی + .
- ئەو هەڵدەبژێرێت کە باشترین چاوەڕوانکراوی هەیە؛ عەقڵانی ≠ هەمووشتزان، پێشبین یان سەرکەوتوو.
- بۆ ئەوە دابنێ کە لە دەتەوێت.
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
Task Environments: PEAS and the Eight Propertiesژینگەکانی ئەرک: PEAS و هەشت تایبەتمەندییەکە
Related lecturesوانە پەیوەندیدارەکان
- Task Environments: PEAS and the Eight Propertiesژینگەکانی ئەرک: PEAS و هەشت تایبەتمەندییەکە
- Agent Programs, Pseudocode and Algorithm Analysisبەرنامەکانی ئەیجێنت، نیمچەکۆد و شیکارکردنی ئەلگۆریزم
- Types of Agents and Multi-Agent Systemsجۆرەکانی ئەیجێنت و سیستەمە فرەئەیجێنتەکان
- Emerging Technologiesتەکنەلۆجیا نوێکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.