fixed bug in ai

distance tracking needed to use
the correct head/tail tile
rm non tracked
updated git ignore