Public Group

# Enemy AI

This topic is 4954 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello. I'm currently trying to get some insight in AI, I'm making a pac-manish game to learn AI. I tought about making the enemies use the A* pathfind algorithm. Becuse I've seen this demo clicky but it feels a little like overkill. What do you think? //walle

##### Share on other sites
A* is a good pathplanning algo, but it can become expensive if you have many agents using it on a large map. I'd see how it works within your game, if its not too slow or cumbersome, go for it. But you could probably get away with a cheaper algorithm

##### Share on other sites
A* is very very very fast.

if you manaage it properly (witha amanager, using non-complete paths, ect) you can pathfind for large amounts of units (100 thousand?) units simultaniously. (quickly too)

Its also pretty simple to understand.

From,
Nice coder

##### Share on other sites
Ok...can anyone give some examples of other algorithms, names is enough...can google for it then =)

Feels like A* now...but we'll see.

##### Share on other sites
One PacMan AI that I've seen which was actually very impressive in its simplicity and effectiveness was to move toward the player X% of the time and in a random direction (100-X)% of the time. Each ghost had a slightly different fraction of moving toward the player, and X became closer to 100% as you moved up the levels.

-Kirk

##### Share on other sites
Quote:
 Original post by walleOk...can anyone give some examples of other algorithms, names is enough...can google for it then =)

Of course.. A (the parent of A*), bi-directional A and A*, breadth-first, bi-directional breadth-first, Dijkstra’s algorithm, depth-first and iterative-deepening depth-first just to name a few. There are of course many many others and obviously a numerous number of variants for any of them (normally you would adapt them to your needs - for speed and efficiency).

1. 1
Rutin
38
2. 2
3. 3
4. 4
5. 5

• 12
• 15
• 12
• 14
• 9
• ### Forum Statistics

• Total Topics
633354
• Total Posts
3011493
• ### Who's Online (See full list)

There are no registered users currently online

×