You are on page 1of 6

Rift Valley University

Adama campus

Computer science department

Artificial intelligence assignment

1.) Briefly explain the following concepts


a.) Artificial intelligence problems
b.) Artificial intelligence techniques
c.) Define state space search and provide some examples

State space search is a process used in the field of computer science, including artificial intelligence (AI),
in which successive configurations or states of an instance are considered, with the intention of finding a
goal state with a desired property.

State space search is a process used in the field of computer science, including artificial intelligence (AI),
in which ... According to Poole and Mackworth, the following are uninformed state-space search
methods, meaning that they do not ... Poole and Mackworth cite the following examples as informed
search algorithms:.

State space search is a process used in the field of computer science, including artificial
intelligence (AI), in which successive configurations or states of an instance are considered, with
the intention of finding a goal state with a desired property.

Problems are often modelled as a state space, a set of states that a problem can be in. The set of
states forms a graph where two states are connected if there is an operation that can be
performed to transform the first state into the second.

State space search often differs from traditional computer science search methods because the
state space is implicit: the typical state space graph is much too large to generate and store in
memory. Instead, nodes are generated as they are explored, and typically discarded thereafter. A
solution to a combinatorial search instance may consist of the goal state itself, or of a path from
some initial state to the goal state.

Examples of State-space search algorithms


Uninformed Search

According to Poole and Mackworth, the following are uninformed state-space search methods,
meaning that they do not know information about the goal's location.

 Traditional depth-first search


 Breadth-first search
 Iterative deepening
 Lowest-cost-first search

Heuristic Search

Some algorithms take into account information about the goal node's location in the form of a
heuristic function Poole and Mackworth cite the following examples as informed search
algorithms:

 Heuristic depth-first search


 Greedy best-first search
 A* search

2.) Briefly explain the concept of artificial intelligence and its application in the industry with
examples
3.) Explain the about breadth and depth first search strategies
Depth First Search (DFS) searches deeper into the problem space. Breadth-first search always
generates successor of the deepest unexpanded node. It uses last-in first-out stack for keeping the
unexpanded nodes. More commonly, depth-first search is implemented recursively, with the
recursion stack taking the place of an explicit node stack.
Breadth First Search (BFS) searches breadth-wise in the problem space. Breadth-First search is like
traversing a tree where each node is a state which may a be a potential candidate for solution.
It expands nodes from the root of the tree and then generates one level of the tree at a time until a
solution is found. It is very easily implemented by maintaining a queue of nodes. Initially the queue
contains just the root. In each iteration, node at the head of the queue is removed and then
expanded. The generated child nodes are then added to the tail of the queue.
a.) What is the difference between them
Breadth-first search (BFS) is an algorithm for traversing or searching tree or graph data
structures. ... It uses the opposite strategy as depth-first search, which instead explores the
highest-depth nodes first before being forced to backtrack and expand shallower nodes.
b.) Why we need them?
c.) Show with examples
4.) Discus about the following artificial intelligence concepts with examples
a.) Cognitive model
b.) Law of thoughts
c.) Natural languages processing
d.) Automated reasoning
5.) Briefly explain the following artificial intelligence concepts with real example
a.) Machine learning and why we need machine learning and how to use this techniques in
research industry
b.) Expert system and provide logical expert system example and also how to develop expert
system in specific area of knowledge
6.) Beefy explain types of agents and types of environment in artificial intelligence and also compare
their difference both agents and environments using tables

An AI system is composed of an agent and its environment.


...
Agents can be grouped into four classes based on their degree of perceived intelligence and
capability:

 Simple Reflex Agents.


 Model-Based Reflex Agents.
 Goal-Based Agents.
 Utility-Based Agents.

Agents in Artificial Intelligence. Artificial intelligence is defined as study of rational agents. An agent is
anything that can be viewed as: perceiving its environment through sensors and. acting upon that
environment through actuators.

Artificial Intelligence/AI Agents and their Environments. ... Action done when the agent, by doing
something, changes the environment. For example, if a robot uses its camera to determine that there is
a wall in front of it, then it is using perception. In this example, the camera is a "sensor."

An agent is anything which can perceive its environment through sensors and acts upon that
environment through actuators. The agent analyses the complete history of its percepts using an
agent function (or an agent program), that maps the sequence of percepts to an action.
Assumption: every agent can perceive its own actions

Now let us consider a simple case of a vacuum cleaning agent. There are 2 tiles: Tile A and Tile
B. The pile of dust could be on any, on both or on neither of the two tiles. Your vacuum cleaner
is on one of the tiles, and it can sense and clean only one tile at a time. The cleaner could move
left, move right, or clean the tile it rests on.

The vacuum cleaner with two locations

The percept sequence consist of the history of percepts the vacuum cleaner senses, and the agent
function maps each percept of the sequence to an action. The agent function for this vacuum
cleaning agent is:

Agent function = {([A: Clean], Right), ([A: Dirty], Clean), ([B: Clean], Left), ([B: Dirty], Clean),
([A: Clean, B: Clean], Stop), ([A: Clean, B: Dirty], Clean), …}

We need a metric or a rule to measure the performance of the agent in the environment. For
example, in this case, we measure the performance of the agent as the number of desirable
actions performed by the agent. If we had designed another agent with a different agent function
than the one mentioned above, it might perform undesirable actions, and so its performance
measure would be low.

Now we have a general idea of what an agent is, let us discuss on the nature of the environment
on which an agent acts.

Nature of environment

We need to analyze the task environment, which are the “problems” for which the agents are the
“solutions”. Some of the common features of the environment needs to be understood, for they
determine the appropriate agent design required.

7.) Discuss the following concepts


a.) Greedy search
Greedy search in Artificial Intelligence, basically chooses the local optimal solution with the
hope that will lead to global optimal solution. That means it finds the optimal value from its
neighbors and then move on based on the selection. ... Applications of greedy search algorithm
is that it can be used in games.
A greedy algorithm is a simple, intuitive algorithm that is used in optimization problems. ...
However, in many problems, a greedy strategy does not produce an optimal solution. For
example, in the animation below, the greedy algorithm seeks to find the path with the largest
sum.
b.) Informed search
Informed Search. A search using domain-specific knowledge. Suppose that we have a way to
estimate how close a state is to the goal, with an evaluation function. General strategy: expand
the best state in the open list first. It's called a best-first search or ordered state-space search.

Informed Search

 A search using domain-specific knowledge.


 Suppose that we have a way to estimate how close a state is to the goal, with an
evaluation function.
 General strategy: expand the best state in the open list first. It's called a best-first search
or ordered state-space search.
 In general the evaluation function is imprecise, which makes the method a heuristic
(works well in most cases).
 The evaluation is often based on empirical observations.

Examples

 The vacuum cleaner - it might move from a cell towards the dirtiest adjacent cell.
 For a path-search in a graph with a geometrical representation - give preference to the
neighbors which are the closest to the target based on the Euclidian distance (which may
or may not be an indication of a good path). This is called a greedy search algorithm.
 For a game-playing, the algorithm may move to a state giving it a strategic advantage
(capturing the opponent's queen).

Heuristic Examples

 Tic-Tac-Toe: the number of tupples (2 or 3) or pieces that are aligned.


 Jigsaw puzzle: the length of the completed border and the number of large continuous
completed areas.
 The 8-Queens problem: the number of cells that are not yet attacked by any of the
queens.
 For a maze: the Manhattan distance to the target
row difference + column difference.
c.) Iterative deepening search
In computer science, iterative deepening search or more specifically iterative deepening
depth-first search (IDS or IDDFS) is a state space/graph search strategy in which a depth-limited
version of depth-first search is run repeatedly with increasing depth limits until the goal is
found.
Iterative Deepening Search(IDS) or Iterative Deepening Depth First Search(IDDFS) ... Also, DFS
may not find shortest path to a node (in terms of number of edges). BFS goes level by level, but
requires more space.
d.) Hill climbing search
Hill Climbing is heuristic search used for mathematical optimization problems in the field of
Artificial Intelligence . Given a large set of inputs and a good heuristic function, it tries to find a
sufficiently good solution to the problem.

Hill Climbing is heuristic search used for mathematical optimization problems in the field of
Artificial Intelligence .
Given a large set of inputs and a good heuristic function, it tries to find a sufficiently good
solution to the problem. This solution may not be the global optimal maximum.

 In the above definition, mathematical optimization problems implies that hill climbing
solves the problems where we need to maximize or minimize a given real function by
choosing values from the given inputs. Example-Travelling salesman problem where we
need to minimize the distance traveled by salesman.
 ‘Heuristic search’ means that this search algorithm may not find the optimal solution to
the problem. However, it will give a good solution in reasonable time.
 A heuristic function is a function that will rank all the possible alternatives at any
branching step in search algorithm based on the available information. It helps the
algorithm to select the best route out of possible routes.

e.) Knowledge representation in artificial intelligence


Knowledge representation and reasoning (KR, KR², KR&R) is the field of artificial intelligence
(AI) dedicated to representing information about the world in a form that a computer system
can utilize to solve complex tasks such as diagnosing a medical condition or having a dialog in a
natural language.

You might also like