Nice find. What a convoluted way to compute the score…
I’m not sure why I’m losing some matches when the score clearly show I won:
Can you please check why at Step 17, drone with Id 2 doesn’t see ugly fish with id 21?
The distance between them is 951.
As I understand, Normal Light is 800, but Uglies can bee seen at +300 = 1100, is this correct or I’m I missing something?
Thanks!
crash/timeout
Hello,
I get this bug when I try to run the Fall2023Main (getted on GitHub - CodinGame/FallChallenge2023-SeabedSecurity: https://www.codingame.com/contests/fall-challenge-2023) locally!
Error: [$injector:nomod] Module 'player' is not available!
What do I miss?
Thanks.
Hello,
In some games, when a drone is <500u from the surface, the drone will only save its scans.
But sometimes that drone can save the scans of another drone not 500u from the surface.
In this replay, the green crab (id 14) is scanned by drone 3 in turn 61, it is saved on the surface by drone 1 (same team) in turn 67.
What is also strange is that in the UI you can see that the green crab was scanned by drone 3, and drone 1 only has a pink crab.
Is this a bug?
Maybe it is caused by the negative x-axis output of drone 3 when drone 1 reaches the surface?
Hey!
I think what’s happening here is:
- The Drone 1 save its scans (The pink crab)
- The referee decide it’s game over since you can’t catch back the score of your opponent.
- All the scans remaining in the drones are saved (including the green crab) for the final score calculus.
You mean this code?
double snapped = (random.nextInt() * 7) * Math.PI / 4;
Vector direction = new Vector(Math.cos(snapped), Math.sin(snapped));
If so, I also don’t get why this is done in such a weird way. Why not use Math.random() * 2 * Math.PI;
?
EDIT: I see, that’s not what the Referee code does. It effectively creates only 8 different directions… Still a bit weird to do it in such a convoluted way, right?
You need to once:
- delete the file
src/main/resources/view/package-lock.json
(it contains links to artifacts that are behind Codingame’s proxy) - run
npm install
insrc/main/resources/view
(this will download and install required Node.js dependencies innode_modules
) - run
npm start
(i.e.tsc -w
as defined inpackage.json
, this compiles the Typescript files to Javascript)
Now you have the javascript files available.
What did Silver League add? I didn’t see anything new when we got promoted.
Silver, gold, and legend leagues just add a new bot (picked from the leaderboard I think) that acts as the barrier to entry into the league. If you’re already better than it nothing will change.
Well that is sad. Last time I did one of these, things were even added when we went to legend league. I guess that means I need to do better since this is the games final form eh?
Hi, there is a “bug” for collision in getCollision
function, ugly can attack on the spawn (inside border) because snapToUglyZone
was forgotten on speed vector. The function use the vector speed before snapToUglyZone
instead the new vector after snapToUglyZone
change (that mean the vector y can be between 2000 and 2500).
Instead of :
double vx2 = ugly.getSpeed().getX() - drone.getSpeed().getX();
double vx2 = ugly.getSpeed().getY() - drone.getSpeed().getY();
Should be something like :
double vx2 = (snapToUglyZone(ugly.pos.add(ugly.getSpeed())).getX() - ugly.pos.getX()) - drone.getSpeed().getX();
double vx2 = (snapToUglyZone(ugly.pos.add(ugly.getSpeed())).getY() - ugly.pos.getY()) - drone.getSpeed().getY();
Hey.
The ugly speed used here is computed during the previous turn and already takes into account the borders of the uglies territory.
That true if you stay inside the spawn, but not if you are leaving the spawn. When it will compute the two position current (in the spawn) and destination (outside the spawn), it will use the old speed vector (without snapToUglyZone
) and the ugly will get a farther range.
If you read moveEntites function you will see that snapToUglyZone
is never used for getCollision
, only for ugly.pos = ugly.pos.add(ugly.speed);
.
Ah yeah, I see what you mean. But I don’t know if we can call it a bug, since it’s indicated into the code… The developpers clearly left it as it was on purpose.
Unlikely, CG did not even contact t-shirt winners of the previous contest
I believe you can see it in action here: Coding Games and Programming Challenges to Code Better (top right corner, turn 35). Looks like a bug to me, since my drone never comes within the 500 range to cause emergency mode.
not a bug, you might be confused by the fact that the monster can’t move above y=2500, but whether the collision happens or not is decided by entities’ velocity (as written in the statement), not their positions after they move
Initialization Input
First line: creatureCount an integer for the number of creatures in the game zone. Will always be 12.
This line in the Game Protocol seems to be wrong. The creatureCount variable is 12 + “number of monsters”. It’s kind of obvious when reading on but should be corrected for the leagues with monsters.