alextro thanks for the Capx. Is it possible for you to provide some explanation for the code? I'm really trying to understand what is happening but can't seem to understand. Also, it seems that in this code each tile(nod) has a cost of 1. However, in my project, the cost is different for different tiles.