Sign in to follow this  
pete4551

Artificial intelligence help

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this