Artificial Intelligence Algorithms: IOSR Journal of Computer Engineering January 2012
Artificial Intelligence Algorithms: IOSR Journal of Computer Engineering January 2012
net/publication/314564271
CITATIONS READS
9 3,402
1 author:
SEE PROFILE
All content following this page was uploaded by Sreekanth Reddy Kallem on 28 August 2020.
Abstract-Artificial intelligence (AI) is the study of how to make computers do things which, at the moment,
people do better. Thus Strong AI claims that in near future we will be surrounded by such kinds of machine
which can completely works like human being and machine could have human level intelligence. One intention
of this article is to excite a broader AI audience about abstract algorithmic information theory concepts, and
conversely to inform theorists about exciting applications to AI.The science of Artificial Intelligence (AI) might
be defined as the construction of intelligent systems and their analysis.
Keywords: Artificial Intelligence, Algorithms
I. Introduction
Artificial intelligence (AI) is the intelligence of machines and the branch of computer science that aims
to create it. AI textbooks define the field as "the study and design of intelligent agents"[1]where an intelligent
agent is a system that perceives its environment and takes actions that maximize its chances of success.[2] John
McCarthy, who coined the term in 1955,[3] defines it as "the science and engineering of making intelligent
machines."[4]
AI research is highly technical and specialized, deeply divided into subfields that often fail to
communicate with each other.[5] Some of the division is due to social and cultural factors: subfields have grown
up around particular institutions and the work of individual researchers. AI research is also divided by several
technical issues. There are subfields which are focussed on the solution of specific problems, on one of several
possible approaches, on the use of widely differing tools and towards the accomplishment of
particular applications. The central problems of AI include such traits as reasoning,knowledge, planning,
learning, communication, perception and the ability to move and manipulate objects.[6] General intelligence (or
"strong AI") is still among the field's long term goals.[7] Currently popular approaches include statistical
methods, computational intelligence and traditional symbolic AI. There are an enormous number of tools used
in AI, including versions of search and mathematical optimization, logic, methods based on probability and
economics, and many others.
The field was founded on the claim that a central property of humans, intelligence—
the sapience of Homo sapiens—can be so precisely described that it can be simulated by a machine.[8] This
raises philosophical issues about the nature of the mind and the ethics of creating artificial beings, issues which
have been addressed by myth, fiction and philosophy since antiquity.[9] Artificial intelligence has been the
subject of optimism,[10] but has also suffered setbacks[11] and, today, has become an essential part of the
technology industry, providing the heavy lifting for many of the most difficult problems in computer science. [12]
www.iosrjournals.org 1 | Page
Artificial Intelligence Algorithms
1.1.4. Mobile Robotics and Games (Path Planning):
Mobile robots often have to replan quickly as the world ortheir knowledge of it changes. Examples
include both physical robots and computer-controlled robots (or, more generally, computer-controlled
characters) in computer games. Efficient replanting is especially important for computer games since they often
simulate a large number of characters and their other software components, such as the graphics generation,
already place a high demand on the processor. In the following, we discuss two cases where the knowledge of a
robot changes because its sensors acquire more information about the initially unknown terrain as it moves
around.
www.iosrjournals.org 2 | Page
Artificial Intelligence Algorithms
ofthe decomposition, its regularity, convexity, or Voronoiguarantees, as well as geometric computations, such
asvisibility graphs, or even heuristic roadmap information (Kavrakiet al.1996) can then be used to
improvesearch efficiency.
Hierarchical path-finding incorporates multiple graph orsearch-space decompositions of different
granularity asa way of reducing search cost, perhaps with some lossof optimality. Hierarchical information has
been used toimprove A* heuristics (Holte et al. 1996), and proposedin terms of using more abstract, meta-
information al-ready available in a map, such as doors, rooms, floors,departments (Maio and Rizzi 1994). Less
domain-specific are graph reduction techniques based on recursively combining nodes into clusters to form a
hierarchical structure (Sturtevant and Buro 2005). Our approachhere is most closely based on the HPA* multi-
level hierarchical design, where node clustering further considersthe presence of collision-free paths between
nodes (Boteaet al. 2004).
Path-finding can also be based on the physics of dynamic character interaction. In strategies based on
potential fields (Khatib 1985) or more complex steeringbehaviours (Reynolds 1999; Bayazit et al. 2002) a
character’s path is determined by its reaction to its environment. This reactive approach can be combined
withsearch-based models to improve heuristic choices duringsearching (Pottinger 2000). There are many
possibleheuristics to exploit; in our implementations we use a“diagonal distance” metric to approximate the cost
of unknown movement (Patel 2003).
Recursive algorithms are popular because they are the most powerful and are used in association with
tile based games such as rpgs. The thing with these set of algorithms is that they require a TONof computing
power. This is because these algorithms generally run in exponential time which to put simply means that for a
small increase in map size, running time will increase a lot. If you're serious about making games, i suggest you
learn a high level language such asc++ or java. If you're just here to fool around then i suggest you stick to small
map sizes.
In order to design a recursive path finding algorithm, one mustunderstand the concept of recursion.
Basically a recursive functionis a function which calls itself. To illustrate this concept, lets look at a simple
function which calculates fibonacci numbers.(fibonacci numbers are a sequence of numbers where each
successivenumber is the sum of the previous two ie. 1, 1, 2, 3, 5, 8, 13).
www.iosrjournals.org 3 | Page
Artificial Intelligence Algorithms
Code:
Function fib (int n) {
If (n == 0) return 0
If (n == 1) return 1
Return fib (n-1) + fib(n-2)
}
If we look carefully at the code we see that the function fib() callsupon itself to calculate the previous
two numbers. This process keepsrepeating until it either calculates the value of 0 or 1 which wealready know the
value of.
Lets go step by step how this functionworks:
1) If we try to find the 6th element in the sequence we call fib(6)
2) Since n is not equal to 0 or 1, we must calculate the valuerecursively.
3) The value of fib(6) is equal to fib(5)+fib(4) which are the twoprevious numbers in the series. So we call the
fib function to calculate these two numbers.
4) This process keeps repeating itself untill it encounters the twopreconditions which return a constant value. If
it weren't for thesepreconditions, the function would keep calling itself untill yourcomputer runs out of RAM!!!
www.iosrjournals.org 4 | Page
Artificial Intelligence Algorithms
node is f(n)=g(n)+h(n), where g(n) is the cost of the path from the initial state to node n and h(n) is the heuristic
estimate or the cost or a path from node n to a goal. Thus, f(n) estimates the lowest total cost of any solution
path going through node n. At each point a node with lowest f value is chosen for expansion. Ties among nodes
of equal f value should be broken in favour of nodes with lower h values. The algorithm terminates when a goal
is chosen for expansion.
A* algorithm guides an optimal path to a foal if the heuristic function h(n) is admissible, meaning it
never overestimates actual cost. For example, since airline distance never overestimates actual highway
distance, and manhatten distance never overestimates actual moves in the gliding tile.
A* uses a best-first search and finds a least-cost path from a given initial node to one goal node (out of
one or more possible goals). As A* traverses the graph, it follows a path of the lowest known heuristic cost,
keeping a sorted priority queue of alternate path segments along the way.
I t uses a distance-plus-cost heuristic function (usually denoted ) to determine the order in which the
search visits nodes in the tree. The distance-plus-cost heuristic is a sum of two functions:
the path-cost function, which is the cost from the starting node to the current node (usually denoted )
an admissible "heuristic estimate" of the distance to the goal (usually denoted ).
The part of the function must be an admissible heuristic; that is, it must not overestimate the distance
to the goal. Thus, for an application like routing, might represent the straight-line distance to the goal,
since that is physically the smallest possible distance between any two points or nodes.
If the heuristic h satisfies the additional condition for every edge x, y of the
graph (where d denotes the length of that edge), then h is called monotone, or consistent. In such a case, A* can
be implemented more efficiently—roughly speaking, no node needs to be processed more than once (see closed
set below)—and A* is equivalent to runningDijkstra's algorithm with the reduced
cost .
Example:
An example of an A star (A*) algorithm in action where nodes are cities connected with roads and h(x)
is the straight-line distance to target point:
3.4.1. Complexity:
The time complexity of A* depends on the heuristic. In the worst case, the number of nodes expanded
is exponential in the length of the solution (the shortest path), but it is polynomial when the search space is a
tree, there is a single goal state, and the heuristic function h meets the following condition:
where is the optimal heuristic, the exact cost to get from to the goal. In other words, the error of h will not
grow faster than the logarithm of the “perfect heuristic” that returns the true distance from x to the goal (see
Pearl 1984[11] and also Russell and Norvig 2003, p. 101[12])
The main drawback of A*, and indeed of any best-first search,is its memory requirement.Since at list
the entire Open list must be saved, A* is severely space-limited in practice, and is no morePractical than
breadth-first search on current machines. For example, while it can be Run successfully in the Eight Puzzle, it
exhausts available memory in a matter of minutes on the Fifteen Puzzle.
www.iosrjournals.org 5 | Page
Artificial Intelligence Algorithms
The intuitive idea behind the generic search algorithm, given a graph, a set of start nodes, and a set of goal
nodes, is to incrementally explore paths from the start nodes. This is done by maintaining a frontier(or fringe) of
paths from the start node that have been explored. The frontier contains all of the paths that could form initial
segments of paths from a start node to a goal node. (See Figure 3.3, where the frontier is the set of paths to the
gray shaded nodes.) Initially, the frontier contains trivial paths containing no arcs from the start nodes. As the
search proceeds, the frontier expands into the unexplored nodes until a goal node is encountered. To expand the
frontier, the searcher selects and removes a path from the frontier, extends the path with each arc leaving the last
node, and adds these new paths to the frontier. A search strategy defines which element of the frontier is
selected at each step.
1: Procedure Search(G,S,goal)
2: Inputs
3: G: graph with nodes N and arcs A
4: S: set of start nodes
5: goal: Boolean function of states
6: Output
7: path from a member of S to a node for which goal is true
8: or ⊥ if there are no solution paths
9: Local
10: Frontier: set of paths
11: Frontier ←{⟨s⟩: s∈S}
12: while (Frontier ≠{})
13: select and remove ⟨s0,...,sk⟩ from Frontier
14: if ( goal(sk)) then
15: return ⟨s0,...,sk⟩
16: Frontier ←Frontier ∪{⟨s0,...,sk,s⟩: ⟨sk,s⟩∈A}
17: return ⊥
Fig.5. Generic graph searching algorithm.
The generic search algorithm is shown in Figure 3.4. Initially, the frontier is the set of empty paths
from start nodes. At each step, the algorithm advances the frontier by removing a path ⟨s0,...,sk⟩ from the
frontier. If goal(sk) is true (i.e., sk is a goal node), it has found a solution and returns the path that was found,
namely ⟨s0,...,sk⟩. Otherwise, the path is extended by one more arc by finding the neighbors of sk. For every
neighbor s of sk, the path ⟨s0,...,sk,s⟩ is added to the frontier. This step is known as expandingthe node sk.
This algorithm has a few features that should be noted:
The selection of a path at line 13 is non-deterministic. The choice of path that is selected can affect the
efficiency; see the box for more details on our use of "select". A particular search strategy will determine
which path is selected.
It is useful to think of the return at line 15 as a temporary return; another path to a goal can be searched for
by continuing to line 16.
If the procedure returns ⊥, no solutions exist (or there are no remaining solutions if the proof has been
retried).
The algorithm only tests if a path ends in a goal node after the path has been selected from the frontier, not
when it is added to the frontier. There are two main reasons for this. Sometimes a very costly arc exists
from a node on the frontier to a goal node. The search should not always return the path with this arc,
because a lower-cost solution may exist. This is crucial when the least-cost path is required. The second
reason is that it may be expensive to determine whether a node is a goal node.
www.iosrjournals.org 6 | Page
Artificial Intelligence Algorithms
If the path chosen does not end at a goal node and the node at the end has no neighbors, extending the
path means removing the path. This outcome is reasonable because this path could not be part of a path from a
start node to a goal node.
V. Conclusion
We conclude that by using this algorithm we can solve AI problems easily.AI algorithms are also
called as a problem solving algorithms. Artificial Intelligence will surpass human intelligence. Although it has
proven itself to be similar to the human brain, computers do not think in the same way. In this report, we have
discussed Algorithms of AI and their impact on problem solving and our lives.
www.iosrjournals.org 7 | Page
Artificial Intelligence Algorithms
References
[1] http://www.hutter1.net/ai/uaibook.html.
[2] Elaine Rich, Kevin Knight, ” Artificial Intelligence", Second Edition, page no.3.
[3] “ Universal Artificial Intelligence”Subtitle: Sequential Decisions based on Algorithmic Probability.
[4] http://en.wikipedia.org/wiki/Artificial_intelligence.
[5] http://www.codeproject.com/Articles/16286/AI-Simple-Genetic-Algorithm-GA-to-solve-a-card-pro.
[6] http://artint.info/html/ArtInt_51.html.
[7] David Poole,AlanMackworth, “Artificial Intelligence: Foundations of Computational Agents”,2010.
[8] http://www.kirupa.com/forum/showthread.php?72863-Tutorial-Path-Finding-Algorithms-AI.
[9] http://webdocs.cs.ualberta.ca/~lanctot/files/papers/pathfinding-orbius-2006.pdf.
[10] http://en.wikipedia.org/wiki/A*_search_algorithm.
[11] Richards E.Korf* , “Artificial Intelligence Search Algorithms”, Computer Science Department University of California, Los
Angeles,Ca.90095 June 23,1998.
[12] http://www.synergy.ac.in/intranet/e-book/(Ebook%20-%20Paper)%20Artificial%20Intelligence%20Search%20Algorithms.pdf.
[13] Robin ,“A star algorithm”December 18th, 2009 |
[14] http://intelligence.worldofcomputing.net/ai-search/a-star-algorithm.html.
[15] http://artificialintelligence-notes.blogspot.in/2010/07/problem-reduction-with-ao-algorithm.html.
[16] http://www.cs.iastate.edu/~cs572/WWW-honavar07/cs572problem-reduction.pdf.
[17] lowa state university, deparment of computer science artificial intelligence research laboratory.
[18] ReferedFrom Artificial Intelligence TMH.
[19] http://www.eetindia.co.in/VIDEO_DETAILS_700000062.HTM Prof. PallabDasgupta of the Department of Computer Science and
Engineering, IIT Kharagpurconducted this lecture.
[20] KoushalKumar ,GourSundarMitra Thakur“ Advanced Applications of Neural Networks and Artificial Intelligence: A Review.”
Published Online June 2012 in MECS (http://www.mecs-press.org/) DOI: 10.5815/ijitcs.2012.06.08,pg.no.58.
[21] ]By National Research Council, ”Applications of Robotics and Artificial Intelligence to Reduce Risk and Improve
Effectiveness”.pg.no.2-3
[22] RC Chakraborty, ”Expert Systems: AI course lecture 35-36”,pg no. 03.
[23] ]Didier Dubois-Henri Prade,” The place of Fuzzy Logic in AI”.
[24] ]Andrew Ilyas,” An Isearch research paper(Artificial Intelligence)”, May 13, 2010.
[25] NirPochter and Jeffrey S. Rosenschein, ”Requirements on Heuristic Functions when Using A* in Domains with Transpositions”.
[26] Robin, ”Heuristic Search(artificial intelligence articles on artificial intelligence)”. December 14 th,2009.
[27] Peng Dai,” Heuristic Search Ideas for Deterministic and Probabilistic Problems”, Journal, Pg.no.1.
[28] Sven Koenig Maxim LikhachevYaxin Liu David Furcy, “Incremental Heuristic Search in Artificial Intelligence”, Pg.no. 08.
www.iosrjournals.org 8 | Page