Finished #64, C++ - GA
Intro
First of, thanks a lot to the 4 creators and to CodinGames for hosting such fun and interesting contests (as always)
I’m used to do spaghetti ifs in C# with my best friend Linq, but wanted to try what pros do : c++ and simulation.
This contest was perfect for this: I don’t think I would have had fun with C# heuristics, compared to something like GitC, where heuristics were way easier, because no collisions and much more “units”
I had 0 previous knowledge with Sim/GA (I’ve never played CSB for example) so it was quite long and hard for me to setup a working simulation + GA in C++ within 10 days (got a job, not living alone, barely haven’t done any C++ in years)
So when it started working, I had a blast (not directly commanding through ifs, and seeing units doing smart moves is awesome). For this, I’d like to thank ZarthaxX for his help with GA, and others on the chat.
Strategy
My strategy was quite simple, my eval function using common parameters already mentionned several times before, so i’ll do that quick:
- Depth 3
- Additionnal weight for each depth (same ratio between depths)
- A function determining who is the opponent I target (#2 if I’m #1 or #3, #1 if I’m #2), used in Evaluation Score and below.
- Ga ran for 2/4 ms on opponents to avoid using dummy moves (the 4 seconds being the opponent I target, and done with moves found for the second less important opponent)
I’ve disabled TAR spell since my reaper was randomly putting that on the ground. Maybe it was useful (I like to tell myself this xD), but I couldn’t tell by watching replays,
and it was eating a lot of rage I prefered to spend on avoiding enemies to collect water. Sometimes it would use grenades as well, didn’t have the time to really validate it was useful (let’s say it was)
The main issue I faced was to have my sim + GA working less than 24h before the end of the contest, so no time to setup a proper environnement to tweak parameters and adjust them correctly. (+ no experience with that)
Plus, during the last 24h, A LOT of players did A LOT of submits, which slowed manual submits/tests even more.
What I think of the design (for Magus who asked)
-
First, I found it quite “messy”, especially when I had a look at games in bronze with full rules. I found it quite hard to explain to random people (like my girlfriend), compared to something like CotC.
But after a while I got used to it. -
I think it was not so easy for a noob (I find not so easy to just address the destination issue, using velocity and stuff).
My brother who is not really good at coding liked it though… until he quit because he couldn’t improve his AI, quite early. His ranking is around #1050 -
The 1v1v1 format is … special, makes it even harder to tweak parameters and make sure your AI improves. But hey, it’s the same for everyone, it’s quite fun to watch and it adds an extra layer of strategy. So I’d say it’s a +
-
The design looks like CSB: collisions, angles, speed, small number of vehicules… (at least in my eyes, but once again, I haven’t really done anything on the CSB contest, so I might have missed huge difference).
IMO it makes people who worked a lot on CSB (and AFAIK, it’s the “main” multi played outside contests periods) quite good right away (but hey, the worked for it right? :p)
I say I’d prefer contests where it’s less obvious to know how to handle things (like C4L, GitC, where you can’t just plug a global GA)
Conclusion
Anyway, I’m really glad I tried hard on this one, learning way more than on any previous contest I’ve partipated in (even those where my final ranking was higher)
Congratz to everyone who learned something during this contest!
I really hope those contests will still occur on a regular basis.
Oh, and last thing: thank you reCurse for letting me the #1 Canada spot. (DN38416 / Chalzy were close !)