Code Battle League – Nohus - Printable Version +- Colobot Forum - International Colobot Community (https://colobot.info/forum) +-- Forum: [Archive] New forum (2015-2019) (https://colobot.info/forum/forumdisplay.php?fid=76) +--- Forum: Colobot: Gold Edition Basics (https://colobot.info/forum/forumdisplay.php?fid=58) +---- Forum: Workshop (https://colobot.info/forum/forumdisplay.php?fid=60) +---- Thread: Code Battle League – Nohus (/showthread.php?tid=690) |
Code Battle League – Nohus - Nohus - 10-20-2015 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
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? RE: Code Battle League – Nohus - Mrocza - 10-21-2015 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? RE: Code Battle League – Nohus - Nohus - 10-21-2015 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. RE: Code Battle League – Nohus - Mrocza - 10-23-2015 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. RE: Code Battle League – Nohus - Nohus - 10-23-2015 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. : ) |