You are on page 1of 3

COM/008/17

JOAN NANZALA

COMP 325; ARTIFICIAL INTELLIGENCE PROGRAMMING ASSIGNMENT 1

1. T1
i. Artificial intelligence is a field of study that seeks to explain and emulate intelligent behaviours in terms of
computational process. It is concerned with the automation of intelligent behavior acting and thinking
rationally and like humans.
ii. Real life applications of artificial intelligence include:
(a) Medicine; used in image guided surgery, image analysis and enhancement.
(b) Transportation; used in autonomous vehicle control and pedestrian control.
(c) Bioinformatics; used in gene expression, data analysis, prediction of protein structure.
(d) Autonomous planning scheduling; used in autonomous rovers, telescope scheduling and analysis of
data.
(e) Used in gaming especially in video games
(f) Used in text classification and document sorting.
2. T2
i. Rational agent is an agent which acts in a way that is expected to maximize the performance
measure given the evidence provided by what it perceived and whatever built in knowledge it
has.
ii. Simple reflex agents are those that select an action based on the current state only, ignoring
history of perceptions. They only work if the environment is fully observable or the correct action
is based on what is perceived currently.
iii. Goal based agents combine the provided goal information with the environment model to choose
the action which achieve the goal. It is an improvement of over model based and is used in cases
where knowing the current state of environment is not enough.
iv. Utility based agent is that which will choose the action that maximizes the expected utility. It is an
improvement over goal based agents when achieving the desired goal is not enough especially
when considering cost.
v. Model based agents keep track of partially observable environment. They have an internal state
depending on perception history, the environment is modelled based on how it evolves
independently from the agent and how the agent actions affect the world.
vi. PEAS stands for performance, environment, actuators and sensors. For a part picking robot,
Performance; percentage of parts in the correct bins

Environment; conveyor belts with parts and bins

Actuators; jointed arms and hands

Sensors; camera, joint angle sensors

i. Problem solving agent is an agent that encompasses a number of techniques like a tree, B-tree,
heuristic algorithm to solve a problem. It is a result driven agent and always focuses on satisfying
the goal
ii. Planning agent is an agent which responds to a goal through forming plans to achieve them and
then enacting those plans through interactions within a domain.
3. T3

i. Breadth first search algorithm searches breadthwise starting from the root node expandingto all
successor nodes at the current level before moving to the next level. It uses the FIFO queue data
structure.it provides a solution with minimal steps if the solution exists but it requires a lot of
memory as each level is saved and it takes a lot of time if the solution is far from the root node.
ii. Depth first search is a recursive algorithm for traversing a tree or graph. It starts from the root
node and follows each path to its greatest depth before moving to the next path. It uses stack
data structure for implementation. It uses less memory and less time to find a solution but
recursion may lead to no guarantee of reaching the solution and may lead to an infinite loop.
iii. Shortest path=Frankfurt-Wurzburg-Numberg-Munchen
217+103+167=487km
487KM
vii. Ways of evaluating the performance of search strategy include;
a) Completeness: is the strategy guaranteed to finda solution if there is one.
b) Time complexity: how long does it take to find a solution.
c) Space complexity: how much memory does it take.
d) Optimality: how does the strategy find the highest quality solution when there are
several different solutions.

4. T4
i. An expert system is an intelligent computer program that uses knowledge and reasoning
procedures to solve difficult problems that need certain expertise to be solved. It was build to
replace and help an expert.
ii. The architecture has the following;
a) Knowledge base;it stores facts and rules, it does not store information like texts,
numbers and logical values. It stores concepts and dedicated procedures that need to be
done to solve a problem.methods of storing knowledge in database are predicate
calculus,mainframe and semantic network.
b) Knowledge acquisition; Is a process of gathering and transferring problem solving
expertise from all source of knowledge in a computer programme, this information is
used to develop and expand the knowledge base.
c) Inference engine;Is a computer program that drives to the conclusion and provide the
reasoning methodology for information stored in knowledge base. It also provide
guideline on using the knowledge in expert system.it uses two strategies that isforward
chaining and backward chaining.
d) Explanation facility; This component acts to help the user understand how an expert
sytem reaches a certain decision of the problem to be solved.
e) User interface; It enables the user to query the system input information and receive
advice.
f) Working memory; it contains facts of problems that are happening during consultation
process with the expert system.
5. T5
i. These two are strategies used in the inference engine.

Backward chaining starts from the decision and moves backward to obtain supporting facts for the
decisions made. If there are no matching facts that supports the decision, the decision will be
rejected and another will be chosen. the process continues until a suitable decision and the facts
that support it are obtained.

Forward chaining starts reasoning from facts provided and moves on until it achieves decision, it is
guided by the facts in memory space and premises which it can obtain tem from. Engine tries to
match the required premise(if) for all rules in the knowledge database with the facts given which
are in its memory, if there are several rules that match the solving procedures will be used, it will
do this repeatedly.
ii. Predicate logic is a form of logic that contains variables (predicate variables) and may be true or
false depending on the values of these variables. It is an extension of propositional logic while
propositional logic is a form of logic where all statements are made by declarative statements
which are either true or false.
iii.
a) First in first serve; The rule applied will be the first rule that is matched.
b) Last in first serve; The rule applied will be the last rule that is matched.
c) Prioritisation; The rule to apply will be based on priorities set on rules, with priority
information usually provided by an expert or knowledge engineer.
d) Specificity; The rule applied is usually the most specific rule, or the rule that matches the
most facts. This strategy cannot be used if the rules are equal in specificity.
e) Recency; The rule applied is the rule that matches the most recently derived facts
f) Fired rules; Involves not applying rules that have already beedn used .
g) Line of reasoning; Involves firing all ruels with a separate line of reasoning.

6. T6
i. Supervised algorithm is a type of machine learning in which machines are trained using labelled
training data and on basis of that data, machines predict the output. The aim is to find a mapping
function to map the input variable(x) with the output variable(y)
Unsupervised algorithm is a type of machine learning in which models are trained using unlabeled
dataset and are allowed to act on that data without any supervision. The goal is to find the
underlying structure of dataset, group that data according to similarities and represent that
dataset in a compressed format.
ii. Supervised algorithm models are trained using labelled data ,the models predict the output and
the take direct feedback to check if its predicting correct output or not. For example;
if we have an image of different types of fruits. The task of our supervised learning
model is to identify the fruits and classify them accordingly. So to identify the image in supervised
learning, we will give the input data as well as output for that, which means we will train the
model by the shape, size, color, and taste of each fruit. Once the training is completed, we will test
the model by giving the new set of fruit. The model will identify the fruit and predict the output
using a suitable algorithm.

Unsupervised algorithm models are trained using unlabeled data,they find the hidden patterns in
data and does not take feedback. For example;
If the unsupervised learning algorithm is given an input dataset containing images of
different types of cats and dogs. The algorithm is never trained upon the given dataset, which
means it does not have any idea about the features of the dataset. The task of the unsupervised
learning algorithm is to identify the image features on their own. Unsupervised learning algorithm
will perform this task by clustering the image dataset into the groups according to similarities
between images.
iii. Dataset is a collection of data in which data is arranged in some order. It contains any data from a
series of an array to a database.
iv. Training set is a subset to train a model, dataset of examples used during the learning process and
is used to fit parameters.
v. Test set is a subset to test a trained model,is a dataset used to provide an unbiased evaluation of
final model fit on the training dataset.
vi. Cross validationis a resampling procedure used to evaluate machine learning models on a limited
data sample.
vii. Confusion matrix is a table that is often used to describe the performance of a classification model
or a classifier on a set of test data for which the true values are known.

You might also like