artificial intelligence engine for game like sherlock holmes

Member
Posts: 164
Joined: 2010.10
Post: #1
i have a map (a graph: nodes interconnected by arcs), and pawns and kings that moves on nodes. the goal is capture the king.
would the engine be like a chess engine...?
however where can i find information for implementation of an AI?
are there some souce code? (i have seen openNERO will it do my case?)
an algorithm for the minimum path between two points?
thanks
Member
Posts: 31
Joined: 2010.02
Post: #2
It sounds like you are looking for an algorithm to get from one point to another using the optimum path.

The A* search algorithm would be a good choice since you already have a graph of your "map."
Here are some good pages on the subject (with pseudocode!):

http://www.policyalmanac.org/games/aStarTutorial.htm
http://en.wikipedia.org/wiki/A*_search_algorithm
Member
Posts: 164
Joined: 2010.10
Post: #3
many thanks! i'll study it!
i have readed...could be used in games like pacman?
because the game is similar, in turns, and the pacman is visible only in some case...
Member
Posts: 31
Joined: 2010.02
Post: #4
(Feb 26, 2011 10:23 AM)sefiroths Wrote:  many thanks! i'll study it!
i have readed...could be used in games like pacman?
because the game is similar, in turns, and the pacman is visible only in some case...

You could use A* for a pacman like game but it may be a little overkill. I believe each pacman character followed a specific set of movement rules. Like below:

Blinky: Chased you pretty straight, tended to get faster as the level progressed.
Pinky: Favored the counter clockwise direction, which would help him get around Pacman.
Inky: Behaved randomly, as in, randomly picked a direction.
Clyde: Favored the clockwise direction, though, made it more a point to stay away from Pacman.

If you want something not as fancy or computationally intensive as A* you could check out some of the techniques on this page: http://www.red3d.com/cwr/steer/