The goal of this topic is to create a much better AI for A4 with the help of the templates.
And I'm not just going to ask for some code, because I'm having a good start yet and I hope other guys will help me to make an even better AI. At first I shall tell you guys what you have to change to fix the bugs in the newest A4 war.wdl:

- In state_attack, change
"MY._COUNTER = 16 + RANDOM(32);" in
"MY._COUNTER = -8 + RANDOM(-16);"
and change
"while(MY._COUNTER > 0) { wait(1); }" in
"while(MY._COUNTER < 0) { wait(1); }"
- In attack_approach change
"while((MY._STATE == _STATE_ATTACK) && (MY._COUNTER > 0))" in
"while((MY._STATE == _STATE_ATTACK) && (MY._COUNTER < 0))" and change
"MY._TARGET_PAN = MY_ANGLE.PAN - 15 + RANDOM(30);" in
"MY._TARGET_PAN = MY_ANGLE.PAN;" and change
"MY._COUNTER -= TIME;" in
"MY._COUNTER += TIME;"
- Put "my._counter = 0;" in state_hunt, before the while loop

Jokester999 said there were more bugs, I hope he wants to tell us which and how we can solve them.

Next time I will tell you about my advanced state_hunt.