Originally Posted by Adam Ryland
November 2nd: The Match Engine
Given that the WMMA competition has shown some of the match output, I thought I'd write a little bit about how the matches are constructed.
One of the things I disliked about existing MMA match simulators is that they appeared to be just a collection of moves. Fighter A does a punch ... Fighter B does a kick .... Fighter A does a takedown. Other than whether the two fighters were standing or on the ground, there never appeared to be any sort of flow to the fight. That is something I don't like, as I think MMA matches are about the flow far more than they are about the individual strikes \ grapples.
Therefore, the WMMA engine works by dividing the match into two; Categories and Scripts.
The first stage is to decide the categories, which are done by round. A detailed statistical analysis is done of the fighters to decide their approach, their strengths and weaknesses, etc. Each round's outcome is then calculated to be in one of several categories. These are essentially titles; "A dominates B on the ground", "A wins the round by using superior wrestling", "B takes the match to the ground, but cannot do any significant damage", "A knocks out B with a single strike", etc.
The second stage is to then flesh out the round; this is done by taking a script from the category it was assigned. A script is a (semi) pre-determined write-up of what happened, usually a paragraph or two. There are hundreds of scripts, and the one that is chosen is based both on the category and on the fighters in particular. Taking the "A wins the round by using superior wrestling" category for example, there may be 25 different scripts within it, however, 10 of them may be eliminated from selection because fighter A does not have the ability to takedown B. The remaining 15 scripts may therefore be based upon A keeping B pinned to the cage \ ropes (as Tim Sylvia recently did to Brandon Vera for example).
Each script is not entirely pre-determined, as parts may change based upon the people involved. For example, the script for a "one strike KO" may be changed slightly to a kick or a punch depending on what fighter A's particular strength is.
Once the scripts have been picked, they are then generated into output which is shown to the reader.
This system allows the match to flow in a realistic manner, while still reflecting the fighting style of the fighters involved.
There is also the advantage that scripts are fairly easy to code, and so more and more can be added as time progresses, making repetition less and less common. (To answer the obvious question, no, users cannot write their own scripts, this was not possible. New scripts can only be written by me.) New scripts could be added either to specifically stop a certain piece of text being repeated too much, or to reflect a real-life moment that has happened.