You may have problems finding an algorithm that you want. For example, the algorithm you point out is used for finding the shortest path thru a known maze. Your problem is more in line with finding paths through an unknown space. You cannot incorporate a map as that limits your robot to only that specific map. Place it in an unknown environment, as any tester of your program would do, and you will fail.
You need to think from an unknown aspect instead of known. Picture through your robots' eyes sitting in a giant warehouse and all you see is blackness around you. Maybe in one direction there is a slight hint of 'something' but you don't know if it is a wall or obstacle.
First write your algorithm to move your robot forward and track the movement. You basically have to build your map based on a starting point. Once the laser detects something you need to go into proximity search mode until you have located either a wall or obstacle and plot a way around it.
You should eventually have an internal map with points indicating where you've located blocks:
..................
. .
. ... .
. . . .
. ... .
. .
..................
So the main point of your algorithm would be to determine what to do when an obstacle is hit. So you may do something consistant like 'turn right and proceed forward 1 unit, turn left and confirm the obstacle is still there' If not move forward. You also need to incorporate the secondary logic of what to do with your robot once you've determined you mapped the outer boundaries and returned to a starting point so that you start moving back and forth to map the middle of the room.
Write your pieces in simple routines. Like 'Find Wall' 'Move One Point' etc. and test linking these routines together until your robot is autonomously discovering an unknown location.