public int GetActionCost(Character.direction dir)
    {
        if (dir == (Character.direction)(-1))
        {
            return(0);
        }
        if (world[agentPos[0], agentPos[1]].item == Item.ItemType.NONE)
        {
            //Debug.Log("cat");
        }
        else
        {
            //Debug.Log("cate");
        }
        // subtract 1 from number of item tiles for this calculation if we're on an item tile
        int dirtyTiles = GetItemTiles().Count - (world[agentPos[0], agentPos[1]].item != Item.ItemType.NONE ? 1 : 0);

        //int turnAround = cameFrom == null ? 0 : (Character.OppositeDirection(dir, cameFrom.actionPerformed) ? 1 : 0) * 5;
        return(1 + 2 * dirtyTiles + (int)Pacman.GetDistPenalty(agentPos));       // + turnAround;
    }