Update tile cost.py

Now it works.