Advertisement

Artificial intelligence help

Started by October 16, 2010 07:24 AM
2 comments, last by Spline Driver 13 years, 11 months ago
Hi,

I want to make a game like "load runner", "mappy" or "milk and nuts" (NES games). I want to know which algorithm (path finding) i should use for the Artificial intelligent ghosts.

I heard somewhere that a-star is the best algorithm. But the problem is that with path finding, i need handling with other game objects like ladders, pipe (in load runner). Ghost should choose the best path with combination of ladders, pipes and platforms.


Can you please guide me to any tutorial regarding this?

Is there any open-source game available?

I will implement it in j2me.


Any help?

Thanks

Regards pete
Quote: I heard somewhere that a-star is the best algorithm. But the problem is that with path finding, i need handling with other game objects like ladders, pipe (in load runner).
A* doesn't care about ladders, pipes, platforms, tiles, grids, polygons, or anything like that; it's just a graph search algorithm, and if you can express your search space as a graph with nodes and edges, you can use A* (or any other similar algorithm).

I've never used A* in this particular context, so this is pure speculation on my part. But, it seems to me that the nodes of the graph in this case could reasonably be considered to be the endpoints of platforms, the bottoms and tops of ladders, and the entrances and exits of any pipes/tunnels.

Nodes representing platform endpoints would be connected to nodes representing the endpoints of any platform the agent could jump to from that point; costs could be proportional to total distance, how far up or down the agent would have to jump, etc. Where an agent could jump down from one platform onto the middle of another platform, you might need an additional node at the 'landing point'. (The 'edge' in this case might be one-way if the upper platform would be too high to jump to from the lower platform.)

I don't know if any of this is relevant to what you're wanting to do, but if I were tasked with creating the AI for a platform game (and if reasonably intelligent behavior was needed), that's probably where I'd start.
Advertisement
Thanks a lot...:)
You probably found this by now. Either way, this is how I learned A*. Simple tutorial that appeals to both sides of the brain.

http://www.policyalmanac.org/games/aStarTutorial.htm

This topic is closed to new replies.

Advertisement