ID1395 Searching
ID1395 Searching
Abstract
This article represents a research, analysis and comparison for decision searching algorithms in
solution space used for training students. The aim of this study is to develop a methodology for
comparing algorithms. The methodology will be visually presented in a web-based virtual laboratory
for Artificial Intelligence studies. Embedding the methodology into a web-based virtual laboratory will
support the educational process of the subject, with trainees being able to conduct self-training from
their homes. The study of these algorithms and the creation of the methodology will improve the
perception of information, both for easier learning and for understanding the difference between the
different algorithms, their advantages and disadvantages. The need to develop a methodology to
integrate into the subject studies comes from the rapid development in this area and the need for
teachers and learners to follow these rates.
Advantages will be the creation of a methodology in which these algorithms will be presented visually,
so:
- Students will be able to better understand search algorithms in the field of artificial intelligence;
- You will be able to understand clearly how each algorithm functions and works;
- They will be able to compare more easily because of the visual image they will acquire.
1 INTRODUCTION
“Search is a problem-solving technique that systematically explores a space of problem states” Luger,
G.F. Artificial Intelligence: Structures and Strategies for Complex Problem Solving
Artificial Intelligence is a fast growing field that is continually improving and complementing. It contains
many areas that involve many algorithms and methods of information processing, and the scientific
world is constantly working on improving these algorithms and creating new ones. This article aims to
examine and compare search algorithms in the state of artificial intelligence states and to provide
guidance on their advantages and disadvantages. Figure 1 shows the basic algorithms used in this
area.
General state search in state space - Solving many tasks (but not all), traditionally considered
intellectual, can be reduced to a successive transition from one description (formulation) to another,
equivalent to the first or simply by it until it comes to what is considered to be solving the task. [1]
Structure of the state of space [2]
Data structures:
Trees: only one path to a given node
Graphs: several paths to a given node
Operators: directed arcs between nodes
The search process explores the state space.
In the worst case all possible paths between the initial state and the goal state are explored.
State space search is divided into three main types of tasks, which in turn contain different algorithms
and methods for their solution. They are shown in Figure 1.
Generate and test
Breadth-first search
Forward checking
Best-First Search
Uninformed search
Search in state of
space Search for a path to
a specific goal
Beam Search
Heuristic search
A* search
Hill Climbing
Alpha-beta pruning
These algorithms are thoroughly studied by young professionals in this field. For this reason their
characteristics will be examined, how to generate and visualize each algorithm in various software
tools to be able to make their comparison method to facilitate learning and studying them. Here is a
brief presentation of the three types of tasks, along with the advantages and disadvantages of their
algorithms.
The first step involves defining the start and target states by creating lists of investigated and
unexplored heirs. In the second step, the search for the selected target state begins. The difference in
the two algorithms comes when the heirs are added to the list, when the in-depth crawl is added, the
heirs are added to the list at the front, and when crawled in width they are added to the back of the list.
This can be confirmed when the third step is reached and the crawling results are displayed.
Since trees and Graphs can contain many nodes, memory requirements can determine whether to
use DFS or BFS. For trees, BFS requires that all nodes be stored at a given level, while DFS requires
that the entire path from the root to the sheet is stored. Since trees are often balanced, that is,
structured in a way that minimizes depth, DFS typically require less memory. However, some trees for
making decisions and some trees can have branches that are infinitely long, in which case BFS would
be a better choice.
When visualizing these algorithms in the course of the artificial intelligence course, the learner has the
opportunity to build the necessary tree himself and in the implementation of various tasks on him to
visually see how his crawling happens and over time to acquire the ability to easily choose the most
appropriate algorithm for solving a particular task.
Criteria
Complete Optimal Time Memory
Algorithm
Breadth first yes yes О(bd) О(bd)
- From the table, it can be seen that by the time criterion, all algorithms are the same except for
A * and narrowband search method. Beam search has a time estimate O (nd), unlike the
common algorithm O (bd). This is because Beam search is a modification of A *, which looks
at the best n branches at each node. This speeds up the processing, but at the cost of
assuming that it is not necessary to walk a low optimal node to reach the target.
- The demand for search algorithm memory is more widespread than the time criterion. In many
cases, search algorithms will come close to the crawl problems in Breadth First or Depth First.
- As regards the criterion of completeness, it is noted that the three algorithms are more
comprehensive. These algorithms are similar, and two of them come from the third. That is,
the Best-First Method is a variation of Breadth-first search. While A * has the same heuristics
as Breadth-first search. Just that applying this heuristics also distinguishes these two
algorithms in the criterion of optimality.
2.2.2 Backtracking
This is the most common algorithm for resolving constraint satisfaction (CSP). Connect variables with
values in a specific order. After connecting each successive variable with a value, it is checked
whether the variables currently associated meet the constraints: if constraints are satisfied, continue to
select a value for the next unrelated variable if the constraints are not met, a new value is selected for
the last associated variable.
2.3.2 Alpha-Beta
The Alpha-Beta [2, 10] algorithm is a modification of the MiniMax algorithm that can be applied in a
MiniMax algorithm. Kunth and Moore prove that many of the clones can be removed from the game
tree, which reduces the time needed to complete the game and will give the same result as the
MiniMax algorithm. The basic idea of this algorithm is to remove the unintelligible branches of the
game tree.
Conclusions for both methods
- The disadvantage of the minimax procedure is that each leaf of the state tree must be visited
twice - the first time to find its heirs and the second time to evaluate its heuristic value.
- Minimax is too slow in games like chess, because the player has many choices to choose a
move, and the deeper we go (progressing in the game), the slower it gets.
- Alpha-Beta - utility nodal estimates are generally not accurate but rough estimates of the value
of a position, and as a result large errors can be made.
- Alpha-Beta - If the scoring feature is not good, it is possible for a player not to play optimally
every time and not to choose the best possible move.
Examples of games with these two methods are chess, sea chess, and other games of this type. In
order for learners to learn better and to understand their advantages and disadvantages, it is
appropriate for their visual presentation to be one of the exemplary games. Most chess is best
because it will not be long, but it will still be enough to show off.
3.1 Methodology
Methodology for conducting the practical exercises in the subject Artificial Intelligence
1. In each of the algorithms described above, the teacher conceives suitable tasks of varying difficulty,
giving learners the easiest to the most difficult one.
2. The teacher presents the tasks of the students by theoretically explaining their context. It further
explains them by showing block-diagrams of different algorithms.
3. The student reads the lectures, listens to the instructions from the lecturer and starts a practical
solution to the tasks by performing the following steps.
3.1. Reads a task condition
3.2. Consider possible solutions / which algorithms can be applied to the task / make a comparison if
necessary, which is discussed with the lecturer.
3.3. Chooses a solution - an algorithm
3.3.1. If it did not make an algorithm choice returns to step 3.2.
3.3.2. If an algorithm is selected, it is applied to solve the task through the web-based virtual lab
3.4. Solve the task
3.4.1. If the task is not properly solved
3.4.1.1. Consider the decision
3.4.1.2 Detecting an Error
3.4.1.3. Return to step 3.4.
3.4.2. If the task is properly resolved
3.5. Deliver result
3.6. Save the task
3.7. Discuss the result with the lecturer
3.7.1. If the teacher believes that the learning material is not well-used, a new task is given and pass
to step 3.1.
3.7.2. If the teacher considers that the learning material is theoretically and practically used to pass to
the next subject of the subject.
3.8. End
Theoretical presentation
For each algorithm, there will be a theoretical presentation, emphasizing its peculiarities. Through this
module, learners will be able to catch up with a missed lesson.
Graphic presentation
In this module, all algorithms are graphically represented, with each note including places where there
are peculiarities. Using this module and the theoretical module, learners will begin to get a visual
break for each algorithm.
Standalone tasks
This is the most used module in our laboratory. It allows learners to choose:
- Which algorithm to exercise.
- How to display the selected algorithm through a graph or tree.
- How to perform the desired algorithm - step by step or all steps at once. The searching path, that
passes the algorithm to reach the target, will be colored in a certain color. There is also an opportunity
for the student to note the way the problem is solved and then the correct answer if his / hers is wrong.
- When the task is complete, it is possible to keep the profile of the learner in the form of a text
document and in the form of a picture.
- When a task is solved by two or more algorithms, the learner has the opportunity to examine the two
tasks side by side and to compare the two algorithms. He sees the difference in each of them.
4 CONCLUSIONS
Through this laboratory and the methodology described above, training is expected to improve
significantly. The combination of the methodology and capabilities available to the lab facilitates both
sides. Due to the fact that the lab is web-based, there is much more time for exercise by the trainees.
In this way, they have the opportunity during the practical exercises to ask a lot more questions or put
case for discussion. Each task they solve can be sent to the tutor for review or correction without
having to wait until the next exercise. The lecturer gets a real idea of the progress of each student and
clearly sees where he is confused, thus able to see and correct these mistakes in the school lab.
ACKNOWLEDGEMENTS
The study was supported by contract of University of Ruse “Angel Kanchev”, № BG05M2OP001-
2.009-0011-С01, „Support for the development of human resources for research and innovation at the
University of Ruse “Angel Kanchev”. The project is funded with support from the Operational Program
„Science and Education for Smart Growth 2014 - 2020" financed by the European Social Fund of the
European Union.
REFERENCES
References [Arial, 10-point, left alignment, upper and lower case] should be cited according to the
Bibliography and Citation Style https://iated.org/citation_guide
[1] Шишков, Д. & Нишева, М. (1995). Изкуствен интелект. Добрич: Интеграл (in Bulgarian).
[2] Artificial Intelligence Solving problems by searching - Fall 2008 - professor: Luigi Ceccaroni –
PowerPoint presentation
[3] GeeksforGeeks – a computer science portal for geeks, visited 10.04.2018
https://www.geeksforgeeks.org/introduction-hill-climbing-artificial-intelligence/
[4] https://aaai.org/Papers/AAAI/1991/AAAI91-067.pdf
[5] Zhang, W. (1998, July). Complete anytime beam search. In AAAI/IAAI (pp. 425-430).
[6] Felner, A., Stern, R., Ben-Yair, A., Kraus, S., & Netanyahu, N. (2004). PHA*: finding the
shortest path with A* in an unknown physical environment. Journal of Artificial Intelligence
Research, 21, 631-670.
[7] Chandel, Ashwani, and Manu Sood. "Searching and Optimization Techniques in Artificial
Intelligence: A Comparative Study & Complexity Analysis”." International Journal of Advanced
Research in Computer Engineering and Technology (IJARCET) 3.3 (2014).
[8] Kumar, V. (1992). Algorithms for constraint-satisfaction problems: A survey. AI magazine, 13(1),
32.
[9] Elnaggar, A. A., Abdel, M., Gadallah, M., & El-Deeb, H. (2014). A comparative study of game
tree searching methods. Int. J. Adv. Comput. Sci. Appl., 5(5), 68-77.
[10] Knuth, D. E. (2000). Selected papers on analysis of algorithms. Stanford, CA: Center for the
Study of Language and Information.