## 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/

Possibly Related Threads...
 Thread: Author Replies: Views: Last Post Some Game / Engine Source code in C++ and MSVC kiavash2k 1 6,861 Apr 12, 2012 11:35 PM Last Post: DJyStyler What engine to choose for bowling-like game? Sergnsk 2 4,779 Jan 30, 2010 11:53 AM Last Post: mikey Easy game engine for Mac OS X YvanSoftware 7 13,979 Dec 17, 2009 03:04 PM Last Post: SethWillits Help with Game scene and Game Engine smith_mike51 2 4,631 Oct 14, 2009 04:44 AM Last Post: MikeD 3D Game Engine mikey 18 13,485 May 4, 2009 01:35 PM Last Post: TythosEternal