0% found this document useful (0 votes)
8 views

Kudzai Assignment AI

Assignment
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Kudzai Assignment AI

Assignment
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Name : Kudzai C Pemhiwa

Reg Number : R229417K


Program : HCS
Title : Artificial Intelligent Assignment

1.Major disadvantages of artificial intelligence as compared to natural intelligence

 It has limited flexibility as they designed for specific tasks and lack flexibility of human
intelligence
 It lacks emotional ability as part of intelligence
 Also lacks creativity and spontaneity since ai is based on programmed algorithms

2.The algorithm of a rational agent is as follows :

a. Def agent(percept):
State = update_state(state,percept)
Rule = rule_match(state, rules)
Action = rule.action
Return action
Def update state(state, percept):
State = new state
Def rule_match(state, rules):
For rule in rules:
If rule.matches(state):
Return rule
3.The PEAS of a robot football player are as follows:
(1) Performance – defines how the success or effectiveness of the soccer robot player is
evaluated.:
 Number of goals scored
 Number of successful passes
 Not fouling other players
 Defending the goal from opponents if it is defender
(2) Environment -external conditions and factors the robot interacts with:
 Soccer field
 The ball
 Other players
 The environment is dynamic and keeps changing during the game
(3) Actuators -these are the physical components or mechanisms through which the robot
soccer players takes actions in its environment:
 Wheels or legs for locomotion and controlling the ball
 Arms to aid in balances and hand-offs
 Sensors to detect and interact with the other players
(4) Sensors -they allow the robot soccer player to perceive and gather information about its
environment:
 Cameras or vision sensors to track the ball and detect the position of other
players
 Distance sensors to avoid collision with other players
 Audio input to perceive the referee’s calls and help in engaged communication
with other players

The PAGE aspects associated with the Agent

1. Perception- the robot soccer player perceives the environment through


its sensors. It gathers information about the position of the other
players, the position of the ball, and the overall state of the game.
2. Action -on the basis of its perception the robot soccer player decides
on the appropriate actions to take.These actions include moving
towards the ball, passing the goal and scoring.
3. Goal -the goal of the robot soccer player is to contribute to the teams
success by scoring goals and defending the goal.
4. Environment -the environment of the robot soccer player is the soccer
field .It includes the ball,players ,boundaries of the field .

4 The missionary and cannibals’ problems.

a) A state representation refers to the way in which the current state of a system or environment is
represented in a form that can be processed and understood by an intelligent agent.For example
in our scenario we represent missionaries by M and cannibals by C and boat B,the state could be
1 side has {M,C,B }and the other side {M,M,C,C}
b) Initial state :Side1{M,M,M,C,C,C,B}, Side2{}

Goal state :Side1{}, Side2{M,M,M,C,C,C,B}

1) The successor function :

i. A set of missionaries or cannibals (call them Move) can be moved from Side 1 to Side2
ii. IF: • The boat is on Side1
iii. The set Move consists of 1 or 2 people that are on Side1.
iv. The number of missionaries in the set formed by subtracting Move from Side1 is 0 or it is greater
than or equal to the number of cannibals.
v. The number of missionaries in the set formed by adding Move to Side2 is 0 or it is greater than or
equal to the number of cannibals
c) The cost function
d) Each move has 1 unit cost

e) The total number of reachable states is 16

5.Variables :

 C# programmer
 C# programmer
 Flash Designer
 Flash Designer
 Database admin
 Photoshop Guru
 Systems Engineer

Domains:

For :

C# programmers{Martha ,Mpilo ,Butho}

Flash Designer {Martha,John,Zinhle,Marry,Tino}

Database admin {Mpilo}

Photoshop guru{John,Mary,Tino}

Systems Engineer{Zinhle ,Butho}

Constraints:

 Each role must be assigned to exactly one person.


 A person can take on multiple roles if they have the abilities for the roles
 Mandla knows C# ,so one of the C# Programmer roles must be assigned to him
 Mandla only has funds to hire 3 people ,so the total number of assigned roles must be 3.

5 b)Domains for the two remaining positions after constraint propagation:

The remaining positions are:Systems Engineer and Photoshop Guru

Domains: Photoshop Guru{John ,Mary, Tino}

Systems Engineer{Zinhle ,Butho}

5c)Variables :

Mandla’s work schedule

Zinhle’s work schedule

Mary’s work schedule

Butho’s work schedule

 Value Domains: Each variable can take on the values: Monday 9-11 AM, Monday 11 AM-1 PM,
Monday 1-3 PM, Monday 3-5 PM, Tuesday 9-11 AM, Tuesday 11 AM-1 PM, Tuesday 1-3 PM, Tuesday
3-5 PM, Wednesday 9-11 AM, Wednesday 11 AM-1 PM, Wednesday 1-3 PM, Wednesday 3-5 PM,
Thursday 9-11 AM, Thursday 11 AM-1 PM, Thursday 1-3 PM, Thursday 3-5 PM, Friday 9-11 AM,
Friday 11 AM-1 PM, Friday 1-3 PM, Friday 3-5 PM

Constraints:

 Each person can work a maximum of 20 hours over the course of the week.
 A work session by a single person on a particular machine can last no fewer than two
hours.
 Mandla cannot work from 12-4 PM on Tuesday and Thursday.
 Zinhle can't work from 9 AM-12 PM on Monday, Wednesday, and Friday.
 Butho can only work between 12-2 PM every day.
 Mary can only work on Thursday and Friday
 They only have access to two machines of the requisite platform between 9 AM and 5 PM every
day.

The indicated constraints impact the domains for all variables by restricting the available time slots for
each person. For example, Mandla's work schedule cannot include the time slots from 12-4 PM on
Tuesday and Thursday. Similarly, Zinhle's work schedule cannot include the time slots from 9 AM-12 PM
on Monday, Wednesday, and Friday. These constraints reduce the possible values in the domains of the
respective variables.

6a)Variables:

Class 1: Intro to Programming

Class 2: Intro to Artificial Intelligence

Class 3: Natural Language Processing


Class 4: Computer Vision

Class 5: Machine Learning

Domains:

Class 1: Professor C

Class 2: Professor B &C

Class 3: Professor A, B &C

Class 4: Professor A, B &C

Class 5: Professor B &C

Constraints:

Each professor can only teach one class at a time.

Class 3 and Class 4 can only be taught by Professor A.

Class 2, Class 3, Class 4, and Class 5 can be taught by Professor B.

Class 1, Class 2, Class 3, Class 4, and Class 5 can be taught by Professor C.

6b)

6c) Domains after running arc-consistency:

After running arc-consistency, the domains of the variables would be as follows:

Class 1: Professor C

Class 2: Professor B
Class 3: Professor A, , Professor C

Class 4: Professor A, Professor C

Class 5: Professor B, Professor C

d) One possible solution:

A possible solution to this CSP could be:

Class 1: Professor C

Class 2: Professor B

Class 3: Professor C

Class 4: Professor A

Class 5: Professor B

This solution satisfies all the constraints, with each professor teaching only one class at a time.

7a) Major components of an ES (Expert System):

Knowledge Base: It contains the domain-specific knowledge and rules the expert system uses to make
decisions or give recommendations.

Inference Engine: It is responsible for reasoning and making inferences based on the knowledge stored in
the knowledge base. The inference engine applies the rules and algorithms to draw conclusions or solve
problems. It uses techniques like forward chaining, backward chaining, to perform reasoning.

User Interface: It provides a means for users to interact with the expert system. The user interface can be
text-based, graphical, or even natural language-based, allowing users to input queries, receive
explanations, and provide feedback.

Explanation Facility: It enables the expert system to explain its reasoning or decision-making process to
the user. This helps users understand why a particular recommendation or conclusion was made by the
system.

Knowledge Acquisition System: It facilitates the process of acquiring and updating the knowledge base.
The knowledge acquisition system can include tools and methods for capturing knowledge from domain
experts, organizing and structuring the knowledge, and integrating it into the expert system

7b) Many people say they will not trust a medical diagnosis expert systems because:

 Lack of Human Judgment: Medical diagnosis often requires complex decision-making and the
consideration of various factors, including patient history, symptoms, and physical examination.
People may feel that an expert system lacks the human judgment and intuition that a human
doctor possesses, leading to concerns about the accuracy and reliability of the system's
diagnoses.
 Limited Scope and Adaptability: Expert systems are typically designed to address specific
domains or medical conditions. People may worry that the system may not cover all possible
scenarios or rare conditions, leading to potential misdiagnoses or overlooking critical
information. Additionally, expert systems may struggle to adapt to new medical research,
advancements, or emerging diseases, which can further erode trust.
 Liability and Legal Concerns: In the medical field, misdiagnosis or errors can have serious
consequences, including harm to patients or legal implications. People may be hesitant to trust
an expert system due to concerns about potential liability issues if something goes wrong. They
may feel more comfortable relying on human doctors who can be held accountable for their
decisions.

8)a) The number of nodes expanded (in the worst case) by each of the following search techniques when
searching a tree with branching factor b to find a goal at a depth of d:

i. Breadth-first search: In the worst case, breadth-first search expands all the nodes at each level before
moving to the next level. So, the number of nodes expanded can be calculated as the sum of nodes at
each level up to the goal depth. Therefore, the number of nodes expanded in the worst case for breadth-
first search is:

1 + b + b^2 + b^3 + ... + b^d

ii. Depth-first search: In the worst case, depth-first search can expand all the nodes along a single path
from the root to the goal depth before backtracking. So, the number of nodes expanded can be
calculated as the number of nodes along the deepest path. Therefore, the number of nodes expanded in
the worst case for depth-first search is:

b^d

iii. Depth-limited search (limit = d): Depth-limited search is similar to depth-first search, but it limits the
depth of exploration to a specific level (d). So, the number of nodes expanded in the worst case for
depth-limited search is the same as depth-first search:

b^d

iv. Iterative deepening depth-first search: Iterative deepening depth-first search performs a series of
depth-limited searches with increasing depth limits. In the worst case, it expands all the nodes at each
depth level up to the goal depth. So, the number of nodes expanded can be calculated as the sum of
nodes expanded at each depth level:

b^0 + b^1 + b^2 + ... + b^d

b) When augmenting A* to include the provision for deleting revisited states, a complication regarding
completeness arises. The provision for deleting revisited states can lead to the removal of states from
the search space, which can potentially result in the loss of the optimal solution. This means that the
augmented A* algorithm may not guarantee completeness, as it may fail to find the optimal solution in
certain cases. The removal of revisited states can introduce a bias towards exploring certain paths and
neglecting others, potentially leading to suboptimal or incomplete solutions
i. 9i)

Iteration Node expanded Priority queue at end of this iteration


0 S = 0 + 6 = 6 (i.e., S = g(S)+h(S) = f(S))
1 S (6) A = 2 + 4 = 6; B = 3+ 4 = 7
2 A (6) B=7; C = 5 + 4 = 9;
3 B (7) D = 6+3.5 =9.5; C = 4 +4 = 8
4 C (8) D = 8.5; E = 7 + 1 = 8
5 D (8.5) E = 8; F = 8
6 E (8) F = 8; G = 9
7 F (8) G=8
8 G (8)

ii. Path followed :S,B,C,D,F,G


10.

10a) Tom has fur,he is a mammal,he is chased by dogs, he eats fish.

b) In a semantic network, we can handle exceptions like “Tom doesn’t eat fish” by adding specific
information to the node representing Tom. We could add a relationship from Tom to Fish with
the label “does not eat”. This would override the general rule that “Cats eat Fish”.

Slots Filters

Animal Dog

Chase Cats

Have Fur

Kingdom Mammal

Slots Filters
Animal Cat

Eat Fish

Have Fur

Kingdom Mammal

Factors include:

a. Complexity of knowledge: Semantic networks are simpler and more intuitive,


making them suitable for representing straightforward relationships between
objects. Frame-based representations, on the other hand, can handle more
complex knowledge as they allow nodes to have structures.
b. Default knowledge: Frame-based systems can represent related knowledge
about a narrow subject that has much default knowledge3. If your system
needs to handle a lot of default or assumed knowledge, frames might be a
better choice.
c. Inference requirements: the type of inferences supported by semantic
networks is very restricted, which makes it easy to understand what’s going
on. Frame-based systems, on the other hand, can support more complex
inferences but at the cost of predictability.

You might also like