better build their cognitive maps. In reality a research on this field has discovered that even two years of work in the same building do not build a correct cognitive map like persons who used blueprints for the building from the first time. Moeser in 1988 discusses that: ―The series of studies reported in his article examined the cognitive mapping systems of student nurses who had worked in the hospital for various periods of time [15]. After inspecting several different measures, it was concluded that the student nurses had failed to form ‗survey'- type cognitive maps of the building even after traversing it for two years. A control experiment was tested, using naive subjects who were first asked to memorize floor plans of the building. These naive subjects performed significantly better on objective measures of cognitive mapping than did the nurses with two years' experience working at the hospital.

Intelligent robots presently needs to be more dynamic, reliable and having the ability to be mobilized even within indoor environments or buildings that is abandoned without the needs of guidance. This ability will facilitate the intelligent robot reaching its target in the simplest and shortest way [16]. 

The mentioned ability is more demanded for the intelligent robots with special jobs such as police man or fire fighters intelligent robots where human guidance is not possible. As known there are no satellite images for indoor environments, thus geographical maps are not useful inside such environments. Therefore chose of this work came on the architectural blueprints maps where the indoor environments are completely covered and a cognitive map have been developed based on blueprint map [17]. The developed cognitive map will be briefly described in next section before introducing the shortest path algorithm, since the algorithm based on the developed cognitive map.

## Ii. Developing Cognitive Map

The methodology of creating the cognitive map using blueprint map as a knowledge-based system developed consists of many algorithms; the algorithms have been used by the inference engine of the knowledge based-system of the intelligent robot [18]. These algorithms are used for gaining knowledge from the architectural blueprint maps, to build the cognitive map. These algorithms respectively are:
1. Threshold algorithm.

2. Flood Fill Algorithm.

3. Start Point Finding. 4. End Point Finding. 5. Main Path Finding. 6. Targeted Object (Room) Finding. 7. Similarity Algorithm.

Fig.1 presents the output of this system, which consists of all the paths from start point to the end point, which is the target object (room). This map will be the input for the shortest path algorithms. 

![0_image_0.png](0_image_0.png)

III. SHORTEST PATH ALGORITHMS FOR THE DEVELOPED 
COGNITIVE MAP
The Optimal Shortest Path is the shortest path that has fewer turnings on it which means, less processing time during navigation. To find the optimal shortest path, the algorithms find the three shortest paths and select the path that has fewer nodes, and passes it on. The medial axis have been defined by Graf in 1999 which is ―The medial-axis transformation is useful in thinning a polygon, or, as is sometimes said, finding its skeleton [19]. The goal is to extract a simple, robust representation of the shape of the polygon‖. In this research medial axis has been enhanced in order to be used for finding the shortest path. The following modules are used to find the optimal shortest path:
1. finding boarder pixels Module 2. Finding Central Pixels for Corridors Module 3. Finding Turnings Centers Module 4. Labeling the Medial-Axis Module 5. Finding the Shortest Path Module 6. Creating Graph (Connecting Nodes) Module 7. Floyd's Algorithm Module 8. The Optimal Shortest Path Module

## A. Finding Boarder Pixels Module

![0_Image_1.Png](0_Image_1.Png)

First it is important to group the mask main Path Mask with the two doors masks, doors Mask and targeted Door Mask. The new mask contains green shapes, which are doors from doors Mask and targeted Door Mask, and white shape, which is the main path as seen in Fig. 2.