Nowadays, localization is a very important research problem in the context of Wireless Sensor Networks (WSNs). These networks are made by nodes connected to each other wireless and able to collect data: all the retrieved information can be then held by a central unit, a more performance machine, which can in turn collect and elaborate all the data. The main contribution of this work is in an innovative way to recognize the position of a point in a certain closed environment, by exploiting the RSSI (Received Signal Strength Indicator) and a logic approach: for this purpose, Prolog has been used in order to describe an intuitive non-greedy algorithm and an appropriate simulation program able to make an estimation of a point localization, providing the global optimum. To this aim, the placement of hub in the interesting area is crucial and, in particular, when this area presents some obstacles which can alter the transmission signal. The expressive power of Prolog and the way the its logic engine works made this programming language suitable for our purpose: in fact, the backtracking strategy opportunely reflects the way the relative positioning of hubs is performed with the aim of improving the cover of a specific indoor area at each step, which is a very important application of the localization problem.