Hello everyone,
Ranked 2nd.
It was more interesting then I though after seeing that it was similar to Code Busters event. I didnât really participated in this previous event, so I was not able to take a previous code.
I have to admit that winning the PS5 was interesting me. Thatâs why I spent a lot of time on this contest.
Like nearly everybody else, my code was a huge bunch of if/else.
FIRST RUSH
My first rush between the beginning of the contest and Saturday night, not bad because I reached 2nd place.
I think I wonât be able to remember everything that I code. Here are some few:
- If possible, bring back ghost with 40 stamina before BUST
- STUN only when useful (catcher having or going to take a ghost, hunter if stamina>10 and no ghost with low stamina near the opponent catcher)
- Better management of bringing back a ghost (if an opponent is near, be as close as possible)
BREAK
Then break until Tuesday night due to an important personal thing to prepare (not compatible with sleeping few hours due to the contest). Even with this break, I was still in the top10.
SECOND RUSH
On Thursday night, I was able to reach top 1 \o/ and keep it nearly until Saturday night (pb4 posted nearly equals to me on Saturday, then became clearly stronger during the night). During these few days, it was just a frustration. I was still having many ideas, but none of them were helping me ><â. It was similar or even worse according to tests performed with CGBenchmark.
- Seeing if I can steal an opponent ghost. SAME RESULT
- Being better placed when waiting for a ghost to be at stamina 0. SAME RESULT
- Reach my hunter when the stamina remaining and my distance to the ghost match. SAME RESULT
- If waiting with hunter, stay enough far to not allow my opponent to see the busted ghost. SAME RESULT
I still donât understand why all of this was leading to an IA with similar results as the one posted
LUCKY IMPROVEMENT
I finally decided to stop doing my âTODO listâ, watch more replay and try to see something improvable.
I performed a small modification: when a ghost was going outside my view, I admitted he was just nearby at a calculated spot. But when my opponent was STUNing my catcher, and making the ghost going more far, I wasnât able to find him. For me, if the ghost was not in the âsupposedâ place, he was in its initial position, which was not true too⌠He was just a little more far! And thatâs how I was giving ghost with 0 stamina to my opponentâŚ
So I coded something to try to go further once âjust in caseâ if not seen in the calculated spot. It was between 3 a.m and 5 a.m in the Saturday night⌠(that late in the night is already Sunday ^^)
I wasnât home during Sunday, but I launched CGBench to test it. When coming back home. I saw that it significantly improved score . It is my last and posted version around 20p.m.
WAR
I was having many ideas on being super aggressive and try to fight a lot with opponent on ghost. But there was some behavior/bug that stopped me.
- The barycenter when several busters were at the same ghost position was truncated. Which means that the red player was having a huuuuuge advantage (I let you do the math, but truncate would always lead to something good for red when busters are fighting for it at a distance of 1).
- The hunter would still be able to stun the ghost even with stamina 0. This would avoid the ghost to move. Hard to see and could be dangerous
- Bug: I have been able to see two busters on the same spot. Letâs take (400, 400) as example; and ghost on (401, 400). Expecting it to be on (801, 400) on the next turn. But it ended on (1, 400). So going on the opposite way XD. I still havenât been able to understand why.
CGBenchmark
Thanks to pb4, it is the first time that I use CGBenchmark, and I have to admit that it is so useful!
- Debug Ă In this contest with deterministic IA, you could create a new functionality with an assert in it. You launch CGB, at the first crash of your bot, you have found a game where you can try and debug this functionality. Moreover, you can let CGB turn to saw how frequently it will be call by counting the number of game leading to a crash.
- Knowing what seens to be better (coeff, functionality activedâŚ). I have a family, and it is hard to code before 22p.m. So, when you canât code, you launch it on different versions and it will provide you useful data =).
THE END
The last 5 hours of the contest were incredible. So much pressure seeing so much top10 submitting code. Still, I was at a comfortable 2nd position 30min before the end.
And then⌠Daporan makes its entrance. The first submit was scaring. I was using CGB against him and was having around 35% of win⌠pb4 told me it was around 40% for him. We thought we were doomed. BUT, he was not that good against the other player in the top10. He finished 3rd after its 1st commit.
Few minutes before the end, he submitted again expecting to be more lucky. And he was⌠He was still having around 65% against me (so not lucky, not unlucky according to CGB). But against pb4 he was super lucky. Something around 75% of win. Thatâs what leads us to him first, and pb4 going below me. Unexpected and lucky O_O.
To be honest, even if allowed to hide your bot during the entire contest, for me it is not fairplay.
Improvements
Not having a rerun at the end was really bad. Few matches with a close top players could leads to lucky ending like it happened. For me pb4 should be first. Daporan and me really close for the 2nd place.
Suspense
What will I win? Daporan is Belgian. I donât know if he is living in France or not⌠If not, I hope he will not fake it.
.
Thanks a lot Codingame and Sopra for the contest. I enjoyed it (even if my sleep account was terrible thanks to it XD). I havenât been able to see many streams, but thanks also to Neumann and jfaixo, it was nice from you to do it :).
See you in the next contest!