could you please share step guide how to run this locally, sorry i am new to npm
anyone have advice for avoiding uglies? Previously Iāve tried moving in the direct opposite direction and Iāve also tried applying a small repelling force to the target x, y based on their position but both end up with me still colliding with them occasionally. Iāve noticed the Silver AI moves very efficiently around them.
Where are you struggling?
- Ensure you have Node.js installed (Download | Node.js). It will bring
npm
as package manager out of the box. - Navigate to
src/main/resources/view
. - Follow the steps as I already descriped
Yeah. You can ignore it and stick with round().
Shouldnāt Y be 2,275 in step 43?
Game: Coding Games and Programming Challenges to Code Better
Itās unfortunate because I moved the drone in a position where I thought it would be safe, but I ended up in the monster attack range, so no matter how I move next, my drone enters in emergency mode.
I met the same situation, even the creature speed show -225 but the creature canāt go any further than y = 2500.
For y = 2500 :
the collision code does not take into account the snap to map borders
So my drone already has a target in mind before it runs collision checking. It tries that path first and checks the whole path, not just end points given in the turns. If that fails (Comes within 500 of monster) then it tries 1 degree to each side and adds a degree iteratively. Eventually it finds a close path that is still close to my original target. I am sure there is something better but this has gotten me into the 30s a few times as far as placing goes.
Great thanks this is what i was looking for. I was worried this approach may run into the per-turn time limit but I guess Iāll have to try it out. Iāve been working on calculating line-circle intersections and then tangent points, etc. but i think this is overcomplicating things
You probably will. I did. I made a spreadsheet to break down collisions in 600 steps because I was having some odd results and I found out for just a very small step or two out of the 600 steps the collision was resulting a hit. When trying to code this behavior if i put too many steps and too many small angle checks (Going by half degrees, etc) It would fail. Currently with python I am able to check 360 degrees, 1 degree at a time, and am breaking down each turn into 200 steps. This doesnāt time out even with 3 fish chasing both subs at the same time. There are probably smarter and better ways to do it faster, but I had to use numpy. I have found a few cases where I actually needed more than 200 steps or less than a 1 degree angle to find an escape route so it could be handy, I just couldnāt figure it out.
After uglies collide, the speed drops from 270 units to 200 units. I couldnāt find this information in the description. If they collide again, does the speed decrease even more?
Nope. Thatās an error in the referee, where the fishes speed is used instead of the uglies one, but thatās a constant so it will stay 200 even after multiple collisions.
I think it is possible that a drone can still drive without having itās engine on (i.e. sending a WAIT action) if the bottom of the map is reached in a previous turn via a MOVE action. This is due to the conditional logic here:
else if (drone.pos.getY() < HEIGHT - 1) {
Vector sinkVec = new Vector(0, 1).mult(DRONE_SINK_SPEED);
drone.speed = sinkVec;
}
I stumbled upon it while reimplementing the referee logic, because I intuitively left out the else condition and simply asumed a sinking drone if itās not in emergency mode or actively moving.
I am not sure if the observation is really that relevantā¦ But effectively, you can sink to the border of the map, then issue one move action changing only the x-axis and enjoy fearless (type 2) fish afterwards if you only issue Wait actions from there on (while moving with the previous speed vector). Thatās at least not conformant with the spec because āengine onā is tied to the issued actionā¦
There is an error in description of Bronze league and probably above.
It says:
Initialization Input
First line: creatureCount an integer for the number of creatures in the game zone. Will always be 12.
While creatureCount includes monsters, so itās not 12 anymore.
I view on the helper tooltip a speed of monster (13,200) so itās not the 270 speed has write in the documentation
Why ? have you the same issu ? (i have a screenshoot but i can post because iām new userā¦)
The answer was only a few messages above:
Thatās an error in the referee, where the fishes speed is used instead of the uglies one
I am definitely missed some skills about algorithm with decision tree/simulation to make the good decision at y = [6500 ; 7500]. I saw other bots make their decision to: score the point, kill fishs and/or continue to scans.
I got the tree to calculate score depending of actions (scores with drone order and if a fish was killed), I also got simulation of fish positions. But I cannot make the two work together in one algo. I am curious to read your writeups at the end. In general, in challenge, I lake in advanced IA algorithm code to pass legend (also if you have books/articles advices to improve in IA agorithm conception, I will take it ).