AI for 2D game like Flicky or Sonic

Hi Guys!

I need a little help…
I have my first little game in java, which is basically a PACMAN.
I have a snake that the player controls, which can eat apples.

Now i inserted a little hawk and i want it to try to kills the player, but in a dumb way.

I wonder how can i start it ?
I read about A* , but i wonder if i should start with that…

What you guys Recommend?
Any Article anything at all, is a good start to me.

You could try Dijkstra.

A* gives the most efficient path, as it contains some similarities between Djikstra and another algorithm. But I’m not sure if the most efficient path is what you want in terms of difficulty.

A* is Dijkstra with an added heuristic. Or seen the other way, Dijkstra is A* with a constant heuristic.

Thanks for the fast replies guys!!!

Ok, im printing some dijkstra tutorials.
Hopefully i will be able to mix it with my jPanel :stuck_out_tongue:

OK Guys, i searched for dijkstra and A* again.

And im going to make my own algorithm…
I will calculate which of the adjacents Squares will get me closer to the player and move it.
And then re-calculate it.

Its simple i think, but for a start its ok, i guess… :stuck_out_tongue: