# Algorithm

Simplified definition of the algorithm says that:

An algorithm is a finite sequence of steps for turning input to the output. (A. Jędryczkowski, 2005, s.2)

Figure 1. Scheme of the algorithm

When constructing any algorithm one such perform specific stages: understanding the problem, making assumptions, design of steps, constructing a flowchart or tree, programming, testing. Algorithms are part of larger field of science called artificial intelligence. Processing, and transforming data, can take place once or multiple times.

## Examples of popular algorithms

The most common artificial intelligence algorithms:

• search algorithms such as. A* (A Star) - heuristic method of search for shortest paths in a particular environment  (C. Płotnicki-Chudyk, 2005, s.6). One of the successful successors was B* (B Star) algorithm.

Figure 2. An example of A-Star algorithm

• min-max decision-making algorithm - involves finite element method in decision-making. One of the modifications of the Min-Max was named Alpha-Beta. The second most popular modification became SSS (State Space Search) - containing elements of the A-Star 
• search algorithm, Breadthen-First Search (BFS) and (Depth-First Search - DFS) are tools for assisting with the creation of algorithms for searching for optimal solutions. They are working very well for searching graphs. For this reason, you can just use BFS to search for the best possible way in the maze
• graph algorithms - applied for more complex mechanisms, reducing the amount of detail and overall transparency of causal model
• sorting algorithms - very commonly used in all types of databases, as well as data warehousing
• recursive algorithms - used to solve problems where recursion is the quickest way to correct algorithm processing  (N. Wirth, 2002, s.148)
• evolutionary algorithms - class of heuristic algorithms, the search space of alternative solutions.
• arithmetic systems - present in almost any computing structure (for addition, multiplication division etc.)
• approximation algorithms - used to solve research problems, problem of a salesman, covering of warehouse space, and other  (T. Cormen, 2001, s.1073)

In accordance with the above definition, the algorithm can be created on the basis of almost every common human action, Everyone performs algorithms of rising out of bed, washing teeth or dressing. Preparation of meal is also an algorithm, like driving, cycling, or any other action. Thanks to this perception, the algorithms has become a separate science almost as extensive as information science. (D. Harel, 2000, s.23)