Basically what the AI does is "crawl" along a basic ruleset given by the programmer. I add things such as misfourtunes and calamaties and the AI randomly tries things to escape the bad states. It keeps a count of failures and successes, and then rules out the things that fail and weight the rest as being good or not. The skinny is that it learns what not to do and what to do for a given state.

The -1's you see are "disabled" nodes, they never fire. It takes 5 failures for a node to be deactivated.

The others are the weights, which is 1/3rd the actual success rate of that node for leaving the state. When picking between successful actions the bot makes a random number that is the sum of all the weights + 1 each weight. The bot then uses that random number as a "slider", so to speak, to choose the right action. For example(refer to the screenshot):
The sum of "Normal" actions + 1x4 is 22 (-1's aren't factored).
Let's say the random number is 8.

The action is Normal_Jump. Here's why.

The range for Normal_Move is 1..3 (weight + 1), the range for Normal_Jump is 4..12 and so on. So ranked by fitness the bigger the weight, the bigger the chance of the node being picked.

So if you were to add a state, you'd (with this code specifically) name it and specify the actions that make it possible to escape that state. As I said it was a blind shot for me and I cut many corners, so it's 90% hardcoded in the definitions.

QUICK FYI: The Bot State shows the current state, not the one that the action was previously based on. So if it says "Hurt" yet it successfully did nothing (weighted -1) then you know that it was in either Normal/Moving, not actually hurt the previous state.