OK, I did finally get to the part of the game where, if I have the Expert interface enabled, it will tell me what the rules of the game are.
Two more questions/issues:
in terms of the weight (as changed by SHIELD), does that only have an effect on collisions? or does weight also play a role in the movement “momentum”, e.g. if I SHIELD, I will slow down faster? the way I’m reading it, it’s collisions only - since the slowdown is listed as a constant friction multiplier, but it’s not 100% clear
this is probably more for arena game mechanics in general, but a weird thing happened to me: I wrote some code while in the Bronze league, submitted it (several times, actually, because I usually did not wait for all the combat pairs to play out until I wanted to iterate on the code), got confirmation that I was going to be “promoted” to Silver league in an hour or so, and went to sleep. When I woke up, I actually had notifications that I was promoted twice - apparently I beat Silver league with my Bronze league code!
Which is cool, but the downside of that is that I didn’t get to practice the shield mechanic before having to deal with 4 ships on the screen.
Agreed. It was a little unclear in the instructions for gold about “your pod”, not “both of your pods”.
I wonder if you can earn codinpoints for editing instructions.
Hey guys I have a basic question for understanding the turning mechanism.
When the bot reach a checkpoint, and is going to move to the next one, normally it needs to change the direction.
During this turning process, I wonder if there is a default acceleration (not thrust), that change the bot’s direction?
Because if thrust is the only acceleration during the whole race, then it is impossible for the bot to turn(Newton’s second law of motion). LOL
Consider that your pod uses some kind of thrust vectoring. If you rotate your thruster in a different direction than your velocity, your pod will turn accordingly.
To be honest, since you can change your thruster direction without any actual thrust, the “real” mechanism should probably be a pair of directional thrusters producing a torque to rotate the pod. It would have been a bit complex hovewer. Maybe a potential Mars Lander IV?
Hi, I’m fairly new to codingame, and had what may be a basic question. When printing debug messages during a race, I’m only seeing the most recent message. Is there a way to capture all of the debug output during a race and save it to a file for analysis?
I don’t understand how the forcefield can trigger with a distance of 1100 units between the opponent and I when the radius of the forcefield is only 400. (I can see in debug mode that the 2 cercles don’t even touch each other…) Its seems to depend on the relative speed of the pod. Decision making of activating the SHIELD is quite messy because of that…
I don’t understand the synchronization of CSB. I keep lagging behind on data. As a result I’m not properly detecting collisions and have to use ‘predict’ next turn’s velocity (which is often wrong).
To demonstrate this I’ve slightly modified the DEFAULT C# code (shown at the bottom). Then I play the game in debug mode. I took a screenshot: if you look at the coordinates, they lag behind one turn already at turn 2:
using System;
using System.IO;
class Player
{
static void Main(string[] args)
{
Console.Error.WriteLine(Console.ReadLine());
int checkpointCount = int.Parse(Console.ReadLine());
Console.Error.WriteLine(checkpointCount);
for (int i = 0; i < checkpointCount; i++)
{
Console.Error.WriteLine(Console.ReadLine());
}
while (true)
{
for (int i = 0; i < 4; i++)
{
Console.Error.WriteLine(Console.ReadLine());
}
Console.WriteLine("8000 4500 100");
Console.WriteLine("8000 4500 100");
}
}
}
Thx thibaud,
I’m realizing my mistake. the next position is not determined my your current velocity, I have to calculate my new velocity and estimate that of the target pod to estimate collision.
Hi, I just arrived in Gold League and was wondering wich kind of algorithm could be worth implementing : Alpha-beta, mcts, genetic … Or are we just supposed to guess wich strategy will play out good (the delay to answer is quite short to learn)? And also, is there some match data archives we can do some machine learning with ? Thanks !
Evolutionary algorithms are what most people are using in Legend… the higher levels of Gold are probably the same. Some have had success with simulated annealing, Monte Carlo, and even minimax.
The start page for each multiplayer has links to the after contest postmortems - on the forums / blog / external sites (eg https://www.codingame.com/multiplayer/bot-programming/coders-strike-back). For older contests like csb these may be slightly out of date, but they’ll always be enough to get legend. For csb the top players are now using minimax.
How should the bot get better?
In the bronze league where collision gets added, how should the bot get better there?
I even implemented a system that remembers the track and calculates the angle at each checkpoint to know how hard it needs to break for the turn, but my bot doesn’t seem to get much better. only about 2000 places and i’m still at the 11000 place.
How are you guys minimaxing? Even reducing the possible moves to say 6/7 and minimaxing in pairs (runner/hunter) I can’t imagine how you can compute more than 2 turns, and that wouldn’t be enough (unless you use a very complex eval function maybe?)