Chapterبەش 2 · Lectureوانە 2.4
Types of Agents and Multi-Agent Systemsجۆرەکانی ئەیجێنت و سیستەمە فرەئەیجێنتەکان
The four basic agent programs, from simple reflex to model-based, goal-based and utility-based agents, how any of them can learn, and how many agents work together in a multi-agent system: what they must handle and how they are organised.
چوار جۆرە بنەڕەتییەکەی ، لە تا ، و ، چۆن هەر یەکێکیان دەتوانێت فێر ببێت و چۆن زۆر لە پێکەوە کار دەکەن: چی دەبێت چارەسەر بکەن و چۆن ڕێکدەخرێن.
What you will learnچی فێر دەبیت
- Name the four basic agent types in order of generality and draw what each adds.
- Explain the parts of a simple reflex agent and write REFLEX-VACUUM-AGENT in pseudocode and Python.
- Explain how an internal state, goals and utility make agents more capable, with examples.
- Describe the parts of a learning agent and what the problem generator really does.
- Describe what a multi-agent system must handle and recognise the seven agent organisations.
- چوار جۆرە بنەڕەتییەکەی بە ڕیزی گشتیبوون ناو ببەیت و بە وێنە پیشان بدەیت هەر یەکێکیان چی زیاد دەکات.
- بەشەکانی ڕوون بکەیتەوە و REFLEX-VACUUM-AGENT بە و بنووسیت.
- ڕوونی بکەیتەوە ، ئامانج و چۆن بەتواناتر دەکەن، لەگەڵ نموونە.
- بەشەکانی وەسف بکەیت و بەڕاستی چی دەکات.
- وەسف بکەیت دەبێت چی چارەسەر بکات و حەوت جۆرەکەی بناسیتەوە.
Four kinds of agent programsچوار جۆری بەرنامەی ئەیجێنت
Every agent sees the world through its sensors and changes it through its actuators. Between them sits the part we have to design: the agent program. The previous lesson showed that a giant lookup table is hopeless. AI books describe four basic kinds of agent program instead, in order of increasing generality:
هەموو لە ڕێی جیهان دەبینێت و لە ڕێی دەیگۆڕێت. لە نێوانیاندا ئەو بەشە هەیە کە دەبێت دیزاینی بکەین: . وانەی پێشوو پیشانی دا کە خشتەیەکی زەبەلاح بێهیوایە. لەبری ئەوە، کتێبەکانی چوار جۆری بنەڕەتیی وەسف دەکەن، بە ڕیزی گشتیبوونی زیاتر:
- Simple reflex agents: react to what they see now.
- Model-based reflex agents: also remember and model the parts of the world they cannot see.
- Goal-based agents: think ahead about which actions reach a goal.
- Utility-based agents: choose the outcome that is best, not only one that reaches the goal.
- : کاردانەوەیان بۆ ئەوەی ئێستا دەیبینن هەیە.
- : ئەو بەشانەی جیهانیش کە نایبینن لە بیر دەگرن و مۆدێلیان بۆ دادەنێن.
- : پێشتر بیر دەکەنەوە کام کار دەگاتە ئامانجێک.
- : باشترین ئەنجام هەڵدەبژێرن، نەک تەنها یەکێک کە بگاتە ئامانج.
Any of the four can also be turned into a learning agent, which improves itself with experience. The next screens build the diagram of each type step by step: every new type keeps most boxes of the one before and adds new ones (shown in green).
هەر یەکێک لەم چوارە دەکرێت بکرێتە ، کە بە ئەزموون خۆی باشتر دەکات. لاپەڕەکانی داهاتوو هێڵکاریی هەر جۆرێک هەنگاو بە هەنگاو دروست دەکەن: هەر جۆرێکی نوێ زۆربەی سندوقەکانی جۆری پێشوو دەهێڵێتەوە و سندوقی نوێ زیاد دەکات (بە سەوز پیشان دراون).
Think of five drivers. The first only reacts: red light, stop. The second also remembers: “the car I passed is still behind me.” The third has a destination and plans a route to it. The fourth has a destination too, but chooses the route that is fastest and safest, not just any route. The fifth is a new driver who gets better every week from experience. These are the five kinds of agents in this lesson.
پێنج شۆفێر بهێنە بەرچاوت. یەکەمیان تەنها کاردانەوەی هەیە: گڵۆپی سوور، ڕاوەستە. دووەم لە بیریشی دەمێنێت: «ئەو ئۆتۆمبێلەی تێپەڕاندم هێشتا لە دواوەمە.» سێیەم شوێنێکی مەبەستی هەیە و ڕێگەیەکی بۆ دادەنێت. چوارەمیش شوێنی مەبەستی هەیە، بەڵام خێراترین و سەلامەتترین ڕێگە هەڵدەبژێرێت، نەک هەر ڕێگەیەک. پێنجەم شۆفێرێکی نوێیە کە هەموو هەفتەیەک بە ئەزموون باشتر دەبێت. ئەمانە پێنج جۆری کە لەم وانەیەدا دەیانخوێنین.
Where the analogy stops workingسنووری ئەم نموونەیە
Real drivers mix all five at once. Real agent programs often do too: a self-driving car has reflexes, a model, goals, a utility and learning.
شۆفێرە ڕاستەقینەکان هەر پێنجیان پێکەوە تێکەڵ دەکەن. زۆرجار لە ژیانی ڕاستەقینەدا هەمان شت دەکەن: کاردانەوە، مۆدێل، ئامانج، و فێربوونی هەیە.
Simple reflex agentsئەیجێنتەکانی کاردانەوەی سادە
An agent that chooses its action only from the current percept, using condition–action rules such as 'if dirty, then suck'. It has no memory of the past.
کە تەنیا بەپێی کارەکەی هەڵدەبژێرێت، بە بەکارهێنانی وەک «ئەگەر پیس بوو، هەڵیبمژە». هیچ بیرەوەرییەکی ڕابردووی نییە.
The word reflex means a reaction. A simple reflex agent just reacts: it acts through its actuators according to the percept it receives through its sensors. A knee that kicks when the doctor taps it does not think; it reacts.
وشەی reflex واتە «کاردانەوە». تەنها کاردانەوەی هەیە: لە ڕێی کار دەکات، بەپێی ئەو لە ڕێی وەریدەگرێت. ئەژنۆیەک کە کاتێک پزیشک لێی دەدات دەجووڵێت بیر ناکاتەوە؛ تەنها کاردانەوەی هەیە.
| Boxسندوق | What it meansواتاکەی |
|---|---|
| What the world is like nowجیهان ئێستا چۆنە (What the world is like now) | At this step and moment, the agent takes a picture, a snapshot, of its surroundings through its sensors. لەو هەنگاو و ساتەدا لە ڕێی گرتەیەک (snapshot) لە دەوروبەری خۆی دەگرێت. |
| Condition–action rules | Rules stored inside the agent, of the form “if X happens, do Y”, for example “if dirt is found, suck the dirt”.ئەو یاسایانەی لە ناو هەڵگیراون و ناسێنراون، بە شێوەی «ئەگەر X ڕووی دا، Y بکە»، بۆ نموونە «ئەگەر پیسی دۆزرایەوە، پیسییەکە هەڵمژە». |
| What action I should do nowئێستا چ کارێک بکەم (What action I should do now) | After looking at the rules and at what it has received from the environment: which action should the agent carry out? دوای سەیرکردنی یاساکان و ئەو شتانەی لە وەریگرتوون: چی بکات و چ کارێک جێبەجێ بکات؟ |
Simple reflex agentsئەیجێنتەکانی کاردانەوەی سادە
Simple reflex agents in pseudocode and Pythonئەیجێنتەکانی کاردانەوەی سادە بە نیمچەکۆد و Python
The vacuum cleaner from the agents lesson needs no memory at all. Four lines are enough:
گسکە کارەباییەکەی وانەی ئەیجێنتەکان هیچ پێویست نییە. چوار دێڕ بەسە:
function REFLEX-VACUUM-AGENT([location, status]) returns an action
if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Leftdef reflex_vacuum_agent(percept):
location, status = percept
if status == 'Dirty':
return 'Suck'
elif location == 'A':
return 'Right'
elif location == 'B':
return 'Left'
for percept in [('A', 'Dirty'), ('A', 'Clean'), ('B', 'Dirty'), ('B', 'Clean')]:
print(percept, '->', reflex_vacuum_agent(percept))('A', 'Dirty') -> Suck
('A', 'Clean') -> Right
('B', 'Dirty') -> Suck
('B', 'Clean') -> LeftCompare: the table-driven agent needed 10 rows and still ran out after 3 steps. These few lines work for ever in this world.
بەراوردی بکە: پێویستی بە 10 ڕیز بوو و هێشتا دوای 3 هەنگاو تەواو بوو. ئەم چەند دێڕە بۆ هەمیشە لەم جیهانەدا کار دەکەن.
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
The percept is a pair; destructuring assignment splits it.
جووتێکە؛ لێکی دەکاتەوە.
- Lineدێڕی 3-8
Three condition–action rules, tested from top to bottom.
سێ ، لە سەرەوە بۆ خوارەوە تاقی دەکرێنەوە.
The general simple reflex agent works the same way for any problem. It turns the percept into a description of the current state, finds the first rule whose condition matches that state, and returns that rule's action:
وەشانە گشتییەکەی بۆ هەر کێشەیەک بە هەمان شێوە کار دەکات. دەکات بە وەسفێکی ئێستا، یەکەم یاسا دەدۆزێتەوە کە لەگەڵ ئەو دەگونجێت و کاری ئەو یاسایە دەگەڕێنێتەوە:
function SIMPLE-REFLEX-AGENT(percept) returns an action
persistent: rules, a set of condition–action rules
state ← INTERPRET-INPUT(percept)
rule ← RULE-MATCH(state, rules)
action ← rule.ACTION
return actionExplain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2
The rules are stored inside the agent.
یاساکان لە ناو هەڵگیراون.
- Lineدێڕی 4
Interpret the input: “What the world is like now”.
لێکدانەوەی : «جیهان ئێستا چۆنە».
- Lineدێڕی 5-6
Find the matching rule and take its action: “What action I should do now”.
یاسا گونجاوەکە بدۆزەوە و کارەکەی وەربگرە: «ئێستا چ کارێک بکەم».
RULES = { # condition -> action
('A', 'Dirty'): 'Suck',
('B', 'Dirty'): 'Suck',
('A', 'Clean'): 'Right',
('B', 'Clean'): 'Left',
}
def interpret_input(percept):
location, status = percept # a real robot would turn camera pixels
return (location, status) # into a description of the state here
def rule_match(state, rules):
return rules[state] # the rule whose condition matches
def simple_reflex_agent(percept):
state = interpret_input(percept)
action = rule_match(state, RULES)
return action
print(simple_reflex_agent(('B', 'Dirty')))
print(simple_reflex_agent(('B', 'Clean')))Suck Left
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 1-6
The rules as a dictionary: condition → action.
یاساکان وەک : ← کار.
- Lineدێڕی 9-11
A real robot would turn camera pixels into a state here; in our tiny world the percept already is the state.
ڕاستەقینە لێرەدا خاڵەکانی وێنەی کامێرا دەکات بە ؛ لە جیهانە بچووکەکەی ئێمەدا خۆی .
- Lineدێڕی 19-21
The three lines of the pseudocode, one for one.
سێ دێڕەکەی ، یەک بە یەک.
Simple reflex agentsئەیجێنتەکانی کاردانەوەی سادە
When simple reflexes are not enoughکاتێک کاردانەوەی سادە بەس نییە
A simple reflex agent decides from the current percept only. That works only when the current percept tells it everything it needs, that is, when the environment is fully observable. If something important is hidden, the agent can make bad choices or get stuck.
تەنها لە ئێستاوە بڕیار دەدات. ئەمە تەنها ئەو کاتە کار دەکات کە ئێستا هەموو ئەوەی پێویستیەتی پێی بڵێت، واتە لە ژینگەیەکی تەواو بینراودا. ئەگەر شتێکی گرنگ شاراوە بێت، دەکرێت هەڵبژاردنی خراپ بکات یان بچەقێت.
Example: take away the location sensor of the vacuum cleaner, so it senses only Dirty or Clean. On a clean square it must choose between Left and Right without knowing where it is. If it always chooses Right, then in square B it pushes against the wall for ever: an infinite loop. A common escape is to randomise: choose Left or Right at random, so the agent sooner or later reaches the other square.
نموونە: شوێنی گسکەکە لاببە، بۆ ئەوەی تەنها Dirty یان Clean هەست پێ بکات. لەسەر چوارگۆشەیەکی پاک دەبێت لە نێوان Left و Right هەڵبژێرێت بەبێ ئەوەی بزانێت لە کوێیە. ئەگەر هەمیشە Right هەڵبژێرێت، لە چوارگۆشەی B بۆ هەمیشە خۆی بە دیوارەکەدا دەدات: . ڕێگەیەکی باو بۆ دەربازبوون هەڕەمەکیکردنـە: Left یان Right بە هەڕەمەکی هەڵبژێرە، بۆ ئەوەی زوو یان درەنگ بگاتە چوارگۆشەکەی تر.
Model-based reflex agentsئەیجێنتە مۆدێلدارەکان
A reflex agent that keeps an internal state, using a model of how the world changes and of what its own actions do, so it can act well even when it cannot see everything.
کە دەپارێزێت، بە بەکارهێنانی مۆدێلێک کە ڕوونی دەکاتەوە جیهان چۆن دەگۆڕێت و کارەکانی خۆی چی دەکەن، بۆیە دەتوانێت باش کار بکات تەنانەت کاتێک ناتوانێت هەموو شتێک ببینێت.
A model-based reflex agent decides not only from the current state of the world. It also considers how the world changes and how its own actions affect it. For this it keeps an internal state: a picture of the world built from earlier observations and the current percept. It remembers what it saw before and uses this to decide better, and the state helps it predict what will change and what its actions will do. Example: “I remember that after the red light, it turns green.”
تەنها لە ئێستای جیهانەوە بڕیار نادات. بیر لەوەش دەکاتەوە کە جیهان چۆن دەگۆڕێت و کارەکانی خۆی چ کاریگەرییەکیان لەسەری هەیە. بۆ ئەمە هەڵدەگرێت: وێنەیەک لە جیهان کە لە بینینەکانی پێشوو و ئێستا دروست کراوە. ئەوەی پێشتر بینیویەتی لە بیری دەمێنێت و بۆ بڕیاری باشتر بەکاری دەهێنێت. هەروەها یارمەتیی دەدات پێشبینی بکات چی دەگۆڕێت و کارەکانی چی دەکەن. نموونە: «لە بیرمە کە دوای گڵۆپی سوور، سەوز دەبێت.»
| New boxسندوقی نوێ | Meaningواتا | Exampleنموونە |
|---|---|---|
| State | What the agent remembers about the world.ئەوەی دەربارەی جیهان لە بیری دەمێنێت. | The light was red 20 seconds ago.٢٠ چرکە پێش ئێستا گڵۆپەکە سوور بوو. |
| How the world evolvesجیهان چۆن دەگۆڕێت | A model (a set of rules) of how the environment changes over time; it helps predict future states.مۆدێلێک (کۆمەڵێک یاسا) بۆ ئەوەی بە تێپەڕبوونی کات چۆن دەگۆڕێت؛ یارمەتی دەدات داهاتوو پێشبینی بکرێن. | A red light will turn green.گڵۆپی سوور سەوز دەبێت. |
| What my actions doکارەکانم چی دەکەن | A model of how the agent's own actions change the environment.مۆدێلێک بۆ ئەوەی کارەکانی خودی چۆن دەگۆڕن. | If the car speeds up, it moves forward.ئەگەر ئۆتۆمبێلەکە خێرا بکات، بەرەو پێش دەچێت. |
A description of what each action does: given a state and an action, it gives the resulting state. Model-based agents and search algorithms both need one.
وەسفێکە بۆ ئەوەی هەر کارێک چی دەکات: ئەگەر و بدەیتێ، ئەو دۆخە دەدات کە لێیانەوە دروست دەبێت. هەم و هەم پێویستیان پێیەتی.
Model-based reflex agentsئەیجێنتە مۆدێلدارەکان
Example: a self-driving car and a smarter cleanerنموونە: ئۆتۆمبێلی خۆگەڕ و گسکێکی زیرەکتر
A real-world model-based agent is a self-driving car:
لە جیهانی ڕاستەقینەدا ـە:
- Sensorsهەستەوەرەکان
Cameras and other sensors detect nearby vehicles and traffic lights.
کامێرا و تر ئۆتۆمبێلە نزیکەکان و گڵۆپەکانی هاتوچۆ دەدۆزنەوە.
- Internal stateدۆخی ناوەکی
The state keeps track of the car's position, its speed and the road conditions.
شوێن، خێرایی و دۆخی ڕێگای ئۆتۆمبێلەکە بەدواداچوونی بۆ دەکات.
- Modelمۆدێل
A model predicts how the traffic will move and what will happen when the car speeds up, stops or turns.
مۆدێلێک پێشبینی دەکات هاتوچۆکە چۆن دەجووڵێت و کاتێک ئۆتۆمبێلەکە خێرا دەکات، دەوەستێت یان دەسووڕێتەوە چی ڕوو دەدات.
- Rulesیاساکان
Condition–action rules decide when to stop, turn or speed up.
بڕیار دەدەن کەی بوەستێت، بسووڕێتەوە یان خێرا بکات.
The same idea makes our vacuum cleaner smarter. The reflex cleaner keeps moving between the squares even when both are clean, wasting moves. A model-based cleaner remembers what it believes about each square and knows what its own action does (Suck makes a square clean), so it can rest when everything is clean:
هەمان بیرۆکە گسکەکەمان زیرەکتر دەکات. گسکە کاردانەوەییەکە بەردەوام لە نێوان چوارگۆشەکاندا دێت و دەچێت، تەنانەت کاتێک هەردووکیان پاکن. بەم شێوەیە جووڵە بەفیڕۆ دەدات. گسکێکی مۆدێلدار ئەوەی دەربارەی هەر چوارگۆشەیەک باوەڕی پێیەتی لە بیر دەگرێت و دەزانێت کاری خۆی چی دەکات (Suck چوارگۆشەیەک پاک دەکاتەوە)، بۆیە کاتێک هەموو شتێک پاکە دەتوانێت پشوو بدات:
def reflex_vacuum_agent(percept):
location, status = percept
if status == 'Dirty':
return 'Suck'
return 'Right' if location == 'A' else 'Left'
def make_model_based_vacuum_agent():
model = {'A': None, 'B': None} # internal state: what I believe about each square
def program(percept):
location, status = percept
model[location] = status # update the state with the new percept
if status == 'Dirty':
model[location] = 'Clean' # what my actions do: Suck cleans this square
return 'Suck'
if model['A'] == 'Clean' and model['B'] == 'Clean':
return 'NoOp' # everything is clean: rest
return 'Right' if location == 'A' else 'Left'
return program
def run(program, steps=6):
status = {'A': 'Dirty', 'B': 'Dirty'}
location = 'A'
actions = []
for _ in range(steps):
action = program((location, status[location]))
actions.append(action)
if action == 'Suck':
status[location] = 'Clean'
elif action == 'Right':
location = 'B'
elif action == 'Left':
location = 'A'
moves = actions.count('Right') + actions.count('Left')
print(actions, 'moves:', moves)
run(reflex_vacuum_agent)
run(make_model_based_vacuum_agent())['Suck', 'Right', 'Suck', 'Left', 'Right', 'Left'] moves: 4 ['Suck', 'Right', 'Suck', 'NoOp', 'NoOp', 'NoOp'] moves: 1
Both agents clean the two squares in three steps. Then the reflex agent keeps walking (4 moves in total), while the model-based agent rests (1 move).
هەردوو لە سێ هەنگاودا دوو چوارگۆشەکە پاک دەکەنەوە. پاشان بەردەوام دەڕوات (سەرجەم 4 جووڵە)، بەڵام پشوو دەدات (1 جووڵە).
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 5
a if c else b: Right in square A, otherwise Left.a if c else b: لە چوارگۆشەی A Right، ئەگەر نا Left.- Lineدێڕی 9
The internal state: what the agent believes about each square (None = unknown).
: ئەوەی دەربارەی هەر چوارگۆشەیەک باوەڕی پێیەتی (None = نەزانراو).
- Lineدێڕی 13
Update the state with the new percept.
بە نوێ بکەرەوە.
- Lineدێڕی 15
“What my actions do”: after Suck, this square will be clean.
«کارەکانم چی دەکەن»: دوای Suck، ئەم چوارگۆشەیە پاک دەبێت.
- Lineدێڕی 17-18
A rule that uses the model, not only the current percept.
یاسایەک کە مۆدێلەکە بەکار دەهێنێت، نەک تەنها ئێستا.
- Lineدێڕی 24-37
A small world: both squares start dirty; count the moves (Left and Right) in 6 steps.
جیهانێکی بچووک: هەردوو چوارگۆشە بە پیسی دەست پێدەکەن؛ جووڵەکان (Left و Right) لە 6 هەنگاودا بژمێرە.
Goal-based agentsئەیجێنتە ئامانجخوازەکان
An agent that has goals and chooses its actions by thinking ahead about which actions will reach a goal. Search algorithms are how such agents plan.
کە ئامانجی هەیە و کارەکانی بە بیرکردنەوە لە پێشەوە هەڵدەبژێرێت: کام کار دەیگەیەنێتە ئامانجەکە. ئەو ڕێگایەن کە ئەم ئەیجێنتانە پێی پلان دادەنێن.
Knowing how the world is does not always tell you what to do. At a crossroads a taxi can turn left, turn right or go straight; the right choice depends on where the passenger wants to go. A goal-based agent has goals: descriptions of the states it wants to reach, for example “the robot's goal is to pick up the object on the table”.
زانینی ئەوەی جیهان چۆنە هەمیشە پێت ناڵێت چی بکەیت. لە چوارڕێیانێکدا تەکسییەک دەتوانێت بەلای چەپدا بسووڕێتەوە، بەلای ڕاستدا یان ڕاست بڕوات؛ هەڵبژاردنی دروست پەیوەستە بەوەی ڕێبوارەکە دەیەوێت بچێتە کوێ. ئامانجـی هەیە: وەسفی ئەو دەیەوێت پێیان بگات، بۆ نموونە «ئامانجی هەڵگرتنی ئەو شتەیە کە لەسەر مێزەکەیە».
This is where goal-based agents shine. Before acting, the agent asks “What will it be like if I do action A?”. It simulates the effect of each possible action and checks whether it brings it closer to the goal, for example: “If I turn right, I'll avoid the chair and get closer to my goal.” Goal-based agents are goal-oriented: they actively pursue a goal instead of only reacting, and they predict the outcomes of their actions to choose the best one.
لێرەدا دەدرەوشێنەوە. پێش کارکردن، دەپرسێت: «ئەگەر کاری A بکەم، جیهان چۆن دەبێت؟». کاریگەریی هەر کارێکی ئەگەری لاسایی دەکاتەوە و دەپشکنێت ئایا نزیکتری دەکاتەوە لە ئامانجەکە، بۆ نموونە: «ئەگەر بەلای ڕاستدا بسووڕێمەوە، خۆم لە کورسییەکە لادەدەم و لە ئامانجەکەم نزیکتر دەبمەوە.» ئامانجخوازن: بە چالاکی بەدوای ئامانجێکدا دەچن لەبری ئەوەی تەنها کاردانەوەیان هەبێت و ئەنجامی کارەکانیان پێشبینی دەکەن بۆ ئەوەی باشترینیان هەڵبژێرن.
Utility-based agentsئەیجێنتە سوودخوازەکان
An agent that compares possible future states with a utility function and chooses the action that leads to the 'happiest' state, not just to any goal.
کە دۆخە گونجاوەکانی داهاتوو بە بەراورد دەکات و ئەو کارە هەڵدەبژێرێت کە دەیگەیەنێتە «دڵخۆشترین» دۆخ، نەک تەنیا هەر ئامانجێک.
A goal only says yes or no: the goal is reached or not. Often many action sequences reach the goal, but some are quicker, safer or cheaper. Utility is the agent's way of measuring how good or bad a state is, like a happiness scale for the agent. The box “How happy I will be in such a state” shows the agent scoring each possible outcome with its utility function.
ئامانج تەنها دەڵێت بەڵێ یان نا: ئامانجەکە گەیشتووە یان نا. زۆرجار زۆر زنجیرە کار دەگەنە ئامانج، بەڵام هەندێکیان خێراتر، سەلامەتتر یان هەرزانترن. ڕێگای بۆ پێوانی ئەوەی چەند باش یان خراپە، وەک پێوەرێکی دڵخۆشی بۆ . سندوقی «لەو چەند دڵخۆش دەبم» پیشان دەدات کە بە نمرە دەدات بە هەر ئەنجامێکی ئەگەری.
The course example: a robot in a room. Its sensors (cameras, touch sensors) see the room, which is its environment. It can predict how moving to different spots will change the room's state, for example whether it will bump into something. Its utility function says whether a new spot is good or bad. Using all this, it chooses the best action, such as moving to one particular spot.
نموونەی کۆرسەکە: لە ژوورێکدا. (کامێرا و دەستلێدان) ژوورەکە دەبینن، کە . دەتوانێت پێشبینی بکات چوون بۆ شوێنی جیاواز چۆن ژوورەکە دەگۆڕێت، بۆ نموونە ئایا بەر شتێک دەکەوێت. دەڵێت ئایا شوێنێکی نوێ باشە یان خراپ. بە بەکارهێنانی هەموو ئەمانە، باشترین کار هەڵدەبژێرێت، وەک چوون بۆ شوێنێکی دیاریکراو.
A tiny example. Three routes lead to the same place, so a goal-based agent sees no difference. A utility function that punishes time and risk can choose:
نموونەیەکی بچووک. سێ ڕێگە دەگەنە هەمان شوێن، بۆیە هیچ جیاوازییەک نابینێت. کە سزای کات و مەترسی دەدات دەتوانێت هەڵبژێرێت:
# Three routes to the same place: a goal-based agent sees no difference.
routes = {
'main road': {'minutes': 20, 'risk': 0.30},
'ring road': {'minutes': 25, 'risk': 0.05},
'old bazaar road': {'minutes': 35, 'risk': 0.01},
}
def utility(outcome):
# higher is better: every minute costs 1 point, risk costs much more
return -outcome['minutes'] - 50 * outcome['risk']
best_route = None
best_value = float('-inf') # smaller than any real number
for name, outcome in routes.items():
value = utility(outcome)
print(f"{name:16} utility = {value}")
if value > best_value:
best_route, best_value = name, value
print('Chosen route:', best_route)main road utility = -35.0 ring road utility = -27.5 old bazaar road utility = -35.5 Chosen route: ring road
The ring road is a little slower than the main road but much safer, so it has the highest utility.
ڕێگای بازنەیی کەمێک لە ڕێگای سەرەکی خاوترە بەڵام زۆر سەلامەتترە، بۆیە بەرزترین هەیە.
Explain the codeڕوونکردنەوەی کۆدەکە
- Lineدێڕی 2-6
Predicted outcome of each route: minutes and risk of an accident or a jam (0 to 1).
ئەنجامی پێشبینیکراوی هەر ڕێگەیەک: خولەک و مەترسیی ڕووداو یان قەرەباڵغی (0 تا 1).
- Lineدێڕی 9-11
The utility function: higher is better. Every minute costs 1 point; risk costs 50 points per unit.
: بەرزتر باشترە. هەر خولەکێک 1 خاڵ دەکات؛ مەترسی بۆ هەر یەکەیەک 50 خاڵ دەکات.
- Lineدێڕی 14-20
Keep the route with the highest utility.
float('-inf')is minus infinity, smaller than any number.ئەو ڕێگەیە بهێڵەوە کە بەرزترین هەیە.
float('-inf')واتە سالب، لە هەموو ژمارەیەک بچووکترە.
Learning agentsئەیجێنتە فێرخوازەکان
An agent that improves its own performance from experience. It has a learning element, a performance element, a critic and a problem generator.
کە لە ڕێگەی ئەزموونەوە ئەدای خۆی باشتر دەکات. ، ، و هەیە.
A learning agent can start with little knowledge and get better with experience. It has four parts, plus the familiar sensors and actuators:
دەتوانێت بە زانیارییەکی کەم دەست پێبکات و بە ئەزموون باشتر ببێت. چوار بەشی هەیە، لەگەڵ و ، کە پێشتر ناسیومانن:
| Partبەش | Its jobکارەکەی |
|---|---|
| Sets the target for the agent, like a benchmark for success. It comes from outside the agent.ئامانج بۆ دیاری دەکات، وەک پێوەرێک بۆ سەرکەوتن. لە دەرەوەی دێت. | |
| Compares how the agent is doing with the performance standard and gives feedback.ئەدای لەگەڵ بەراورد دەکات و هەڵسەنگاندن دەدات. | |
| Uses the feedback and its knowledge to make changes that improve the agent.هەڵسەنگاندنەکە و زانیارییەکانی بەکار دەهێنێت بۆ ئەوەی گۆڕانکاری بکات کە باشتر بکەن. | |
| Chooses and carries out the actions through the actuators. It is what we called the whole agent before: one of the four agent types.کارەکان هەڵدەبژێرێت و لە ڕێی جێبەجێیان دەکات. ئەوەیە کە پێشتر پێمان دەوت هەموو : یەکێک لە چوار جۆرەکە. | |
| Suggests new, exploratory actions that lead to new and informative experiences, even if they do not look best right now.کاری نوێ و تاقیکارانە پێشنیار دەکات کە بەرەو ئەزموونی نوێ و بەسوود دەبەن، تەنانەت ئەگەر ئێستا باشترین دەرنەکەون. | |
| Perceive the environment and gather information about the state of the world.هەست بە دەکەن و زانیاری دەربارەی جیهان کۆ دەکەنەوە. |
The course example: a robot learning to play chess. Its performance standard is to win the game. A camera (a sensor) sees the board (the environment), and a robotic arm (an actuator) makes the moves (actions). After each move the critic judges how good the move was compared with the goal. The learning element uses this feedback to improve the strategy. The problem generator might suggest new positions or unusual moves to practise on.
نموونەی کۆرسەکە: کە فێری یاریی شەترەنج دەبێت. بردنەوەی یارییەکەیە. کامێرایەک () تەختەکە () دەبینێت و قۆڵێکی ڕۆبۆتی () جووڵەکان (کارەکان) دەکات. دوای هەر جووڵەیەک، هەڵدەسەنگێنێت جووڵەکە بە بەراورد لەگەڵ ئامانجەکەدا چەند باش بوو. ئەم هەڵسەنگاندنە بەکار دەهێنێت بۆ باشترکردنی پلانەکەی. لەوانەیە دۆخی نوێ یان جووڵەی نائاسایی پێشنیار بکات بۆ ڕاهێنان لەسەریان.
The five types side by sideپێنج جۆرەکە لە تەنیشت یەکەوە
| Agent typeجۆری | Decides usingبە چی بڕیار دەدات | Everyday exampleنموونەی ڕۆژانە |
|---|---|---|
| the current percept and fixed rules ئێستا و یاسای جێگیر | an automatic door that opens when someone stands in front of itدەرگایەکی خۆکار کە کاتێک کەسێک لە بەردەمیدا دەوەستێت دەکرێتەوە | |
| + an internal state and a model of the world+ و مۆدێلێکی جیهان | a robot cleaner that maps the house and remembers cleaned rooms پاککەرەوە کە نەخشەی ماڵەکە دەکێشێت و ژوورە پاککراوەکانی لە بیرە | |
| + goals and predictions of what actions lead to+ ئامانج و پێشبینیی ئەوەی کارەکان بەرەو چی دەبەن | a map app that plans a route to a destinationبەرنامەیەکی نەخشە کە ڕێگەیەک بۆ شوێنێکی مەبەست دادەنێت | |
| + a utility function to rank outcomes+ بۆ ڕیزکردنی ئەنجامەکان | a map app that picks the fastest route, avoiding traffic and tollsبەرنامەیەکی نەخشە کە خێراترین ڕێگە هەڵدەبژێرێت و خۆی لە قەرەباڵغی و باج لادەدات | |
| + a critic, a learning element and a problem generator+ ، و | a spam filter that improves every time you mark an email “not spam”پاڵاوتەیەکی کە هەموو جارێک ئیمەیڵێک بە «سپام نییە» نیشان دەکەیت باشتر دەبێت |
Multi-agent systemsسیستەمە فرەئەیجێنتەکان
A system in which several agents work in the same environment and interact; a complex task is often split into smaller tasks, each given to a different agent.
سیستەمێکە کە تێیدا چەند لە هەمان کار دەکەن و کارلێک لەگەڵ یەکتر دەکەن؛ زۆرجار ئەرکێکی ئاڵۆز دابەش دەکرێت بۆ چەند ئەرکێکی بچووکتر و هەر یەکەیان دەدرێت بە ئەیجێنتێکی جیاواز.
Until now we looked at one agent. In a multi-agent system (MAS), many agents interact with their neighbouring agents. A complex task is divided into smaller tasks, and each smaller task is given to a different agent. By working together, they solve a problem that would be too big for one agent, much as teams of people do.
تا ئێستا سەیری یەک کرد. لە (MAS)ـدا، زۆر لەگەڵ دراوسێیاندا کارلێک دەکەن. ئەرکێکی ئاڵۆز دابەش دەکرێت بەسەر ئەرکی بچووکتردا و هەر ئەرکێکی بچووک دەدرێت بە جیاواز. بە کارکردنی پێکەوە کێشەیەک چارەسەر دەکەن کە بۆ یەک زۆر گەورە دەبوو، هەر وەک تیمەکانی مرۆڤ.
In Kurdish villages, harawaz (هەرەوەز) is when neighbours come together to do a big job for one family, such as building a roof or bringing in the harvest. Each person takes a small part: some carry, some build, some cook. Nobody could finish alone, but together it is done in a day. A multi-agent system divides its work in the same way.
لە گوندەکانی کوردستاندا، هەرەوەز ئەوەیە کە دراوسێکان کۆ دەبنەوە بۆ ئەنجامدانی کارێکی گەورە بۆ خێزانێک، وەک دروستکردنی سەربان یان هێنانەوەی دروێنە. هەر کەسێک بەشێکی بچووک دەگرێتە ئەستۆ: هەندێک دەگوێزنەوە، هەندێک بنیات دەنێن، هەندێک چێشت لێدەنێن. کەس بە تەنیا نەیدەتوانی تەواوی بکات، بەڵام پێکەوە لە ڕۆژێکدا تەواو دەبێت. بە هەمان شێوە کارەکەی دابەش دەکات.
Where the analogy stops workingسنووری ئەم نموونەیە
Villagers can talk freely and see the whole job. Software agents often see only their neighbours and must follow fixed message rules.
خەڵکی گوند دەتوانن بە ئازادی قسە بکەن و هەموو کارەکە ببینن. زۆرجار تەنها دراوسێکانیان دەبینن و دەبێت پەیڕەوی یاسای جێگیری نامەناردن بکەن.
The course names these uses:
کۆرسەکە ئەم بەکارهێنانانە ناو دەبات:
- Modelling complex systems, for example simulating an ecosystem or an economy.
- Smart grids: managing how electricity is shared out efficiently.
- Computer networks: making data flow well, including (sharing out resources), (analysing how users interact), (watching for and answering threats) and routing (finding the best paths for traffic or data).
- مۆدێلکردنی سیستەمی ئاڵۆز، بۆ نموونە لاساییکردنەوەی ژینگەیەکی سروشتی یان ئابوورییەک.
- تۆڕی زیرەکی کارەبا: بەڕێوەبردنی دابەشکردنی کارەبا بە شێوەیەکی کارا.
- : باشترکردنی ڕۆیشتنی ، لەوانە (دابەشکردنی سەرچاوەکان)، (شیکردنەوەی کارلێکی بەکارهێنەران)، (چاودێریکردن و وەڵامدانەوەی هەڕەشەکان) و دیاریکردنی ڕێگە (routing، دۆزینەوەی باشترین ڕێگا بۆ هاتوچۆ یان ).
How many agents work together: flat and hierarchical structures, coordination, advantages and risks.
چۆن چەندین پێکەوە کار دەکەن: ، ، لایەنە باش و مەترسییەکانی.
Whole video: many AI agents working together in flat or hierarchical systems. Its examples are LLM-based software agents; the ideas apply to any multi-agent system.
هەموو ڤیدیۆکە: کە لە سیستەمی تەخت یان هەرەمیدا پێکەوە کار دەکەن. لە نموونەکانیدا لەسەر بنەمای کار دەکەن، بەڵام بیرۆکەکان بۆ هەر ڕاستن.
Multi-agent systemsسیستەمە فرەئەیجێنتەکان
What a multi-agent system must handleئەوەی سیستەمێکی فرەئەیجێنت دەبێت چارەسەری بکات
The course lists the main properties of a multi-agent system. They are best read as the things a designer must handle when many agents work together:
کۆرسەکە تایبەتمەندییە سەرەکییەکانی ڕیز دەکات. باشترە وەک ئەو شتانەی دیزاینەر دەبێت چارەسەریان بکات بخوێنرێنەوە، کاتێک زۆر پێکەوە کار دەکەن:
| Propertyتایبەتمەندی | Meaningواتا |
|---|---|
| 1. Coordination١. | Agents collaborate to reach their goals. It has five parts: هاوکاری دەکەن بۆ گەیشتن بە ئامانجەکانیان. پێنج بەشی هەیە: |
| 1.1 Consensus١.١ | The agents reach a common (global) agreement, for example on a strategy or a solution. دەگەنە ڕێککەوتنێکی گشتی، بۆ نموونە لەسەر پلانێک یان چارەسەرێک. |
| 1.2 Controllability١.٢ کۆنترۆڵکردن (Controllability) | Using rules (regulations) to guide the agents and move the system to a desired state.بەکارهێنانی یاسا بۆ ڕێنماییکردنی و بردنی سیستەمەکە بۆ دڵخواز. |
| 1.3 Synchronization١.٣ هاوکاتکردن (Synchronization) | Aligning every agent in time with the others, for example starting or stopping tasks together.ڕێکخستنی کاتی هەموو لەگەڵ ئەوانی تر، بۆ نموونە پێکەوە دەستپێکردن یان وەستاندنی ئەرکەکان. |
| 1.4 Connection١.٤ پەیوەستبوون (Connection) | Agents link to each other so that they can interact. بە یەکترەوە دەبەسترێن بۆ ئەوەی کارلێک بکەن. |
| 1.5 Formation١.٥ شێوەگرتن (Formation) | Agents organise themselves into a structure, for example drones flying in a fixed shape. خۆیان لە پێکهاتەیەکدا ڕێک دەخەن، بۆ نموونە درۆنەکان کە بە شێوەیەکی جێگیر دەفڕن. |
| 2. Communication٢. پەیوەندیکردن (Communication) | Agents exchange information; this is essential for teamwork. زانیاری ئاڵوگۆڕ دەکەن؛ ئەمە بۆ کاری تیمی پێویستە. |
| 3. Fault detection and isolation (FDI)٣. (FDI) | A faulty agent can “infect” the agents it works with. FDI finds faulty agents and separates them before they affect others. تێکچوو دەکرێت ئەو «تووش بکات» کە لەگەڵیان کار دەکات. FDI دەدۆزێتەوە و جیایان دەکاتەوە پێش ئەوەی کار لە ئەوانی تر بکەن. |
| 4. Task allocation٤. | Giving tasks to agents efficiently, taking cost and time into account.دابەشکردنی ئەرکەکان بەسەر بە شێوەیەکی کارا، بە لەبەرچاوگرتنی تێچوو و کات. |
| 5. Localization٥. سنوورداریی بینین (Localization) | Each agent has a limited view: it sees and interacts only with its neighbours, and decides from that.هەر بینینێکی سنوورداری هەیە: تەنها دراوسێکانی دەبینێت و کارلێکیان لەگەڵ دەکات و لەوەوە بڕیار دەدات. |
Multi-agent systemsسیستەمە فرەئەیجێنتەکان
How agents are organisedئەیجێنتەکان چۆن ڕێکدەخرێن
The way the agents of a multi-agent system are arranged and connected, for example flat (all equal), hierarchy (some are in charge of others), team or coalition.
ئەو شێوەیەیە کە ڕێک دەخرێن و بەیەکەوە دەبەسترێن، بۆ نموونە تەخت (هەموو یەکسانن)، پلەبەندی (هەندێکیان بەرپرسی ئەوانی ترن)، تیم یان .
Agent organisation is the way the agents of a system communicate and connect, that is, the structure they work in. The course names seven types:
ئەو شێوەیەیە کە سیستەمێک پەیوەندی دەکەن و بە یەکەوە دەبەسترێن، واتە ئەو پێکهاتەیەی تێیدا کار دەکەن. کۆرسەکە حەوت جۆر ناو دەبات:
| Organisationڕێکخستن | How it worksچۆن کار دەکات | Picture it as…وەک … بیهێنە بەرچاوت |
|---|---|---|
| 1. Flat١. تەخت (Flat) | All agents are equals.هەموو یەکسانن. | friends sharing files with each other directlyهاوڕێیان کە ڕاستەوخۆ فایل بە یەکتر دەدەن |
| 2. Hierarchy٢. پلەبەندی (Hierarchy) | Tree-like relations: some agents have authority over others.پەیوەندیی دارئاسا: هەندێک دەسەڵاتیان بەسەر ئەوانی تردا هەیە. | a school: director, teachers, class monitorsقوتابخانەیەک: بەڕێوەبەر، مامۆستایان، چاودێری پۆل |
| 3. Holon٣. | Agents are grouped into units called holons by shared features (for example, by how they differ from others); holons are then layered several times, and a holon acts as one agent at the level above. لە یەکەیەکدا بە ناوی کۆ دەکرێنەوە بەپێی تایبەتمەندیی هاوبەش (بۆ نموونە جیاوازییان لە ئەوانی تر)؛ پاشان چەند جار چین لەسەر چین دادەنرێن و هەر لە ئاستی سەرەوەدا وەک یەک کار دەکات. | cells → organs → a bodyخانەکان ← ئەندامەکان ← لەش |
| 4. Coalition٤. | Agents group together temporarily for one shared goal and split up when it is done. بۆ ماوەیەکی کاتی بۆ یەک ئامانجی هاوبەش کۆ دەبنەوە و کاتێک تەواو بوو جیا دەبنەوە. | neighbours who join to dig a well, then go homeدراوسێکان کە بۆ هەڵکەندنی بیرێک کۆ دەبنەوە و پاشان دەگەڕێنەوە ماڵ |
| 5. Team٥. تیم (Team) | Agents form a team with a team goal, which is different from their own goals. تیمێک پێکدەهێنن کە ئامانجی تیمی هەیە، جیاواز لە ئامانجەکانی خۆیان. | a football team: the goal is to win, not to score yourselfتیمێکی تۆپی پێ: ئامانج بردنەوەیە، نەک گۆڵکردن بە خۆت |
| 6. Matrix٦. ماتریکس (Matrix) | Every agent is managed by at least two head agents.هەر لانیکەم دوو سەرپەرشتیار بەڕێوەی دەبەن. | an engineer who reports to a project leader and a department headئەندازیارێک کە ڕاپۆرت دەداتە سەرۆکی پرۆژە و سەرۆکی بەش |
| 7. Congregation٧. | Agents in the same location gather to meet needs that none of them can meet alone.ئەو لە هەمان شوێنن کۆ دەبنەوە بۆ پڕکردنەوەی ئەو پێداویستییانەی هیچیان بە تەنیا ناتوانێت پڕیان بکاتەوە. | shops in one bazaar street that attract more customers togetherدوکانەکانی یەک شەقامی بازاڕ کە پێکەوە مشتەریی زیاتر ڕادەکێشن |
Exercisesڕاهێنانەکان
Name the agent type that best fits each system: (a) a light that switches on when it senses movement; (b) a robot cleaner that remembers which rooms it has already cleaned; (c) a map app that finds any route to a destination; (d) a map app that compares routes by time and fuel; (e) a music app that learns from the songs you skip.
باشترین جۆری بۆ هەر سیستەمێک ناو ببە: (أ) گڵۆپێک کە کاتێک هەست بە جووڵە دەکات دادەگیرسێت؛ (ب) پاککەرەوە کە لە بیریەتی کام ژوورەکانی پێشتر پاک کردووەتەوە؛ (ج) بەرنامەیەکی نەخشە کە هەر ڕێگەیەک بۆ شوێنێکی مەبەست دەدۆزێتەوە؛ (د) بەرنامەیەکی نەخشە کە ڕێگەکان بەپێی کات و سووتەمەنی بەراورد دەکات؛ (هـ) بەرنامەیەکی مۆسیقا کە لەو گۆرانییانەی تێیان دەپەڕێنیت فێر دەبێت.
Show answerوەڵامەکە پیشان بدە
| Systemسیستەم | Typeجۆر |
|---|---|
| (a) motion light(أ) گڵۆپی جووڵە | |
| (b) robot cleaner with memory(ب) پاککەرەوە لەگەڵ | |
| (c) any route(ج) هەر ڕێگەیەک | |
| (d) best route by time and fuel(د) باشترین ڕێگە بەپێی کات و سووتەمەنی | |
| (e) learns from skipped songs(هـ) لە گۆرانییە تێپەڕێنراوەکان فێر دەبێت |
A robot lawn mower senses two things: whether the grass under it is long or short, and whether there is an obstacle ahead. Write condition–action rules for a simple reflex mower with the actions CUT, FORWARD and TURN.
ماشێنێکی ڕۆبۆتیی گیاتاشین هەست بە دوو شت دەکات: ئایا گیای ژێری longـە یان short و ئایا obstacle (بەربەست) لە بەردەمیدایە. بنووسە بۆ ماشێنێکی کاردانەوەیی سادە بە کارەکانی CUT، FORWARD و TURN.
Show answerوەڵامەکە پیشان بدە
function MOWER-AGENT([grass, obstacle]) returns an action
if obstacle = yes then return TURN
else if grass = long then return CUT
else return FORWARDThe order matters: the obstacle rule comes first, so the mower never drives into a wall while cutting. Like the vacuum agent, it can get stuck if the obstacle is everywhere; randomising the turn direction helps.
ڕیزبەندی گرنگە: یاسای بەربەست یەکەمە، بۆیە ماشێنەکە لە کاتی تاشیندا هەرگیز بەر دیوار ناکەوێت. وەک گسکەکە، ئەگەر بەربەست لە هەموو لایەک بێت دەکرێت بچەقێت؛ هەڕەمەکیکردنی ئاڕاستەی سووڕانەوە یارمەتی دەدات.
In the route program, change the risk weight from 50 to 10 (risk now matters less). Which route is chosen, and why?
لە ڕێگەکاندا، کێشی مەترسی لە 50ەوە بگۆڕە بۆ 10 (ئێستا مەترسی کەمتر گرنگە). کام ڕێگە هەڵدەبژێردرێت و بۆچی؟
Show answerوەڵامەکە پیشان بدە
# Three routes to the same place: a goal-based agent sees no difference.
routes = {
'main road': {'minutes': 20, 'risk': 0.30},
'ring road': {'minutes': 25, 'risk': 0.05},
'old bazaar road': {'minutes': 35, 'risk': 0.01},
}
def utility(outcome):
# higher is better: every minute costs 1 point, risk costs less now
return -outcome['minutes'] - 10 * outcome['risk']
best_route = None
best_value = float('-inf') # smaller than any real number
for name, outcome in routes.items():
value = utility(outcome)
print(f"{name:16} utility = {value}")
if value > best_value:
best_route, best_value = name, value
print('Chosen route:', best_route)main road utility = -23.0 ring road utility = -25.5 old bazaar road utility = -35.1 Chosen route: main road
Now the main road wins: it is the fastest, and its higher risk costs only 3 points instead of 15. The utility function is the agent's priorities: change it and the behaviour changes.
ئێستا ڕێگای سەرەکی دەباتەوە: خێراترینە و مەترسییە زیاترەکەی تەنها 3 خاڵ دەکات لەبری 15. خودی ئەولەویەتەکانی : بیگۆڕە و ڕەفتارەکە دەگۆڕێت.
Name the agent organisation: (a) a central computer gives jobs to three group leaders, and each leader gives jobs to five drones; (b) every drone in a farm is checked by both a safety agent and a battery agent; (c) computers that share files directly, with no boss.
ناو ببە: (أ) ناوەندی کار دەدات بە سێ سەرۆک گروپ و هەر سەرۆکێک کار دەدات بە پێنج درۆن؛ (ب) هەموو درۆنێک لە کێڵگەیەکدا لەلایەن سەلامەتی و پاترییەوە پشکنینی بۆ دەکرێت؛ (ج) کە ڕاستەوخۆ فایل ئاڵوگۆڕ دەکەن، بەبێ سەرۆک.
Show answerوەڵامەکە پیشان بدە
(a) Hierarchy (a tree of authority). (b) Matrix (each agent has at least two head agents). (c) Flat (all equal).
(أ) پلەبەندی (دارێکی دەسەڵات). (ب) ماتریکس (هەر لانیکەم دوو سەرپەرشتیاری هەیە). (ج) تەخت (هەموو یەکسانن).
Summary and reviewپوختە و پێداچوونەوە
- Simple reflex agents map the current percept to an action with condition–action rules. They need a fully observable world and can loop for ever.
- Model-based reflex agents add an internal state and a transition model: how the world evolves and what my actions do.
- Goal-based agents predict “what it will be like if I do action A” and compare it with goals; this leads to search.
- Utility-based agents score outcomes with a utility function and pick the best, not just any goal state.
- Learning agents: performance standard → critic → learning element → performance element, with a problem generator that explores.
- Multi-agent systems split a complex task among agents; they must handle coordination, communication, faults, task allocation and limited views, and are organised as flat, hierarchy, holon, coalition, team, matrix or congregation.
- بە ئێستا دەگۆڕن بۆ کار. پێویستیان بە جیهانێکی تەواو بینراوە و دەکرێت بۆ هەمیشە بخولێنەوە.
- و زیاد دەکەن: جیهان چۆن دەگۆڕێت و کارەکانم چی دەکەن.
- پێشبینیی «ئەگەر کاری A بکەم، جیهان چۆن دەبێت» دەکەن و لەگەڵ ئامانجەکاندا بەراوردی دەکەن؛ ئەمە بەرەو گەڕان دەبات.
- بە نمرە دەدەن بە ئەنجامەکان و باشترینیان هەڵدەبژێرن، نەک هەر .
- : ← ← ← ، لەگەڵ کە شتی نوێ تاقی دەکاتەوە.
- ئەرکێکی ئاڵۆز بەسەر دابەش دەکەن؛ دەبێت ، پەیوەندیکردن، تێکچوون، و بینینی سنووردار چارەسەر بکەن و بە شێوەی تەخت، پلەبەندی، ، ، تیم، ماتریکس یان ڕێکدەخرێن.
What does “What the world is like now” mean in the diagrams?«What the world is like now» لە هێڵکارییەکاندا واتای چییە؟
The agent's snapshot of its surroundings at this moment, made from its sensors (and, in a model-based agent, from its internal state too).
گرتەی لە دەوروبەری لەم ساتەدا، کە لە دروست دەکرێت (و لە لە ).
Why can a simple reflex agent get stuck in an infinite loop?بۆچی ئەیجێنتی کاردانەوەی سادە دەکرێت لە خولێکی بێکۆتادا بچەقێت؟
It has no memory, so in the same percept it always does the same thing. If the percept hides important information, it can repeat a useless action for ever. Randomising helps.
هیچ نییە، بۆیە بۆ هەمان هەمیشە هەمان کار دەکات. ئەگەر زانیاریی گرنگ بشارێتەوە، دەکرێت کارێکی بێسوود بۆ هەمیشە دووبارە بکاتەوە. هەڕەمەکیکردن یارمەتی دەدات.
What is the difference between a goal and a utility?جیاوازیی نێوان ئامانج و سوود چییە؟
A goal is reached or not (happy or unhappy). Utility is a number that says how good a state is, so it can rank many good outcomes and trade off conflicting aims.
ئامانج یان دەگەیەنرێت یان نا (دڵخۆش یان نادڵخۆش). ژمارەیەکە دەڵێت چەند باشە، بۆیە دەتوانێت زۆر ئەنجامی باش ڕیز بکات و لە نێوان ئامانجە دژبەیەکەکاندا هاوسەنگی بکات.
What does the problem generator add to a learning agent?دروستکەری کێشە چی زیاد دەکات بۆ ئەیجێنتی فێرخواز؟
Exploration: it suggests actions that may not look best now but give new experience to learn from.
تاقیکردنەوەی شتی نوێ: کارێک پێشنیار دەکات کە لەوانەیە ئێستا باشترین دەرنەکەوێت بەڵام ئەزموونی نوێ دەدات بۆ فێربوون.
What is the difference between a coalition and a team?جیاوازیی نێوان هاوپەیمانێتی و تیم چییە؟
A coalition is a temporary group for one shared goal and splits up afterwards. A team defines a team goal that differs from the members' own goals.
گروپێکی کاتییە بۆ یەک ئامانجی هاوبەش و دوای ئەوە جیا دەبێتەوە. تیم ئامانجێکی تیمی دادەنێت کە جیاوازە لە ئامانجەکانی ئەندامەکانی خۆیان.
Videoڤیدیۆ
Watch a videoسەیری ڤیدیۆیەک بکە
A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.
The five agent types (simple reflex, model-based, goal-based, utility-based and learning agents) with simple examples.
پێنج جۆرەکەی : ، ، ، و ، لەگەڵ نموونەی سادە.
Whole video: the five types of agent, from simple reflex to learning agents.
هەموو ڤیدیۆکە: پێنج جۆرەکەی ، لە تا .
Lesson complete!وانەکە تەواو بوو!
Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.
Key termsزاراوە سەرەکییەکان
The Python You Need for the AI Labsئەو Pythonـەی بۆ تاقیگەکانی ژیریی دەستکرد پێویستە
Related lecturesوانە پەیوەندیدارەکان
References and further readingسەرچاوەکان و خوێندنەوەی زیاتر
This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.