simple implementation of the a-star algorithm in python