YesNoOk
avatar

Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?) (Read 4635 times)

Started by dArwIn_G, October 28, 2017, 09:33:59 pm
Share this topic:
Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?)
#1  October 28, 2017, 09:33:59 pm
  • avatar
    • South Africa
Hey MFG!

I'm working on a project that involves using genetic algorithms to try and create a set of reasonably good AI characters for MUGEN.

My current implementation involves using the original KFM and his moves as a base template to create new individuals for each generation. These new individuals contain all of KFM's movies however, the triggers and their values, for each of these moves are different. Each move for a new individual can contain between 1 and 4 triggers (of the same trigger type ie. trigger1=x; trigger1=y; trigger1=z;), which are randomly selected from a predefined list of triggers with a predefined list of allowed arguments.
 
This is where I could use some help from someone who has some experience with creating AI in MUGEN.
 
The current set of triggers that i'm using consists of the following 7 triggers and their allowed list of argument values:

('Trigger'  :  'Allowed Args')
  • 'P2BodyDist x '  :  '>= 0' or '< 30' or '< 120'
  • 'P2BodyDist y '  :  '< -30' or '> 10' or '> 60'
  • 'InGuardDist '  :  '= 0' or '= 1'
  • 'P2MoveType '  :  '= A' or '= I' or '= H'
  • 'P2StateType '  :  '= S' or '= C' or '= A'
  • 'MoveContact '  :  '= 0 ' or '!= 0'
  • 'MoveGuarded '  :  '= 0' or '!= 0'

I got these triggers from this paper (http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=7792145), which my project is based on. And the arguments were chosen using a version of trial and error.

Now, while these triggers and arguments allow the implementation to improve over time, I can't help but wonder if adding, replacing or removing some of these triggers and arguments might produce even better results?


Here are some links to see it in action:
Some things to note: Each match is a single 20 second round between the AI of the characters. None of the characters win by K.O in the videos above (although evilken usually does).  The character dArwIn_G57_3a  was produced by evolving the system for around 80 generations. And he looks exactly like KFM because, he basically is KFM. Except for the way his moves are ordered and how those moves are triggered.

Given my extremely limited experience with MUGEN and the fact that they have over 130 of these triggers, I could really use some help with coming up with a solid set of triggers and arguments for the AI characters to use and kick ass with.

Any help is appreciated!
Re: Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?)
#2  April 22, 2019, 03:39:09 am
  • avatar
    • USA
Hello, I too am working on such a project concerning the implementation of a genetic algorithm and testing its abilities on conventional AI. I have looked at both the article in question and the series of triggers that were found in the reference guide. If possible, could you enlighten me on how you were able to properly set up such an AI within the CMD file and how to correctly add these triggers into the file. I would appreciate it if you would offer assistance in the process of generating the valid characters and setups. 
Re: Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?)
#3  April 22, 2019, 04:52:54 pm
  • ******
  • [E]
    • Mexico
Nice; I never tough of evolving the AI outside of mugen and using the triggers as the model.

I have not touched mugen in a while, so I don0't know if p2stateno exists tho I remember using something like enemynear(0),stateno; but that might add too much variation if used in a pure numeric form; maybe using it as ranges especialyl because some ranges are relatively standarized.
Re: Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?)
#4  April 22, 2019, 05:50:59 pm
  • *****
  • Formerly known as HyperClawManiac
  • Competitive MUGEN when?
    • UK
    • sites.google.com/view/ragingrowen/home

  • Online
I've actually been thinking about this one.
I feel it would help create AIs that can whoop your bum by recording and analyzing inputs between you and the AI.
WIP Schedule:
The next Street Fighter All-Stars update
Re: Generating AI for MUGEN using Genetic Algorithms and KFM (Help with triggers?)
#5  April 23, 2019, 02:27:36 am
  • ****
  • Hey four stars, whatever that means
    • Canada
    • amidweiz.neocities.org
Nice; I never tough of evolving the AI outside of mugen and using the triggers as the model.

I have not touched mugen in a while, so I don0't know if p2stateno exists tho I remember using something like enemynear(0),stateno; but that might add too much variation if used in a pure numeric form; maybe using it as ranges especialyl because some ranges are relatively standarized.

yea p2stateno exists. I do hope this project goes well, just curious what language you are using to generate the self learning AI dArwIn_G?