Navigating the robot by finding the shortest way
if structure
        if map.value[x,y] != 0:
            pass
        elif x==n+1 and y==m+1 or x==n-1 and y==m-1 or x==n-1 and y==m+1 or x==n+1 and y==m-1:
            pass
        elif map.blocked(x,y) == True:
            map.value[x,y]= -1            
        elif x==n and y==m:
            map.value[x,y]= number
        else:
            map.value[x,y]= number+1

is a little awkward. Rephrase if; pass into if not, delete == True since it's redundant, and you have:
if map.value[x, y] == 0 and not (
    (x==n+1 or x==n-1) and 
    (y==m+1 or y==m-1)
): 
    if map.blocked(x, y):
        map.value[x, y] = -1            
    elif x == n and y == m:
        map.value[x, y] = number
    else:
        map.value[x, y] = number + 1

You can further simplify by checking for coordinate difference in a set membership operation, though I haven't tested its performance:
if map.value[x, y] == 0 and not (
    {x - n, y - m} &lt;= {-1, 1}
): 
    # ...

General
You have heavily nested loops that iterate over a matrix-like structure. That's a job for numpy. Vectorization may or may not make your code shorter, but it will definitely speed it up.