Sign in to follow this  

Fighting Game AI

This topic is 4354 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

The simplest would be a weighted system, basically fighting sprite guy makes a list of all possible moves and then goes over several rules that add or subtract from the weight, like if a option hurt the opponent +5, if it leaves the sprite vulnerable -1, if it keep it from getting hurt +3. Then take some of the ones with the higher weight (better choices) and randomly chooses one, this step makes it so you sprite wont always choose the best choice but still a good one so its unpredictable but not random. With this you can adjust how much weight is put on each rule to choose style and how smart or random your sprite will be.
A neural network is another option; it would be more complex but could be interesting.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kaze
A neural network is another option; it would be more complex but could be interesting.


It shouldn't be too difficult, since a 2d fighting game has complete information, no randomness, very little planning and above all very cheap, meaningful and tractable AI inputs and outputs.
Inputs can be (for each character) 2D position, pose/state (e.g crouching), hit points (important to choose a final blow) and "energy" meters;outputs are a small set of discrete moves (possibly the same keypress commands the player uses): jump up, leap forward, turn, walk, dash, various attacks...

The NN can be blindly evolved, with no assumption other than left/right symmetry: in matches between humans their actions can be recorded (this feature would also useful for action replays) and used as training objectives; ensembles of initially random networks can be trained by fighting between each other and against humans; the AI for one character can be used as a starting point for the AI of another.
Different strengths of AI can be obtained by taking stronger or weaker specimens from a population of different neural networks.

Lorenzo Gatti

Share this post


Link to post
Share on other sites
Firstly you should have a good FSM system in place for your fighting system. You could use one of the free FSM generaters available on the internet. The FSM generater also exports the entire FSM state machine in JAVA/C++ code. Once this system is set, then you must start with your AI part. The AI can be broken into different states , action, style, balance. When the AI is set to action state, it will see to it that the AI is always in attack mode. When the AI is set to style state, it will see to it that the AI is representing the characteristics of the character. So character specific styles can be seen. When the AI is set to balance state, it will see to it that the AI is balances the other two states. This will see to it that the AI is not too aggressive nor too defensive.
Also a complete weighting system must also be in place with regards to scoring. One could divide the characters into different parameters like agility, strength, charisma, etc. One could then use this for calculating the hurt scoring mechanism. I hope this helps :-)

Share this post


Link to post
Share on other sites
Didn't Street Fighter 2 use attack patterns? The patterns were very noticable. Like Ken doing a hurricane kick into a dragon punch a few times in a row. And him jumping back and forth trying to get you to attack him. Things like that.

Share this post


Link to post
Share on other sites

This topic is 4354 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.

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