Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code Battle League – Nohus
#1
Star 
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.



Any comments?
#2
You win basically becouse my defence bot is pretty incopetent. If it wasn't I'd have a chance.

Also... I fixed it for you. NohusBattle.txt

There's abs() function in Cbot you know?
My Code Battle League program: MhrodeBattle.txt

Welcome back, Mrocza. You last visited: Sunday, July 7th, 2013, 02:12 pm 
http://imgur.com/L3Y8bQz
#3
Yeah, I will probably lose if you just update your defense bot.

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.
#4
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.
My Code Battle League program: MhrodeBattle.txt

Welcome back, Mrocza. You last visited: Sunday, July 7th, 2013, 02:12 pm 
http://imgur.com/L3Y8bQz
#5
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.

Sure I can, if I really cared I wouldn't post at all. : )


Forum Jump:


Users browsing this thread: 1 Guest(s)