I worked out a bunch of kinks and this guy now hugs corners like a pro:

He was previously having trouble with turns:

But I eventually figured out that this was a bug related to how I was building maps. Right Now I’m simply using text files to define grids, like this:

W W W W W W W W W W W W W W W W W W W W W W W
W F F W F F F F F F F F W F F F F F F F F F W
W F F W W W W F F W F F W W W W W W W F F F W
W F F F F F F F F W F F F F F F F F W F W F W
W W W W W W W W W W W W W F F W F F W W W F W
W F F F F F F F F W F F F F F W F F F F F F W
W F F W F F W W W W F F W W W W W W W W W W W
W F F W F F F F F F F F F F F W F F F F F F W
W F F W W W W W W W W W W W W W F F W F F F W
W F F W F F F F F F F F F F F F F F W F F F W
W F F W W W W W W W W W W W W W W W W F F F W
W F F F F F F F F W F F F F F W F F F F F F W
W W W W F F W W W W F F W F F W F F W F F F W
W F F W F F W F F F F F W F F W F F W F F F W
W F F W F F W F F W W W W F F W F F W F F F W
W F F W F F W F F W F F F F F W F F W F F F W
W F F W F F W F F W F F W W W W W W W F F F W
W F F F F F F F F W F F W F F F F F F F F F W
W W W W F F W W W W F F W F F W W W W W W W W
W F F F F F W F F F F F W F F W F F F F F F W
W F F W W W W F F W W W W F F W F F W F F F W
W F F W F F W F F F F F F F F W F F W F F F W
W F F F F F W F F F F F W F F F F F W F F F W
W W W W W W W W W W W W W W W W W W W W W W W

Where W = wall and F = floor. The problem was in the script where I parse this text. For each character, I instantiate and position gameobjects to represent each tile, and set a movement cost for each of them. The bug was really just a dumb mistake. Rather than writing something like, if char = "F" for floor tiles, I wrote something like if char = "G". I guess when I wrote it I was thinking G for ground rather than F for floor. So dumb.

The floor tiles should have a movement cost of 1, but were getting nothing instead. So when A* was trying to find the path, all F tiles cost nothing, so it had no reason to choose one route over another–it was all free. Kind of cool actually, how it ended up choosing routes kind of at random.