From CG community
Jump to navigation Jump to search

faisalam1n: Hey

thibpat: Hello, I'm streaming my progress on Ocean Of Code, focusing on Mine management today!

wlesavo: blasterpoard i cant come up with fight sim, dont know where to start even

AntiSquid: how's your herd immunity everyone?

hkouiorp: can some one help e

eulerscheZahl: yeah, help the irrational constant!

hkouiorp: i am getting the first question correct but when i am moving to the second one the first question is wrong

wlesavo: lol help eulersche zahl

Ifthel: Which questions?

hkouiorp: you guys are so rude

Ifthel: "rude"

hkouiorp: no not you

hkouiorp: the others

hkouiorp: you were kind enough to help me

Ifthel: They weren't rude either, though

hkouiorp: then

hkouiorp: ok first help me then

hkouiorp: lets chat

hkouiorp: in clash of code

Ifthel: No need: Private messaging works in this

AntiSquid: hkouiorp few solutions: don't hard code, you need a general answer, don't play clash, it's a waste of time, do the contest

Ifthel: Anyone know how to get CodinGame to use -wall and treat warnings as errors?

Ifthel: For C++, ofc

Default avatar.png Q12: Do you mean debug?

Ifthel: Talking about compiler flags. Apparently it's possible to get CodinGame to use -O3 with pragmas, wondering if there's something for compile warnings

Ifthel: Alternatively, I'll just test compile on my local machine

eulerscheZahl: you can force -O3 for your own file. but that won't affect STL, e.g. vector will still be slower than it has to me

eulerscheZahl: *has to be

chucknorris: are you sure eulerscheZahl? even if you put the pragma over the #include <vector> in your file ?

darkhorse64: It works for me

MadKnight: yea eulerscheZahl have u tried putting pragma before vector ?

dbdr: feel to #17, resub is #8 at 5% :D

AntiSquid: i have pragma before vector, bot still seems fast considering it does lots of redundant calculations

dbdr: maybe I was hammered by someone spamming. or there are just small differences in the mid ranks

wlesavo: last one

wlesavo: it feels really close

kovi: 5% doesnt matter

dbdr: sure

dbdr: but winning 8/10 would be quite improbable if you are actually worth #17/23, no?

AntiSquid: and someone was saying ladder doesn't get shuffled

AntiSquid: with heavy RPS element of the game, who would have thought ?

dbdr: it's also the influence of last matches when some people submit constantly and others rarely

Default avatar.png WINWINWIN: Crazy hard gold boss in OoC? only 23 in Legend?

Nerchio: it's pretty good :D

eulerscheZahl: no i'm not sure Csipcsirip, just repeating what others said

AntiSquid: WINWINWIN i doubt it's crazy hard also this will stay as a multi for a long time without boss being improved, so better this way

struct: Im not sure how it works

eulerscheZahl: ranking feels random

struct: But I know it isnt true O3

chucknorris: one thing is sure, its much faster if you put the pragma before the std includes

eulerscheZahl: zhmyh almost last for ages, climbed a bit

eulerscheZahl: dropping again now

dbdr: I don't know, I've been moving #8 to #13-ish for a long time. not #3 to #22

eulerscheZahl: it's random, but not THAT random

dbdr: :)

dbdr: imagining a leaderboad with 100 papers, 100 stones and 100 scissors in that order. the ranking would be perfectly stable between the three categories I think :)

dbdr: papers would stay on top because they would nevere play against scissors

Ifthel: chucknorris could it be that CodinGame has includes before your code? It would explain why I'm able to use unordered_map without including it

Ifthel: Would also mean a pragma before the include would be pointless

pb4: lfthul highly improbable

pb4: What are your includes ?

Ifthel: algorithm, iostream, memory, string, vector

wlesavo: WINWINWIN actually around 10, but not the same version, i wonder where would it be placed in legend actually

pb4: only those ?

dbdr: wlesavo you can try :)

dbdr: you have the code

Ifthel: Yep, nothing else. Compiles fine on codingame but I need to include unordered_map when I compile locally

struct: What compiler do you use offline?

struct: locally*

wlesavo: dbdr ok, ill actually submit it

dbdr: :)

Ifthel: llvm (specifically the clang-cl driver)

wlesavo: what day was the legennd?

pb4: lfthel : I'm really curious, can you provide sample code that compiles on cg ?

dbdr: friday evening

Ifthel: Sure, just a sec pb4

eulerscheZahl: keep in mind that CG has different machines to run out code on

Ifthel: Also, with experimentation, it seems that if I don't include <algorithm>, unordered_map is missing

Ifthel: Meaning that codingame does something wacky with algorithm?

dbdr: or uses a different standard version than you?

dbdr: I would hope CG uses the same compilers on all machines

Ifthel: Following compiles fine in codingame:

  1. include <algorithm>

int main() {std::unordered_map<int, int> foo;}

Ifthel: Fails to compile with llvm clang-cl

Ifthel: (using /std:c++latest on clang-cl)

struct: Ifthel seems strange yeah

dbdr: CG uses g++ 9.2.1 mode C++17

struct: Even on you need to include it

Ifthel: Possible that MSVC's algorithm lacks unordered_map while the stdlib on codingame has it

Ifthel: In which case the question is which stdlib codingame uses

dbdr: doesn't the C++ standard specify such things?

pb4: wow

pb4: that's weird

Ifthel: It should specify it, but whether the implementation is compliant is another story :)

pb4: g++ locally doesn't compile that sample code

dbdr: are you testing with C++17?

struct: yeah

struct: They must do something

Ifthel: But why?

Ifthel: The plot thickens...


struct: on tech io I guess the options are different

struct: than on CG

Default avatar.png DanTheMan832: Im a bit overwhelmed by the contest... anyone have any tips on where to start

aCat: track your positions

aCat: i mean visited squares

aCat: make AI that goes to any nonvisited square

aCat: if that's not possible then surface

aCat: that's step zero

Ifthel: Start by having your AI not explode, basically

Default avatar.png DanTheMan832: thanks

aCat: step one - change that so you choose the square to move into the one with the most available cells

dbdr: Ifthel

dbdr: works outside of CG too

aCat: you will get to next league certainly with the latter, not sure about the former

aCat: in higher league you have to start shooting the opponent and tracking his movements at least in basic

Ifthel: dbdr whoa

aCat: have fun, if any problems - just ask here

dbdr: the -std=c++17 was required

Ifthel: Still won't compile with clang-cl /std:c++17 though

Ifthel: This is going to give me nightmares


Default avatar.png shootiz: I'm a bit stuck in the silver league, any ideas on what should I improve guys?

pb4: Looks like it works with gcc9

pb4: and not with gcc8

pb4: on godbolt

Ifthel: Should mention I'm using clang 8.0.1

Ifthel: According to compiler explorer it works in clang 9.0.0

dbdr: wlesavo gold boss ranking #12? almost #10

wlesavo: with quite a few over 50% winrates actually

wlesavo: so there goes my improvements

Ifthel: Same thing happens with vector. It seems that algorithm now includes the containers library. Mystery solved ig

dbdr: gold boss might win the contest at the end :D

wlesavo: oh, didnt notice its 24 now

dbdr: just remove it now, let people change their bots to optimize against each other, and put it back at the last minute :D

dbdr: k4ng0u grats!

dbdr: second Java in legend

aCat: BTW - how it works if both players got 0hp

aCat: who wins?

wlesavo: draw triggered

k4ng0u: thx. Sill impressed how wlesavo got there in Python and keep so many people in gold

darkhorse64: How did you make it ? Mine avoiddance ? Shoot and evade ?

wlesavo: ok, so the gold boss actually landed around 12 :slight_smile:

Nerchio: some of my turns in java show they take >50 seconds and i don't lose

Nerchio: any ideas?

Nerchio: >50 ms

dbdr: :D

dbdr: there is a small grace period

dbdr: but I think it accumtulates over time

dbdr: so 52ms might work a few times, but not every turn

Nerchio: i sometimes have 70+ ^.-

dbdr: would you prefer to lose? ;)

struct: you probably have something wrong

wlesavo: no, its actually possible to have a little more then 50

struct: but 70?

wlesavo: but not consistently

dbdr: calculate the sum of overtime over the whole game

dbdr: how much is it?

Default avatar.png DanTheMan832: guys why is my cursor a yellow flashing rectangle???

Default avatar.png DanTheMan832: how do I fix it

dbdr: DanTheMan832 press Insert?

kovi: insert

Nerchio: 4856 ms over 282 turn game i dont count first round

Nerchio: ~34 ms/turn

Default avatar.png DanTheMan832: thanks

Nerchio: another game 2506 ms over 144 turns so i had 72 turns which is ~34,8 ms/turn

Nerchio: i found 106 ms turn but

Nerchio: somebody told me java on codinggame sometimes takes longer turns because of garbage collection so maybe they take that into account idk

fasil: hy

eulerscheZahl: Nerchio how are you meansuring? after reading the first line of input?

Nerchio: at the beginning of while(true)

eulerscheZahl: congrats k4ng0u

struct: you must read after first input

eulerscheZahl: start the timer after the input or you stop the opponent too

eulerscheZahl: read after input?

pb4: did Nagrarok improve his AI or did he get pushed in legend and is automatically 13th ?

Nerchio: ok if i changed the timer after reading input its much better

Nerchio: and i was testing it on opponent who has a bot in javascript so if i was taking his turn into account obviously it was long :D

Nerchio: now my average turn is ~1ms longest 35

dbdr: it's also the time taken by the referee

Nagrarok: pb4 I got pushed yesterday, and improved a little bit today too

Nagrarok: but was already 15th after push

Nerchio: so obviously my 30 ms turn is when they silence and i have 1200 agents

Nerchio: should be faster in c++ obviously :P

Nerchio: how hard is it to run the game locally?

wlesavo: ok, so there is no difference in rank between golden boss and my current better and improved code :expressionless:

dbdr: Nerchio honestly the easiest might be the code a mini-referee yourself. the rules are simple

dbdr: especially if you trust your bot to output valid actions and don't need to check that

Nerchio: i am going for a trophy the longest messy code

Nerchio: already 1600 lines

Kh4z: xD

wlesavo: nah, you gonna lose

Nerchio: who's the contender

etzl: I can't understand the gravity tumbler problem I mean it's all ok until the map part it says if number is odd width lines of height and if it's even something else but how many # should i put in each line?

735487: XLP I love you )))) I am in legend now

wlesavo: lol +2

wlesavo: grac

XLP: I push you amurushkin & Valdemar in legend (but not me) :pensive:

735487: maybe you have better chances now without us there

Default avatar.png Q12: how to print in javascript without getting to new line? (console.log)

Valdemar: XLP thanks man, it was though legend this time Good look to join us any time soon

pb4: siman :fire:

Default avatar.png DanTheMan832: just to clarify guys does torpedo_cooldown represent the charge

pb4: siman :fire:

pb4: woops sorry

eulerscheZahl: getting crowded in legend :/

Default avatar.png DanTheMan832: @eulerscheZahl does torpedo_cooldown represent how much you have charged it

eulerscheZahl: yes

Default avatar.png DanTheMan832: thanks

wlesavo: nice XLP

Valdemar: XLP welcome to the legend

XLP: ty :grinning:

kovi: grat

Crashterpiece: is there any good way to get the full output stream to a file? it always stops within the debugging

Nerchio: i think only setting up the game locally can help you there

Nerchio: or just limit your debug info

wlesavo: you probably need smth like flush = true

dbdr: if it ends with ... it means it has been cut because if was too long

NormantasStankevicius: Yesterday I went to sleep and forgot to save my code

NormantasStankevicius: F

NormantasStankevicius: Guys, when you decide where to go (when you floodfill)

NormantasStankevicius: do you calculate every possible direction

NormantasStankevicius: how much can you move

NormantasStankevicius: and compare?

Nerchio: kind of

Nerchio: but my flood fill wastes space atm

NormantasStankevicius: Until a certain point of moves?

NormantasStankevicius: cause I am thinking

Nerchio: you can do floodfill on every move it doesnt take much time

NormantasStankevicius: do I have enought time to compare everything on C#

NormantasStankevicius: well

ZarthaxX: c# is quite fast yes, just 4 directions

NormantasStankevicius: I'll test every possible move

NormantasStankevicius: I mean, every turn I want to calculate

NormantasStankevicius: let say I take left

NormantasStankevicius: and how many turns I can take

NormantasStankevicius: till no more space

ZarthaxX: what?

NormantasStankevicius: AKA, every turn calculate the longest possible path

ZarthaxX: it's really hard to calculate the perfect path to fill the grid

ZarthaxX: nah that's quite insane

NormantasStankevicius: With a bit of recursion

ZarthaxX: it's super big you cant bruteforce it

NormantasStankevicius: I have the idea how, but my issue is speed

NormantasStankevicius: well, I might do it till a certain point

NormantasStankevicius: let's say

NormantasStankevicius: up to 10turns

NormantasStankevicius: or less

ZarthaxX: i do depth 9

ZarthaxX: you can try doing that yes

NormantasStankevicius: for now I will try to do every turn, but scale down

NormantasStankevicius: if speed is my issue

NormantasStankevicius: as there is also the calculation of the enemy

ZarthaxX: you wont get to do all the turns till you filled board

NormantasStankevicius: that eats time

NormantasStankevicius: idk, I will try to prolong my path

NormantasStankevicius: as right now

NormantasStankevicius: it's go up down left right

NormantasStankevicius: and do not go

NormantasStankevicius: if the path there is a 1x1 block deadend

NormantasStankevicius: if I have somewhere else to go

ZarthaxX: ah ok yeah

ZarthaxX: space for improvement

NormantasStankevicius: so for now I will try to find the longest path

NormantasStankevicius: with recursion and just scale down

NormantasStankevicius: to fit for speed

ZarthaxX: sounds good

NormantasStankevicius: it should be also possible, as i heard people almost getting to silver with just pathfinding

Default avatar.png DanTheMan832: How do you stop bot from battling

NormantasStankevicius: your or enemy?

Default avatar.png DanTheMan832: mine

NormantasStankevicius: what league?

Default avatar.png DanTheMan832: wood 1:(

NormantasStankevicius: hmm hmmm

NormantasStankevicius: how do you predict the enemy?

Default avatar.png DanTheMan832: I don't yet

Default avatar.png DanTheMan832: I only started today

Default avatar.png DanTheMan832: I just submitted it but now my bot won't stop battling other peoples

Default avatar.png yfprojects: What do you mean by battling?

Default avatar.png DanTheMan832: When I click on last battles it shows tons of battles

Default avatar.png DanTheMan832: I want it to stop starting new ones

Default avatar.png yfprojects: Just submit again

wlesavo: DanTheMan832 it will stop after finishing games that needed to calculate its rank, it shouldnot bother you

Default avatar.png DanTheMan832: ok

Default avatar.png DanTheMan832: can you use more than one ability in a turn. eg torpedo and sonar

Default avatar.png RMuskovets: I tried to write something for the Ocean Code challenge but its somewhat hard and idk what to start from

Default avatar.png RMuskovets: can you plz recommend smth?)

Default avatar.png yfprojects: yes @DanTheMan832

NormantasStankevicius: Start from making the grid

NormantasStankevicius: of the map

NormantasStankevicius: and a basic move

Default avatar.png yfprojects: but you have to use at least one, which doesnt have to be MOVE

aCat: RMuskovets remember visited cells. And go in the direction you do not repeat position. If there is no such possibility - make surface move

Default avatar.png RMuskovets: I mean, I've put down some code that generates a matrix from the map and possible moves list and struggle what to do now

Default avatar.png yfprojects: Tracking

aCat: good start

tobk: At least in the lower leages, it does not really matter where you move. Focus on finding out there the enemy is, then attack when you get close.

NormantasStankevicius: ^

NormantasStankevicius: that is what I did

NormantasStankevicius: and still

NormantasStankevicius: basic tracking

NormantasStankevicius: I left wood 100~

NormantasStankevicius: and got to silver 400~

Default avatar.png RMuskovets: But I only know the sector where the enemy moves and nothing else

tobk: parse the opponents commands and try to find out as much as you can from that. the good thing is: you can reuse this part no matter what's your actual strategy.

Default avatar.png yfprojects: Will your Programm be blocked while opponents turn?

tobk: it's a turn-based game, so yes. you do your turn(s9, then the opponent, then you again, etc.

tobk: *turn(s)

Default avatar.png RMuskovets: Can I skip a turn?

Default avatar.png RMuskovets: e.g. to gather some more data from my opponent

tobk: not really. if you skip, you SURFACE, which hurts you in many ways. also, why skip? just moving around lets you charge your power-ups

Default avatar.png RMuskovets: oh, makes sense

tobk: but it's a good idea not to fire TORPEDOs blindly whenever you can, as those also give away your position (and that of the opponent, *wink*)

tobk: "But I only know the sector where the enemy moves and nothing else" You can know a lot more than that. You see what the enemy did, which direction he moved (and thus where he came from), where he fired a torpedo (and thus where he has to be close to), etc.

Default avatar.png yfprojects: If op moves left, you know that he couldnt have started in the leftmost column

Uljahn: or to the right of any surface

wlesavo: another +1

Default avatar.png yfprojects: wlesavo do you know a good way to run a thread or process UNTIL it gets notified?

hkouiorp: care to help

wlesavo: yfprojects not really, no

Default avatar.png yfprojects: this one hkouiorp

Default avatar.png yfprojects:

Uljahn: or just ask Automaton2000

Automaton2000: but if you want to change my code to get a lot of experience

Default avatar.png yfprojects: Thats how you are thinking Automaton2000

Automaton2000: but might be a good candidate

Default avatar.png yfprojects: maybe

Famout: The more I don't touch my code the better I do o_o since submitting in wood 2, I went to wood 1, then over night went to bronze rank 30, now at rank 3....

Default avatar.png yfprojects: :thumbsup:

Famout: My ship doesn't even fire a torp, just evades... Thanks Codin gods?

Default avatar.png yfprojects: The gold boss seems to go high as well

eulerscheZahl: those who were close to the boss promoted now

wlesavo: yeah, quite a few today

LuckyJ.: Hi guys,

Do you know how to 'collapse all' functions, methods and classes in CodinGame?

Default avatar.png yfprojects: There Emacs or Vim shortcuts

Default avatar.png yfprojects: look at SETTINGS

LuckyJ.: Thx!

Nerchio: using silence before putting a mine is so nasty

Counterbalance: LuckyJ. also see

wlesavo: Nerchio dam, how didnt i think of that one, thx

Nerchio: woops :)

Nerchio: it breaks mine detection pretty much

Default avatar.png yfprojects: Can u prevent getting hit by mines through silencing?

Nerchio: i mean you don't move during the enemy turn so hw?

Nerchio: how

wlesavo: im not sure it worth to keep a mine until you silence, but in my bot there even was no such possibility

Default avatar.png RMuskovets: my bot finally doesn't move to illegal positions =)

Default avatar.png RMuskovets: i'm so happy

Default avatar.png RMuskovets: even does SURFACE when needed

Default avatar.png yfprojects: How long would it take to narrow down opp positions to about 9 if he silences as soon as possible?

aaronshenhao: Lmao why adblocker says 252 blocks for this page

aaronshenhao: That's the highest I've ever seen it

wlesavo: yfprojects it depends

Default avatar.png RMuskovets: i have 0

Default avatar.png RMuskovets: aaronshenhao

wlesavo: on lucky sonars or mine triggers at least

wlesavo: without that you can almost never go below 9 i guess

Default avatar.png yfprojects: But 18 would be ok, actually. Is that possible?

wlesavo: with spam silence i believe yes, especially if opponent doesnot use sonar and with some preventive surfacings

wlesavo: not really a viable strategy though

Default avatar.png yfprojects: Cause Mines dont seem that strong in legend

pb4: they aren't strong because we avoid them

pb4: they don't deal direct damage

wlesavo: kovi

pb4: however, they deal indirect damage by zoning us out of lots of places

pb4: --> mines are strong

wlesavo: but they restrict movements, and eventually deal some damage

Default avatar.png yfprojects: And why dont you avoid opponents?

Default avatar.png RMuskovets: should i add torpedo code before submitting bot to "arena"? it behaves like this now

dbdr: RMuskovets no need to worry, you can submit and improve it later

Default avatar.png RMuskovets: oh, great)

aaronshenhao: Anyone noticed the editor supports multiple cursors o_O

Default avatar.png RMuskovets: looks like nearly every bot i've competed with has no torpedo logic )))

AntiSquid: you're in wood league RMuskovets

Default avatar.png RMuskovets: yeah, ik

AntiSquid: so only dumb bots there, sorry

Default avatar.png RMuskovets: :(

Default avatar.png RMuskovets: but at least ive managed to beat them)

Default avatar.png yfprojects: like mine, he is just moving upwards

wlesavo: Nerchio turned out this silence -> mine can even make some of the top bots to crush, at least before i didnt notice that

Nerchio: :D

Nerchio: glad to hear that

ZarthaxX: crush or crash?

ZarthaxX: lol

Default avatar.png RMuskovets: f*king cpt levine

wlesavo: crash, yeah

AntiSquid: silence->mine as opposed to mine->silence?

wlesavo: y

wlesavo: well not really forcing that yet

Default avatar.png yfprojects: pb4 and wlesavo why arent you avoiding opponents aswell?

pb4: ?

ZarthaxX: lol

wlesavo: it involves long term planning, which i dont have

wlesavo: by long i mean >1 turn

Default avatar.png yfprojects: :smiley:

pb4: other players avoid more than you think I do ?

Default avatar.png yfprojects: no

Default avatar.png yfprojects: You seem to try to elimate causes of death

Default avatar.png yfprojects: which were mines and now are opponents

ZarthaxX: you are wood2 and you already analyzed everything?

ZarthaxX: :thinking:

wlesavo: yfprojects its easy to make situation worse trying to avoid opponent, at least without a good reason

Default avatar.png DEIZ21: hello everyone

Default avatar.png DEIZ21: I am looking for an eclipse plugin which merge several classes into a single file (removing the packages, public in front of the classes ...) to be able to work correctly locally and synchronize with CG .. can connoisseurs tell me one?

Default avatar.png DEIZ21: sorry (google translate :p)

Default avatar.png yfprojects: Thats for merging files

Default avatar.png yfprojects: But it isnt a plugin

Nerchio: it's so discouraging when you end the day worse than you started :(

ZarthaxX: yeah better to just quit right?

eulerscheZahl: summary of my day

Nerchio: i mean in gold there is 300 places so lucky run can land you high and bad run can run you far ;P

Illedan: Hi

ZarthaxX: hi illo

Illedan: Wazzup?

Default avatar.png RMuskovets: Ocean of Code of course)

Default avatar.png DEIZ21: yfprojects thx, doest it watch for directory changes?

Default avatar.png RMuskovets: oh, great, my bot now checks for all possible torpedo positions

Default avatar.png RMuskovets: now to add enemy tracking & firing

Default avatar.png DEIZ21: Ilkledan, does your bot uses simulation process, monte carlo, or GA?

Illedan: I'll keep some secrets for now :)

Default avatar.png DEIZ21: ok, bu if so, plz try to make a presentation on your code without the eval function, it would be very instructive

Default avatar.png DEIZ21: for all codingamers

Illedan: Sure, I'll see what I can do after the contest :)

ZarthaxX: getting top1 illo?

Illedan: I have a big rewrite on the side which I have big hopes for

Illedan: But tomorrow it's back to work and all that :(

Illedan: (still from home though)

Default avatar.png DEIZ21: good luck hope u get the first place !

Illedan: Thx, will try

ZarthaxX: u will have time to code anyway :P

Illedan: ^^

idkhow2codee: Is it possible to write bot as real ai(neural network) here?

eulerscheZahl: only if you ship your own framework and fit it into 100k chars

eulerscheZahl: some even did that

Illedan: There are some posts about it on the forum


idkhow2codee: k thanks I was just curious

tobk: It's weird how random the ranking in Gold seems to be. My bot wanders anywhere between 120th and 180th...

tobk: (at least for that region; in the higher-ups it's probably less random)

ZarthaxX: not really lol

tobk: not weird or not random?

tobk: or in the higher-ups too?

ZarthaxX: it's kind fo random anyway

ZarthaxX: whole contest :P

tobk: so, if the thing runs another month everyone eventually ends up in legend? whoo!

ZarthaxX: i dont think so

ZarthaxX: there is some skill obv but sometimes u cant tell diff between bots

ZarthaxX: like what happened for one to be better than other

ZarthaxX: maybe the opposite happens onanother submit

ZarthaxX: that kind of stuff

k4ng0u: tobk your bot will be particularly good on some kind of maps and bad on others. if you are matched up with ppl doing better than you on your good maps or worse than you on your bad ones it can create a huge uncertainty in your final ranking

eulerscheZahl: and even is you have another month or even longer, most won't take the time. there's another contest starting in early Max

eulerscheZahl: May

eulerscheZahl: my bot is best, when the opponent spawns in a small lake and i'm in the large one. sadly legend bots don't do that anymore :(

ZarthaxX: so u fill nicely

ZarthaxX: lol

k4ng0u: lol

Nerchio: i didn't bother to fix that yet it happens so rarely

Nerchio: i timeoutd gold boss :D

fluxtransistor: I thought @eulerscheZahl was one of the people programming the bots?

fluxtransistor: Or do they just machine learn their own strategy

eulerscheZahl: everyone can program a bot now

tobk: fluxtransistor AFAIK only the Wood bosses are provided by the creators of the game, Bronze and up are selected from among the submissions, so the creator of a game does not necessarily have to end up at the top

Quidome: wow, done my first Rust solution, that was a steep learning curve:)

fluxtransistor: I was a bit confused as I only just began the contest

MadKnight: can u know if enemy lost health from a torpedo or from a mine ?

ZarthaxX: input has enemy health

Quidome: Can also be surface damage

tobk: I think he meant "whether it was a torpedo or a mine"?

Quidome: Nop

tobk: if it's surface damage, you know it from the last orders

Quidome: For that reason i only shoot or trigger :)

Quidome: But, that said, he can also take damage from his own trigger or torpedo

Quidome: :P

tobk: my tracking is pretty good (I think), but still missing a good strategy, i.e. what to do with it

tobk: apart from moving around randomly, avoiding deadends and firing when chances for a hit are good

Quidome: Owning space by laying mines

tobk: sure, particularly in the early game when Idon't know where to torpedo

Nerchio: so torpedo cooldown input returns how much 'energy' you have or?

tobk: also have very basic mine detection, but breaks down at silence (and not sure I want to do the refactoring that would be necessary to change that)

tobk: cooldown == 0 -> can use that action

tobk: kind of confusing that it's opposite to the UI

Nerchio: yea thats why i have my own counter but somehow its failing sometimes i think

Quidome: that info is redundant, you have it without the server telling you

Quidome: I don't use it

Quidome: @tobk, do you use opponent trigger for tracking?

tobk: no, my mine detection is not good enough for that

tobk: I mean, yes, I could still prune away a few possible positions, but again would require quite a bit of a refactoring

Quidome: Brute force kill move?

tobk: que?

Quidome: do all possible options and see if one of themkills the opponent

tobk: ah, no, that not either. might be an idea, thanks

Quidome: in any combination

Quidome: Works pretty well

eulerscheZahl: yeah, you should definitely do it

eulerscheZahl: SURFACE|SILENCE|TORPEDO for higher kill range

eulerscheZahl: and in combination with mine triggering you can even kill the opponent despite not knowing the location

Quidome: Exactly, was nice to do

Quidome: Had this idea from you btw

Default avatar.png RMuskovets: hmm... what's the "general" algorithm for tracking enemy?

tobk: that's actually pretty cool. if opp health <= 2, check if he is "in range" and then just hit him...

fluxtransistor: Keep a history of their moves

tobk: so far I just had a general "fight or flee" heuristic

fluxtransistor: And see if they are impossible from the starting locations

eulerscheZahl: i even saw my bot going for the kill with 3HP remaining in combination with mines

tobk: yes, I have move history for basic mine tracking and "relative visited" positions for narrowing down their silence-blur

Quidome: I do the following, for every possible starting move of the opponent do his order. Keep the starting move if possible otherwise throw it away

fluxtransistor: Same here

Quidome: And you can use a lot, don't forget opponent life

Quidome: silence gave me a headache

Quidome: :)

Quidome: furthermore, lookahead

Quidome: well, lot's of things to choose from :D

Default avatar.png RMuskovets: Hmm... the bots here in Wood 1 league are mostly dumb but my one is very good at not getting "torpeded"))

Default avatar.png RMuskovets: Like in this one:

Default avatar.png RMuskovets: Can I have a multi-threaded bot? E.g. one thread does pathfinding and the other - everything elese

Default avatar.png RMuskovets: else*

Swagboy: I think you can't have more than one thread

pmor: I believe you can, but your bot runs on only 1 core

Default avatar.png RMuskovets: Anyway I'm gonna try now)

pmor: context switching and synchronization will make it not optimal

dbdr: eulerscheZahl did you have a broken bot in the previous submit?

eulerscheZahl: yes

eulerscheZahl: added an explosion twice to my tracker in some conditions

eulerscheZahl: and then couldn't find the opponent anymore

eulerscheZahl: this version has the experimental feature added the way i wanted it. let's see if it's any better

kovi: interesting, multiplte submit from top4 lowered our score from 32-33 to 30

eulerscheZahl: oh, royale joined us

_Royale: eulerscheZahl: gold boss was a nightmare :-D

eulerscheZahl: but you did it, congrats

eulerscheZahl: legend league just feels incomplete without some players

eulerscheZahl: still waiting for Neuman n to join us

kovi: re-curse cough

eulerscheZahl: :D

CedricR: does someone did the ANEO sponsored puzzle I habe a code, and when i excute it i get an Erorr that my value is wrong, but when i check this value on my own it seems right.

Nerchio: 1 submit place 150 another place 60 ...

CedricR: what do you mean?

AntiSquid: it is very random nerchio

AntiSquid: i can get anywhere between 100 and 300 actually :D

CedricR: @AntiSquid is there a support way if i need help?

AntiSquid: what do you mean by support way?

AntiSquid: generally people just ask questions in chat and if someone knows the answer they might help

CedricR: okay

elderlybeginner: is there a good way to copy code into outside storage?

elderlybeginner: from cg to hd or github or any other way?

AntiSquid: i keep it in files on my local machine

AntiSquid: you could have a local repo

elderlybeginner: any way to export all or just open, copy, paste?

AntiSquid: github everyone can see them

AntiSquid: well you could use codingame sync i think

AntiSquid: which means you code locally and then push your code into the IDE

elderlybeginner: I would like to import it from CG to my local or github. Manually that's a lot of work

AntiSquid: check how this guy does it: elderlybeginner or search CG sync, i think that's the name

AntiSquid: just copy paste to local lol

elderlybeginner: well, there are like 30-50 puzzles I completed :)

AntiSquid: ya no other way

AntiSquid: if you want to share your solutions, there's a button on the puzzle once you completed it

elderlybeginner: nah, I'm sharing. But I would like to have them on my local, to look into it with my tools, to make i better and to learn something

AntiSquid: copy paste to local drive :D

elderlybeginner: so manual. OK

Nerchio: i literally jumped 120 with in gold with the same code

Nerchio: 120 places*

Default avatar.png str8flows: nice

elderlybeginner: i jump from silver to gold yesterday with the same code

AntiSquid: gold is flooding

Nerchio: gold is the equivalent of elo hell

blasterpoard: there is no elo hell, you're just bad :)

blasterpoard: the key is to not look at rank, keep improving your bot and benchmarking

Default avatar.png str8flows: obvious, but its nice to look at rank sometimes

CedricR: does someone did the ANEO sponsored puzzle I habe a code, and when i excute it i get an Erorr that my value is wrong, but when i check this value on my own it seems right.

icecream17: it's km per hour to meters per second

elderlybeginner: check forum, there same issues with rounding

CedricR: i used as anwser 68 km per hour there is no rounding error, when i try it to calculate without the computer i get the answer that i should work

icecream17: which test case

CedricR: test case 5

CedricR: there you have 3 lights with 300m, 1500m and 3000m with 30s, 20s and 10s

CedricR: I choose 68 km/h = 18.75 m/s

CedricR: This would mean i arrive at the first light after 16 seconds, cleary green

wlesavo: lol easy #3 while whole top is resubing

blasterpoard: wlesavo thanks for boosting my rating, btw

CedricR: After 80 seconds at the second light, but if change every 20 s it should be green from the 80th to the 99th second, so green

CedricR: and after 160 sendonds the third light, which also be green with 10s per interval

icecream17: 68km/h = (19 - 1/9)mps

icecream17: At (3040 - (160/9))ms = 160s = green

CedricR: okay, thanks

icecream17: But at 3000 it's red

wlesavo: i spended like couple of hours on aneo, ended up giving up on it, end month later realised i read the statement wrong, and the distances are counting from the start, and not between each other

wlesavo: the funny thing was i still got most of the cases right

wlesavo: and only couple of them were wrong

icecream17: this puzzle seems tedious

Default avatar.png TheSkolar: Hello everyone! I'm kinda proud of myself that I got into Gold League 3 days since I started the challenge. Any hints to get even better?

Default avatar.png TheSkolar: I feel that at this rank there are no more simple gamechangers to implement...

Ifthel: Maybe improve predicting where the enemy's location is?

Ifthel: Either through probability or better deduction?

Default avatar.png TheSkolar: Well, i track almost everything

Default avatar.png DEIZ21: even on mine triggerring?

Default avatar.png TheSkolar: Yes

Illedan: Do you avoid mines?

Default avatar.png DEIZ21: do u continue to track mine triggering after u reset the list of possibles paths?

Default avatar.png TheSkolar: Not yet, but I thought about it

Default avatar.png DEIZ21: Illedan do u continue to track mine triggering after u reset the list of possibles paths?

blasterpoard: TheSkolar there's a couple of things; f.e. using silence when you detect that opponent could torpedo you in the next turn, torpedoing before moving whenever possible (to charge it again), ...

blasterpoard: get this right and you should be able to get to top gold

Illedan: Yeah

blasterpoard: just don't throw fights

Default avatar.png TheSkolar: sure, so i need to track what opponent might know about me to react

Default avatar.png TheSkolar: and start avoiding these damn mines

blasterpoard: that's about it

Illedan: Yeah, should be enough for legend

blasterpoard: I got to legend without fighting

Illedan: Fighting

Illedan: ?

Default avatar.png TheSkolar: Without fighting? Just mines and opponents' stupidity? ;)

blasterpoard: Illedan the only thing I did in torpedo fights was "fire torpedo if average dmg is > 0.75"

blasterpoard: and silence if he can hit me

Illedan: I have something similar

Illedan: still

Illedan: 1 if before and after the move is sorted :D

blasterpoard: I fixed the the torpedo thing

Default avatar.png DanTheMan832: is your code svaed if u submit?

Ifthel: Yes

Ifthel: Also saved if you test it

CedricR: when i want to execute a special print command 5 times and another 3 times after that, how can i do this, without declaring an extra variable, which increase every game loop

Ifthel: As in you want to execute MSG for a number of turns in a row?

Ifthel: Or something like that

blasterpoard: btw is anyone already using mines like this?

CedricR: yes, in my example i want to move the char 5 times in a row into the south direction (print("S")

Illedan: What is that blasterpoard?

Illedan: What is "like this"?

blasterpoard: Illedan fram 181-187

Illedan: Ye ValGrowth does it

blasterpoard: I'm thinking about turning it on in my leaderboard bot, but I want info about different stuff now

Swagboy: blasterpoard my bot does it sometimes

Swagboy: Maybe not for the good reason tho

Ifthel: CedricR You chould just print out MOVE S [Action] 5 times in a row or something. Best to use a for loop for that, which uses a variable but anything else would be bad practice

Ifthel: Having said that, if this is for a bot, you're better off recalculating what action you want to take on every turn

kovi: nice combo blaster. but illedan could have surface escaped

blasterpoard: kovi ofc; but who has a bot that thinks about that?

Default avatar.png DEIZ21: Illedan it seems u dont track opponent torpedo charge (seen in the share of blaster) your bot go near the opponent and didnt notice it ll lose just after

icecream17: surface more and more? what a great idea!!! i need to implement this...

Illedan: Correct DEIZ21. my bot is very stupid at the moment :)

Illedan: And kovi, my bot never surfaces when there is a mine below it :P

kovi: i do eval with surface. not lookahead though

Illedan: I'll just make a bot that wrecks blaster earlier than this..

blasterpoard: Illedan that shouldn't be hard

Illedan: I just need 6 days, 9 hours and 30 min

Illedan: * 10 hours

Illedan: need 1 more round of benchmarks

Illedan: Anyways, Im off. gn

AntiSquid: -9 hours

__KAPPA__: I can beat the wood 1 league bot the majority of the times but when I submit it to the leaderboard it isn't able to get to the top

__KAPPA__: Also when I submit the code the initial ranking seems very strange

Default avatar.png rwilson: __KAPPA__ the 'better than the boss' is about your score, not whether you can beat the boss head to head. I suggest you swap your opponent out in the IDE for a few others near the top of your league and see what they are doing that beats your bot. Your score comes from # of wins against others in league, and they all can have slightly different strategies

__KAPPA__: Ok I understand.

blasterpoard: __KAPPA__ I looked at one of your games; I think your problem is that you bot sabotages itself by random movement even against weak opponents, that's why you have trouble climbing the league

__KAPPA__: The bot in this league use a very dumb strategy but my bot is unable to beat it :grimacing:

__KAPPA__: blasterpoard Yes I need to change that

__KAPPA__: I didn't pay much attention to it

Zenoscave: blaster do you just do tree pruning for your fight sim?

blasterpoard: Zenoscave no comment

Zenoscave: damn

Zenoscave: I feel I'm missing something crucial for my bot for legend

Zenoscave: Can't figure it out

__KAPPA__: blasterpoard Against very week bots, the ones that only silence, I don't know how to find them

blasterpoard: __KAPPA__ then your tracking isn't good enough

__KAPPA__: I track precisely every position the enemy bot can be

blasterpoard: top bots remember all possible paths the opponent could have taken, not just the positions where they might end up

__KAPPA__: So I have to keep in mind that enemy bots cannot cross their path. I hadn't thought about that

__KAPPA__: Thanks

blasterpoard: just make sura that you don't timeout, because the number of paths grows exponentially

blasterpoard: each silence can multiply the number of paths by up to 13

__KAPPA__: Ok

__KAPPA__: I just felt very annoyed because I had put a lot of effort in my bot only to see it loose against a very dumb strategy

AntiSquid: how do i know for sure i track all paths? i don't time out and it seems like i track everything :/

Default avatar.png Trzcinae: siema

icecream17: 166 possible opponent positions in map with very very few islands.... SILENCE! (you lose)

icecream17: Yes! I finally DONT timeout against this person in 400something place!

Nerchio: 166 positions?

Nerchio: try 1200 agents

icecream17: agents? (im such a noob)

AntiSquid: is the gold boss random? :/

Zenoscave: yes AntiSquid

AntiSquid: wow ....

Zenoscave: exactly

Nerchio: antisquid i saw you on the list while going up and down myself

Nerchio: you looking for legend?

wlesavo: AntiSquid sorry for that yeah, that submit was with comment on fixed seed

Zenoscave: wlesavo you're the boss?

ssda: I never thought there were island like this -7897354049226771500

Default avatar.png rwilson: ssda that's the 2nd map i've seen with isolated sections of water

Default avatar.png rwilson: not sure if it happens enough to code something in your starting location selection... maybe eulerscheZahl knows ;)

struct: Its very rare

ssda: I can figure it out.I just did not expect it. too much headache for small problem

alchemsti: Yeah, the dealing with silence, and still trying to get information out, and updating that historical information when new stuff comes in ... that's what's been killing me the last while, and I think what I need to make legendary.

ssda: I did that but I'm still silver

Zenoscave: then you did it wrong

ssda: no I'm sure I did it correctly

icecream17: amazing!

Astrobytes: lol wtf you testing against me for, my bots fucked mate

icecream17: well, i always timeouted against this other person, but now that i fixed that i timeout against you

Astrobytes: Depends which version you tested against

Zenoscave: probably state explosion icecream17 he silences the turn before you timeout

RavenKZP: logic: code with some bugs in special cases -> 40 in silver fix bugs -> 167 in silver :D

Zenoscave: put the bugs back ;)

ssda: Zenoscave I'm still figuring out the other stuff how to utilize them to the max + the best way to move around the map

Zenoscave: floodfill and edge following is all I do rn

RavenKZP: looks like bugs are somehow useful :D

Nerchio: zenos what do you mean edge following?

Nerchio: i am using floodfill but sometimes it cuts areas and i lose many moves

Nerchio: would like to prolong my surface in certain times

Zenoscave: if two paths are equally likely chose the one that has less moves next turn

ssda: let me google that floodfill alg of yours

Zenoscave: it doesn't work perfect but it helps

Nerchio: well so its the same as mine

Nerchio: problem is

icecream17: i use the squares next to the squares i could go to, but i flip N and E, and S and W, and I also check the diagonals to see if i can go N (which has 1 escape) but end up at E (which has 3 escape)... and.. oh wow that's really complicated

Nerchio: in open water when you have lets say 150 squares W and 150 squares N

Nerchio: but when you go north you blockade like 30 squares in the corner forever

Nerchio: that sucks

Nerchio: also where is my avatar

Zenoscave: try maybe a higher depth dfs?

AntiSquid: ssda there's a map with 4 big lakes and 1 tile lake in the middle, don't have the seed anymore

icecream17: I wish the seed was more straightforward and that we could make any shape and size islands

icecream17: I would make even second row land, but leave the middle column ocean

icecream17: or maybe every prime would be land....

ssda: AntiSquid ahh thanks for the head up. I will add to the to-do-list

ssda: just want to check. is there a path I can take that will give less info about my location than another?

ssda: I did focused only on the attack side

icecream17: woah. i just had an idea for crystal rush - if you put a line of traps right next to the start.....

Zenoscave: You have to sim your opponents possible paths for you as well

Zenoscave: icecream17 that was done in the contest

icecream17: my ideas are always taken by the past

ssda: lol

Zenoscave: doesn't make it any less of an idea

alchemsti: @ssda, definitely you can choose paths that give less info

ssda: damn I will add it to the think-list

alchemsti: :D I have a long think list too. Well, long implementation list :/

icecream17: My list right now is full of things that will take a week to implement.

alchemsti: That is indeed the problem :/

icecream17: Frame 47 win!? No -1!?

icecream17: MINE S. Next turn: MOVE S. TRIGGER. Get torpedoed right on too.

Nerchio: .

icecream17: How to find a bug: Submit your code and ridiculous things happen:

ssda: idk copy that guy to your IDE and rerun your code until it crash

ssda: need sleep see later guys

alchemsti: I crash-failed like this when I sent the same command twice, or tried to do something else illegal. You may want to dump to your command to debug, before sending it to standard out -- I don't think you get to see bad commands via stdout

icecream17: augh! stop being so random, other people

alchemsti: I'm heading to bed too. Next time I think I will try to build replay capability in from the beginning. My stuff is too stateful :/

Nerchio: there is a guy that doesn't care if you silenced

Nerchio: he just shots the position assuming you did silence 0

Nerchio: so annoying :p

MostComplicatedUsername: icecream17 it look like you pause when placing a mine

icecream17: yeah

MostComplicatedUsername: 6 days left... still in wood 1



icecream17: Woah. 449365058 -> 449365914? What a lot of replays

icecream17: wood still... (insert incorrect sadness acknowledgement)

MostComplicatedUsername: :rolling_eyes:

icecream17: I give up on gold... I wish there was a super super simple contest

MostComplicatedUsername: Ikr

MostComplicatedUsername: I mean

MostComplicatedUsername: CSB

MostComplicatedUsername: Nooo I used to be 3900th place now im 4300th

icecream17: 15,954th

MostComplicatedUsername: ???

icecream17: bronze

MostComplicatedUsername: Um ok

icecream17: good night. just discovered "back to the code". pretty cool