I know the title of the question is a bit vague but bear with me here is the problem, every time I write a game or a bot for a game I use a state machine, decision tree or a behavior tree. The problem with these techniques is that they require that I pre-program all the conditions that character/bot is gonna encounter so anytime the user does something unexpected that I did not put a condition for they lose.
Right now I am working on a starcraft bot (bwapi), using state machines I am thinking of using a single state machine for each unit and one master commanding soldiers what to do, but it still requires I pre-program ever thing and for a game like starcraft it is impossible, the only way I can think of I can make it learn is to use GP to evolve these state machines.
Say there is a bridge on the map if 20 marines try to go through the bridge at the same time there will be a big traffic jam which techniques I can use so that it can learn from a mistake? so I don't have to preprogram a condition that says go through the bridge one by one.
EDIT: Just because a question has the words starcraft or bot in it, it does not automatically make it non SO question this question also applies to robotics.