Artificial Intelligence Assignment
Artificial Intelligence Assignment
MAC-1-8590-2/2018
KEMU main campus
They have a learning ability that enables them to learn even as tasks are carried out.
They can interact with other entities such as agents, humans, and systems.
New rules can be accommodated by intelligent agents incrementally.
They exhibit goal-oriented habits.
They are knowledge-based. They use knowledge regarding communications, processes, and entities.
c) Explain why psychology may be regarded as the foundation of artificial intelligence (4mks)
Psychology is one of the parent elements of artificial intelligence or we can also say that it
is the main source for artificial intelligence. Since psychology is the study of human brain and
its nature and AI is the branch which deals with the intelligence in machine, for
understanding the intelligence of a machine we compare with human intelligence because
AI means the intelligence shown by a machine like a human being.
i)Completeness
If an algorithm is complete,
it means that if at least one solution exists then the algorithm is guaranteed find a solution
in a finite amount of time.
ii) Optimality
If a search algorithm is optimal, then when it finds a solution it finds the best solution.
iii) Cost
Its cost effective when the algorithm uses less computing power to find the best solution
2.Can’t possess human capabilities Lack of creative responses that human experts are
capable of
3.Can’t produce correct result from less amount of knowledge/Errors in the knowledge
base can lead to wrong decision
Hill climbing search algorithm is simply a loop that continuously moves in the
direction of increasing value. It stops when it reaches a “peak” where no neighbour
has higher value. This algorithm is considered to be one of the simplest procedures
for implementing heuristic search. The hill climbing comes from that idea if you
are trying to find the top of the hill and you go up direction from where ever you
are. This heuristic combines the advantages of both depth first and breadth first
searches into a single method.
The name hill climbing is derived from simulating the situation of a person
climbing the hill. The person will try to move forward in the direction of at the top
of the hill. His movement stops when it reaches at the peak of hill and no peak has
higher value of heuristic function than this. Hill climbing uses knowledge about the
local terrain, providing a very useful and effective heuristic for eliminating much
of the unproductive search space. It is a branch by a local evaluation function. The
hill climbing is a variant of generate and test in which direction the search should
proceed. At each point in the search path, a successor node that appears to reach
for exploration.
Algorithm:
Step 1: Evaluate the starting state. If it is a goal state then stop and return success.
Step 2: Else, continue with the starting state as considering it as a current state.
Step 3: Continue step-4 until a solution is found i.e. until there are no new states
left to be applied in the current state.
Step 4:
a) Select a state that has not been yet applied to the current state and apply it to
produce a new state.
b) Procedure to evaluate a new state.
i. If the current state is a goal state, then stop and return success.
ii. If it is better than the current state, then make it current state and proceed
further.
iii. If it is not better than the current state, then continue in the loop until a
solution is found.
Step 5: Exit.
Advantages:
Hill climbing technique is useful in job shop scheduling, automatic
programming, circuit designing, and vehicle routing and portfolio
management.
It is also helpful to solve pure optimization problems where the objective is to
find the best state according to the objective function.
It requires much less conditions than other search techniques.
Disadvantages:
The one challenge that remains on hill climbing search is whether this hill is the
highest hill possible. Unfortunately without further extensive exploration, this
question cannot be answered. This technique works but as it uses local information
that’s why it can be fooled. The algorithm doesn’t maintain a search tree, so the
current node data structure need only record the state and its objective function
value. It assumes that local improvement will lead to global improvement.