Hello!
I am publishing my first Code Battle.Mrocza beat me to being the first to post one, but it turns out that I win with his one.
Can't wait for more submissions to compete against or Mrocza updating.
Surely we aren't the only ones interested? I can think of a few strategies worth trying, but there is no one to try them against.

NohusBattle – Version 1

Available here: NohusBattle_v1_release.txt – Copy and paste into the game, Colobot won't open this file, which is in fact interesting.

Works on both the Blue and the Red team

This program aims to win by attacking the enemy faster than the enemy can attack.
The WingedShooters it creates are programmed in a horrible way and would probably lose any fight, so everything really depends on them being the first to attack.
They like taking a bath in the river all the time.

Wow you must have seen this code as a challenge. : P
Can't believe you took the time to name all the variables. I like the "powerSet" function, took me a while to see that it's my "scaleValue", totally different interpretation. : D
You win the original: NohusBattle_v1.txt

The point was to prevent random people from basing their submissions on mine, as I had too much time on my hands between lectures. But well, now you posted a clear version anyway.
I assumed that if someone can take the effort to fix my code, they can take the effort to write their own code. You did both...

I tried abs() with some data type that didn't work and assumed it didn't exist. Then I found out it's supposed to be a float, but I already had my own.

You do something like turn-motor-turn while turn-move-turn is a bit more effective and reliable on high simulation speed. Motor driven locomotion is a good choice only when you actually use it to turn the bot. That smooths the motion and gives you a few additional seconds. Just imagine if goto() was using motor instead of turn-move.

I had a motor driven locomotion in my battle program but it lacked necessary precision so I've switched it to turn-move-turn. Hitting the exact spot with move is easy but when it comes to motor it's more of a struggle.

When someone copies a part of your code and posts it you can clearly see they did that.

Initially I did turns with motor too, as you can see commented out in my code, but as you know, this doesn't work good with time acceleration. I might want to benchmark a turn/move version against motor/motor on 1x speed and see what happens. The precision is certainly lost with motor on time acceleration.

(10-23-2015, 07:48 AM)Mrocza Wrote: When someone copies a part of your code and posts it you can clearly see they did that.