How do you Create a SImple 2D NPC AI?

So I am creating a simple 2D game to learn more about unity. My character jumps on moving platforms in the air and try’s to fight a enemy stick man. I wanted to know how do you make the enemy stickman intelligent enough to know the shortest mos efficient path to you instead of just jumping toward you.
Example:

I am on a platform above the enemy stick man, what I want the stick man to realize is that it can just go up the staircase on the left to get to me as this is the shortest most efficient way. How do you do this some code references or even some code that I could use would be very much appreciated.

In summary how do you make good AI’s for games…

Not a coder - but I’ve heard A* referenced quite a bit lately regarding AI and pathfinding.
May want to begin there.

1 Like

Thanks for your help and I will defiantly look into it.