Solving a maze by following walls is one thing.
It is another to map a maze which needs some form of distance sensor so the bot knows how far it has travelled.
Some first thouhts:
You would likely have to consider the maze as a 2 dimensionsal matrix of square cells all of equal size and have the dimensions known, then as the bot progressed into a new cell, set a value based on the immediate knowledge (ie directions that it can progress in) then as each direction is investigated alter the value to reflect findings as the bot returns to any point.
Accuracy/repaetability of the sensor for distance travelled in a given direction would be a concern
The SRF005 is an option for the BOT120 that could help detect the distance from the end of any straight and be used as the basis of determination which cell on was in.
In summary, to map the maze one has to know
1. where the bot is,
2. where the bot has been,
3. what the bot can 'see',
then the bot can map the maze and navigate around it to find enough about the maze to complete it with an optimal path.
Then stage 2 can be the challenge of following that optimal route in the shortest time.