Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

PsYcHoPrOg

Fighter AI

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been working on a fighter for a while, and I''ve finally got to doing the AI. I know this question is a bit general, but are there any suggestions? "Remember, I''m the monkey, and you''re the cheese grater. So no messing around." -Grand Theft Auto, London "It''s not whether I win or lose, as long as I piss you off" -Morrigan, Super Puzzle Fighter II Turbo

Share this post


Link to post
Share on other sites
Advertisement
I''ve done a fighter, if by fighter you mean a beatemup. The way to do the ai is quite simple, an fsm + a pattern machine will suffice. The fsm may not be necessary, but if you want your enemies not to mindlessly fight to the death it will be useful, and it will give you other options such as being able to block, etc. Most fighters of these days, such as street fighter or mortal kombat use patterns of moves, which may or may not be combos, to use against player characters. Where the ai gets these patterns from is a separate issue. One way is obviously to preprogram them. Another good way is to watch what the player does - if the player is using a particularly successful pattern, why not steal &| modify it? That''s how I did it anyway
r.

"The mere thought hadn''t even begun to speculate about the slightest possibility of traversing the eternal wasteland that is my mind..."

Share this post


Link to post
Share on other sites
Assuming you mean something like Street Fighter, etc, I''d think that, at a top level, it''s a function where your basic inputs are Distance From Enemy and Behaviour of Enemy. Each move (or combination of moves, depending on whether you implement combinations as single moves as far as the AI is concerned) will have some properties that define its effectiveness. For example, in a karate game, you might have a flying/jumping kick move, and that move would be marked as unsuitable vs. crouching opponents. So, each time you want to calculate what the AI should be doing, you run through the list of moves, and compare each one for suitability. At the end, you''ll have a list of candidate moves and can pick one of them, either at random, or with some sort of suitability score, whatever.

Variations might include using genetic algorithms to progressively teach the AI which of the suitable moves are most effective in certain situations, learning patterns from human opponents, or matching up specific action/reaction pairs that work well.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!