Help with a Pac-man AI

Well I’m new to these forums and pretty new to game programming and AI, and me and a friend were working on recreating Pac-man for practice, but we just can’t figure out a way to make the ghosts find the player and chase him. The only solution we have thought of is a random movement after a predetermined path to the corners of the board(there are four ghosts). This worked kind of, but we really wanted to go all out and make it just like the original. So if anybody has any ideas on how to create an AI to find the shortest path to the player(taking into account walls), it would really help me out.

Thanks.