Chat:World/2021-10-08

From CG community
Revision as of 05:29, 9 October 2021 by Chat Log (talk | contribs) (Created page with "File:Default_avatar.png crazy_ape: import math File:Default_avatar.png Karmit: export math <img src=/a/71134047472367> Dandanman: Given a list of integers, multiply...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Default avatar.png crazy_ape: import math

Default avatar.png Karmit: export math

Dandanman: Given a list of integers, multiply the even integers by 3 and the odd integers with 5. Return the sum of all the items after the multiplication.

Dandanman: please help

Dandanman: http://chat.codingame.com/pastebin/a9342ac8-2ddd-4e05-9e10-e82771ec70cb

Dandanman: 177out

Default avatar.png Saunuri: what is the expected out

Default avatar.png Ciss: :joy:

King007: Hi

Thorcode: hi

Thorcode: play some private clash?

Thorcode: https://www.codingame.com/clashofcode/clash/20026946414a0bb766ee179f2da3b5a27133d9b

Thorcode: :( bored

DonFruendo: the clash has been cancelled

Default avatar.png FBF_Luis: I'd be up for a clash :)

Default avatar.png a3: asilas

Thorcode: yep

Thorcode: I cancelled cuz no one join :(

Default avatar.png FBF_Luis: anyone knows which version of c++ this site is using?

Thorcode: no

Default avatar.png FBF_Luis: hum... I getting an error when using ":" in a for loop

Thorcode: I use python :grin:

TheBlueBias: : works

Default avatar.png FBF_Luis: I prefer python aswell, but work exists

Default avatar.png FBF_Luis: I know ":" should work, must be something else then :/

TheBlueBias: Well since you asked for the C++ version I wanted to confirm that you can use it on the site.

TheBlueBias: https://www.codingame.com/playgrounds/40701/help-center/languages-versions

Default avatar.png FBF_Luis: yes, thanks :)

Default avatar.png FBF_Luis: I think the problem is that I want to loop through a queue but the queue is not well initialized

Default avatar.png FBF_Luis: and I have no idea why xD

Default avatar.png FBF_Luis: I deleted the code, wrote it again and the error dissapeared. Great

TheBlueBias: Are you sure? You shouldn't be able to itterate over a std::queue...

Default avatar.png FBF_Luis: well, I have no red line now

TheBlueBias: Yeah, but did you ran the code?

Default avatar.png FBF_Luis: not yet

Default avatar.png FBF_Luis: oh, the line is back

TheBlueBias: ^^

Default avatar.png FBF_Luis: :sob:

Default avatar.png StaySafe: ;(

ProCoder03: :stuck_out_tongue_winking_eye:

TheBlueBias: You don't want to itterate over a queue. Or you don't want a queue.

Default avatar.png FBF_Luis: if I want to print the elements, do I have to pop them?

ProCoder03: yup

ProCoder03: you have to pop them till the queue length is zero

ProCoder03: that need loop

Default avatar.png FBF_Luis: ok, then I can't print it for debug

Default avatar.png FBF_Luis: unless I save a copy somewhere

ProCoder03: yup...

TheBlueBias: Or you can use a deque instead.

Default avatar.png FBF_Luis: that is probably a good idea, but I want to practice queues ^^

ProCoder03: wait shit, my bad... , queues has dequeue only, pop is for stacks

ProCoder03: :sweat_smile:

TheBlueBias: So just copy it before printing.

Default avatar.png FBF_Luis: queues also have pop according to c++ documentation

TheBlueBias: Yup

TheBlueBias: Btw queue use an underlying container that can be a deque. So you could create a deque, use it with queue in your code, but iterate directly over the deque when you want to print it.

Default avatar.png FBF_Luis: you mean using a deque but only use functions of queue? (except the iteration)

TheBlueBias: You can do that. But in fact I'm not sure of what I said before... :thinking:

TheBlueBias: Yeah. No standard way to do that. My bad.

Default avatar.png FBF_Luis: oh man, had to restart my pc and my code is gone

Default avatar.png FBF_Luis: fml

TheBlueBias: The code is saved only when tou run it.

Default avatar.png FBF_Luis: I can confirm I had not run it

TheBlueBias: :/

Husoski: FWIW, a (proper) deque doesn't let you read the contents without emptying it any more than a queue does.

TheBlueBias: https://en.cppreference.com/w/cpp/container/deque

TheBlueBias: Meant std::deque not theorical deque.

Husoski: Yeah, but that's C++'s idea of a deque. Python's collections.deque also has extras.

Husoski: Like I said, FWIW...doesn't guarantee being worth anything... :)

Husoski: Anyway, I do the same thing as you in C++, use a std::deque directly instead of wrapping with std::queue. I'll put up with push_back instead of push as a small price to pay for being able to get debug output.

TheBlueBias: Didn't know the acronym. ^^ Another way to do is to inherit priority_queue to get access to its underlying container which is protected. So you can have your queue class with an extra "print" method for instance.

Husoski: I should have read farther back. I didn't see that the queue was a priority queue.

TheBlueBias: *queue

TheBlueBias: Sorry ^^'

Husoski: http://chat.codingame.com/pastebin/6668a608-76f4-42ee-8552-0e97852f4daa

Husoski: oooh. never been tl;dr-ed like that before...

TheBlueBias: True.

Husoski: Good night (2am here). Nice chat.

TheBlueBias: Gn!

Vintarel: In cTTT : am I alone to have a timeout at the end of the game ? After the boss has won ?

Vintarel: https://www.codingame.com/replay/584712005

Vintarel: And why does he play afterwards ? :joy:

jrke: Vintarel the match is consist of two games

derjack: the statement should reflect that though

Vintarel: oO indeed it's not written, i could never have guessed alone. Thanks for the answer though

darkhorse64: I made a post on the forum to explain this rule. Sorry for missing that in the review.

Shrimpster: so... in a MCTS, if Im playing against an opponent, do I need to switch the average value in the UCB to (1-average) so that my opponent takes the best move for him?

darkhorse64: No, you should rather store the result from the point of view of the player: my loss/ your win. If you score 0, I score 1

darkhorse64: This way the UCB formula is not dependant of the player

Shrimpster: and reverse the result as I return it up the tree?

darkhorse64: yes

darkhorse64: A very common error is to back propagate the wrong value. If it's your first MCTS, it's likely it will happen. Everyone has done it wrong the first time:sweat_smile:

Shrimpster: theoretically those should give the same result right? Switching the result and the UCB I mean

darkhorse64: yes

Shrimpster: Yeah its my first how did you guess xD I did it wring at start and then just switched the UCB (instead of the result), I don't see the error. Is it incorrect?

darkhorse64: no, just inefficient. I advised to use -1/0/1 for L/D/W. This way, when you backprop, you just have to reverse the sign

darkhorse64: s/advised/advise/

Shrimpster: Ahh okay thanks ^.^ will do

Default avatar.png alhiane: hello

darkhorse64: :raised_hand:

Default avatar.png alhiane: how are you doimg bro

Uljahn: great, we are practicing coding here, you?

Default avatar.png alhiane: yeah

Default avatar.png Drag0nEye: :pray:

derjack: code? here!?

Default avatar.png alhiane: Shadows of the Knight - Episode 1


WillChang: what?

Uljahn: use binary search there, one dimensional case is easy but you should extend it to 2D

derjack: Shrimpster if changing value to -1/0/1 dont forget to adjust exploration constant

Default avatar.png eefunn.uwu: ayo i dunno anything about coding lmfao

Default avatar.png Snovud: hello Yarik

Default avatar.png FBF_Luis: so, what should I do when I pass all the tests except one where the game has 1262 rounds and the problem is somewhere around round 250?

Uljahn: hope for telepaths to decrypt your message

miszu: I guess for GA chosing a random angle between 0 to 359 is too much

miszu: can't figure out the base case even

Uljahn: use predefined angles, like 0, 18, 36 etc

miszu: yeah this is where I am going towards

Uljahn: it's called discretization

miszu: I am sad that you need to use discretization

miszu: I thought that he will be able to figure something out

Uljahn: it's not a requirement though, just some optimization technique

miszu: but when you do crossover, I guess averaging them should be fine

miszu: is it truely optimization?

miszu: or more a hack?

Uljahn: yeah, you trade precision for speed

Uljahn: it's better to find a suboptimal solution than nothing

miszu: and I guess same thing for distance

miszu: instead from 0 to 1000 use discretization

Uljahn: sure thing

miszu: I truely believe GA > MC

Uljahn: also there is SA

miszu: SA = Silent Assassin?

Uljahn: simulated annealing

miszu: too much hitman I played :P

miszu: is it good?

Uljahn: i mean the underlying concept of lowering a temperature (or e.g. a mutation rate) is not very hard to understand but it could enrich your mindset i guess

miszu: no fore sure

Default avatar.png PhungVietAnh: http://chat.codingame.com/pastebin/39121b20-512d-454d-9a28-2dcb6052aa0c

miszu: looked at wiki

Default avatar.png PhungVietAnh: http://chat.codingame.com/pastebin/9f00438e-e5b2-4cff-acbe-5e9f7b034425

Default avatar.png PhungVietAnh: Line 1 : The length l of the arm (in meters) Line 2 : The rpm r of the attraction Output Line 1 : Your linear speed in m/s

Default avatar.png PhungVietAnh: help me

Uljahn: PhungVietAnh: please no spam

Default avatar.png 19WEBBER: hi

miszu: Uljahn for crossover for two floats you would simply do an average?

Uljahn: it depends

Uljahn: there is a substitution strategy where you take either one or the other

miszu: so if I have two floats you take one from each different parent

Uljahn: i don't know what are those floats

miszu: angle and distance sorry

Uljahn: averaging could be a good idea, you need to test both

miszu: yeah gonna do that

miszu: start simple

eulerscheZahl: moin

Default avatar.png Kairu111: I need to count the sum of all digits of a number until there is one character left. 192 = 1 + 9 + 2 = 12 = 1 + 2 = 3. (n-1)% 9 + 1 does it successfully, but how and why? Can anyone explain?

jzen: What language are you using? And what have you tried so far?

Default avatar.png Kairu111: Python

jzen: Oh I missed the last part, my bad

jzen: Have you tried going through and proving it on paper?

Default avatar.png Kairu111: This method works for sure, but I don’t even come close to understanding why.

miszu: my GA does super well for combos but when he can only make one good move which is going straight line to the other end of the map, he fails to see that

Uljahn: that's why MC with heuristics is a viable choice

derjack: so use GA when there are many good choices and nonGA if there is one. [solved] :x

miszu: flat MC

Uljahn: guess it's not very flat when there are heuristics involved

miszu: also it's because he starts in a corner, so the deltas go out of bounce and only output as you lost. I should give a bigger negative score if you are out of bound

miszu: if he starts in middle of map let's say then he can figure it out

miszu: I will show you two scenarios

miszu: https://www.codingame.com/replay/584756420 my bot derping here

miszu: https://www.codingame.com/share-replay/584756480 my bot being 007

Uljahn: i like how CMA-ES guides the search, another amazing concept to learn

Uljahn: consider adding angles directed towards humans to the genome, should be better

Uljahn: i mean with slightly higer probability

miszu: what Iwill do in my eval function is if you are out of bound I give an exponential negative value

miszu: so the earlier the move you are out of bound, the bigger the number

miszu: so if you are in a corner, moves that go out will be out of calculations

struct: what do you mean out of bounds?

struct: ah

struct: I just limit the position to

struct: max(0, min(x, 16000))

struct: out of bounds move is still legal I think?

Uljahn: Constraints: 0 ≤ x < 16000 0 ≤ y < 9000

struct: but the coordinates you output can be out right?

Uljahn: Game information: invalid input. Expected 'x y' but found '-8250 -4500'

struct: ah

eulerscheZahl: evil Uljahn

Uljahn: not evil just dark :cat:

struct: the icpc starts in 9 hours?

eulerscheZahl: 9h 37min

eulerscheZahl: https://codeforces.com/contests

struct: yeah

struct: the timing is a bit bad for europe

eulerscheZahl: i ttok off for monday+tuesday, hope it's worth it

eulerscheZahl: multiple of 24h, so I don't see a problem

eulerscheZahl: CG contests are more biased towards a region (which is not Europe)

struct: the first one is only 4 hours

eulerscheZahl: no

eulerscheZahl: the short one was for ICPC world finalists only. it's already over

struct: https://i.imgur.com/VCC1yeJ.png

struct: whats this?

eulerscheZahl: 4 days 0 hours 0 minutes duration

eulerscheZahl: 4:00:00

TheBlueBias: :3

struct: oh

struct: lol

eulerscheZahl: either that or their other contests are 2-4min on average

struct: yeah i dont usually see this format

Default avatar.png Ahlam_Dk9: فيه عرب

TheBlueBias: Unicode... :rolling_eyes:

jacek: opening books...

eulerscheZahl: escape contests...

Default avatar.png BrokenKnight_ecef: hi

alaama: game

NotGoodatall: hi

Default avatar.png YoussefElyamani:

       System.out.println((4*6*a*5 - c >=b));

Default avatar.png YoussefElyamani: solution

Illedan: :dance:

Illedan: 8 hours eulerscheZahl :D

Illedan: Wonder if I stay up until it starts or wake up early

Illedan: :thinking:

eulerscheZahl: wake up early

eulerscheZahl: i hope it's an interesting task

Illedan: I think I'll wake up at 2 am. Read the statement. Then sleep again

eulerscheZahl: somehow i don't like those hashcode-like problems with a huge input, asking for a heuristic

Illedan: Good prizes

Illedan: can do some work for those

eulerscheZahl: you'll pay yourself less than minimum wage - but that's not what it's about :D

Illedan: Ofc not

eulerscheZahl: wining something is always more rewarding than buying with your own money

Illedan: It's about beating you

Illedan: #Priceless

eulerscheZahl: the old rivalry

Illedan: I put the headset from Sogeti on the shelf as I have a newer version myself

eulerscheZahl: i sold the Huawei smartwatch on ebay, that I won in their last contest

eulerscheZahl: i don't wear watches

TheBlueBias: Don't like hour.

jacek: do you watch wears

TheBlueBias: Winner of this contest will get a phone while a multinational will use his algorithm to earn billions... Seems fair.

eulerscheZahl: don't forget about the $5000

eulerscheZahl: and i think it's a laptop, not a phone?

TheBlueBias: Ah yeah. Great diff against billions. :p

miszu: graciously provided by KGB

Wontonimo: the codeforces contest is interesting. What is "successful hack" mean? It awards 100 points

Illedan: Hack?

Illedan: You looking at the ongoing normal contest?

Illedan: No hacking on the Marathon right?

Wontonimo: https://codeforces.com/contest/1594/problem/A

Illedan: https://codeforces.com/blog/entry/94906

Wontonimo: there is successful hack = +100 unsuccessful hack = -50

eulerscheZahl: that's for puzzle contests

eulerscheZahl: there are some, but incomplete tests during the contest when you submit

eulerscheZahl: so you might fail the final system test

Wontonimo: ah. nice, like a validation set

eulerscheZahl: but when you solved a problem, you can lock it. that gives you access to solutions from others. you can read their code and check for mistakes, corner cases that they will fail

eulerscheZahl: so you try to "hack" it by giving an input that you think causes the other program to timeout, print a wrong result, ...

TheBlueBias: :smiling_imp:

eulerscheZahl: if you rightfully claimed the other program to be faulty, you get those 100 points

Wontonimo: oh, i like that

eulerscheZahl: the code is given to you as something like a picture. you can't just copy it and run it offline

Default avatar.png Saunuri: is there any way of seeing the validators for the code golf puzzles? I'm clearing the tests but getting 60% on submit

eulerscheZahl: https://eulerschezahl.herokuapp.com/codingame/puzzles/ happy searching Saunuri

Wontonimo: once you finish all your puzzles, you go on to brutalize everyone else code

eulerscheZahl: when you found it, open it on codingame to see the validators

Wontonimo: resist Saunuri, resist!

Wontonimo: which puzzle are you trying?

eulerscheZahl: codeforces also has a concept of rooms. you can't hack everyone but just your room of about 50 users. random distribution to rooms

eulerscheZahl: to prevent your buddy adding a bug on purpose that you can then hack

Wontonimo: you will learn more about how to find corner cases Saunuri if you try it yourself instead of looking up the answer. It is a very valuable skill.

Default avatar.png Saunuri: I am doing the temperatures one

jacek: did you do the non code golf temperatures first

Default avatar.png Saunuri: Yeah I have done it with C# just wanted to see if could get a bit shorter one done with JS

eulerscheZahl: oh, temperatures.. you can only see the validators for community contributions

jacek: community what?

eulerscheZahl: the things that falls apart when there is no contest

TimothyAlexisVass: Is there some simple way in Python to convert this string: "a 1 b 2 c 3" To this dictionary? {a: 1, b: 2, c: 3}

TimothyAlexisVass: I did: http://chat.codingame.com/pastebin/07d6af45-3e6b-401e-a103-2588d78403b3

Wontonimo: dict(zip(a.split(" ")[::2],a.split(" ")[1::2]))

Wontonimo: a = "a 1 b 2 c 3".split(" ") dict(zip(a[::2],a[1::2]))

TimothyAlexisVass: d={s[i]:s[i+1]for i in range(0,len(s), 2)}

Uljahn: maybe dict(zip(a[::4],a[2::4]))

TimothyAlexisVass: hmmmm

TimothyAlexisVass: Wow that's clever Uljahn

Wontonimo: it only works for 1 char & 1 num

Wontonimo: won't work for "a 1 b 12 c 7"

TimothyAlexisVass: yep

Wontonimo: but, yes, I like it Uljahn !

TimothyAlexisVass: is a.split() is the same as a.split(" ")?

TimothyAlexisVass: I think space is the default

jacek: "By default any whitespace is a separator"

Uljahn: there is some difference when splitting multiline strings i guess

Uljahn: i may be wrong though, don't remember exactly

Default avatar.png NiamNiam: Is it me or is this website puzzles / games kinda hard? I feel like you already need to have a solid understanding of a lot of things before starting :/

fkberthold: NiamNiam, yeah, it's a common problem. This site is geared toward people who already have a solid grasp of at least one programming language.

MiyamuraIzumi: Hello guys

fkberthold: Greetings!

Default avatar.png NiamNiam: Yeah, I did notice a trend in websites introducing "let's help you land the job / help with puzzles / etc", but the barrier to entry or to enjoy it is high.

I want to enjoy and I want to learn, but this produces a contrary effect for me - it makes me switch off :)

jacek: you need at least some basics, it isnt complete beginner's tutorial site

fkberthold: I can't blame you for your frustration. I'll be honest, I code for a living, I use this site to relax and have a bit of fun. So this is perfect for where I'm at.

fkberthold: So, for you, why do you want to learn. Did you have a language in mind?

Default avatar.png NiamNiam: lol I didn't say I was a beginner. I am working on frontend side of things, so JS is not used that extensively, unless a certain feature needs implementing

jacek: also depends what you do at work. frankly i almost never touch pure algorithmic stuff at work

Default avatar.png NiamNiam: Same here. Which is why I wanted to come here and learn at a leisurely pace. But I am finding the puzzles UI tiresome to look at - maybe it's just something to get used to haha

jacek: i/o of this site was the biggest stuggle for me at first

Default avatar.png NiamNiam: not familiar with "i/o" abbreviation

jacek: input output

fkberthold: Alright, so what part of the UI is giving you trouble?

eulerscheZahl: i've always seen the UI as one of the main arguments pro CG. of course it's useless and total overkill for the onboarding. but really helps to visually debug multiplayer games

fkberthold: And honestly makes them more fun (for me at least).

jacek: ui is fun. maybe ui-less puzzles trouble him

eulerscheZahl: talking about the interactive viewer here, in case you mean other parts of the UI

Default avatar.png NiamNiam: "Check your code Do you think you fixed the problem? Run your code to check if it works!" <- this is annoying. No way to close it either or remove it for good.

Too much text in very little space. Not great use of spacing. Everything seems cramped. Until I am accustomed to where things are positioned, I didn't even notice there were rules if I scroll down below the video / game part

fkberthold: Are you on the onboarding puzzle?

eulerscheZahl: the onboarding with all the tooltips. yes, that's too much if you have a bit of knowledge or common sense

eulerscheZahl: don't worry, only 2 games/puzzles have these

eulerscheZahl: the rest of the website is free of them

jacek: tutorial game like onitama doesnt have it oO

Default avatar.png NiamNiam: I am past onboarding, was trying things out with bots / pods

jacek: coders strike back?

Default avatar.png NiamNiam: yeah

jacek: this is another 'onboarding' game

eulerscheZahl: the multiplayer onboarding

eulerscheZahl: move to (x,y) instead of (y,y) then set thrust to 100 and you are done with the annoying part

eulerscheZahl: i'm not a fan of coders strike back, as the input format changes a few times between leagues. CSB is the only game that does this nonsense

Default avatar.png NiamNiam: I suppose I'll stick to it for a bit and see what happens :)

Default avatar.png Arridian: Just when I get back, people happen to be talking about that game again,

Default avatar.png Arridian: What insight have you gained, Niam Niam?

fkberthold: Just my opinion on this, CG pushes the competitions pretty hard (with good reason), but I'd suggest hanging out on the puzzles for a while first, especially if you want to focus on sharpening your algorithmic skills.

Default avatar.png Arridian: okay,

jacek: CG pushes to escape now :F

Default avatar.png NiamNiam: So far? That it has potential to be fun for me - but maybe further down the line... Also, I like to skim read a lot and that didn't help. :D

TheBlueBias: "CG pushes the competitions pretty hard" :rofl:

Default avatar.png Arridian: Does anyone have any tips on how to beat boss 4 in the pod racing? Bronze league? I asked yesterday and didn't get any good answers.

fkberthold: Yeah yeah, I know, everyone hates escape. I can only figure they're hoping to find a way to make money off the corps.

Default avatar.png NiamNiam: @fkberthold - fair enough! I'll stick around for a bit

Default avatar.png Arridian: It is the one where they turn on colliding.

Default avatar.png Arridian: They kind of stopped telling me how to improve my pod, so I'm not sure how to proceed.

jacek: Arridian target - 3 * velocity

jacek: find the current velocity of your pod (hint: current position - last position) and substract from the next checkpoint

Wontonimo: I'm not giving that hint away anymore

jacek: oO

Wontonimo: instead I tell people to read up about PID controllers

Wontonimo: and maybe direct them to https://w3.cs.jmu.edu/spragunr/CS354_F17/handouts/pid.pdf

Default avatar.png NiamNiam: is it just me or does the animation of our code gets frozen after X attempts?

Wontonimo: yes, it's a known issue

Default avatar.png Arridian: What is a PID controller, wontomino?

Wontonimo: https://w3.cs.jmu.edu/spragunr/CS354_F17/handouts/pid.pdf

Wontonimo: it's the same thing that cruise control and autopilot uses

Wontonimo: it really isn't advanced code, it's fairly doable control system code with really fancy names

Wontonimo: like jacek said, one part of it is to correct for velocity

Wontonimo: imagine you are driving up to a red light. Depending on your velocity as you approach the light you will press on the break with more or less force

Default avatar.png Arridian: Okay, I will read the pdf.

Default avatar.png Arridian: If I have any questions, can I ask you wontonimo?

Wontonimo: I sent you a PM with an example of PID in action

Wontonimo: yeah, sure

Default avatar.png Arridian: okay, thanks

jacek: math :unamused: physics :unamused: who needs them

Default avatar.png StevenV: gooooo

olaf_surgut: does anyone know how to find timeouts on CG? when i measure code localy with sanitizers vs himself and random enemy it works perfectly

olaf_surgut: reading and printing output is reliable

DomiKo: at which game?

olaf_surgut: clobber

jacek: timeout could mean a crash

olaf_surgut: sanitizers would detect it localy

DomiKo: hmm I can use 145ms without any problems

jacek: only thing you could do on CG is put cerr lines here and there and narrow it down

DomiKo: it could be too much memory too

jacek: that what happened to me with cttt

Westicles: somebody give me an idea for a reverse clash. I only need around 70 more to reach level 50

jacek: https://img-9gag-fun.9cache.com/photo/anKb5Eo_700bwp.webp

Default avatar.png algobearcf: lol

DomiKo: very clean

miszu: is there something shorter in python than: while 1

jacek: apparently not

Default avatar.png LiquidBacon: java > python

Default avatar.png LiquidBacon: where my java gang at

mrfacysus: C# > java

jacek: no love for kotlin?

Astrobytes: Kotlin is fun...

TheBlueBias: Yeah. I read referee in kotlin everyday.

Astrobytes: You missed the joke

jacek: he didnt konvert to kotln

TheBlueBias: Hadn't read previous message.

TheBlueBias: +s

Default avatar.png LiquidBacon: ur mom > c#

TheBlueBias: A man came on #fr to ask for a python starter code like the SC2021 one, but without sayin' for what. And I got scolded for sayin' I can't guess for what multi he wanted it, 'cause it was obviously for the new contest: Code vs Zombies. :3

jacek: those toxic #fr people ~

TheBlueBias: Nyoro~n

Arridian: Does anyone know any other easy puzzles for noobs? Other than coder strikes back?

Arridian: For bot programming specifically.

jacek: connect 4

miszu: ghost in the cell

Arridian: Okay, thanks guys.

Arridian: Which one of the two is easier?

Westicles: These guys think all the 8x8 and 9x7 grid games are easy since it is the same approach over and over

Arridian: Do you disagree with that?

jacek: easy to learn, hard to master

Westicles: I guess it depends if you are in an mcts mood or not.

jacek: gitc can be done in few lines of code

Arridian: Okay, thanks.

jacek: connect 4 is easy 'classic' board game, but top leaderboard require some knowledge of minimax and/or mcts, nn stuff

Arridian: okay, lol

Arridian: I have no clue what those are.

Arridian: I just need to get bronze so I can progress with quest

jacek: ghost in the cell it is then

jacek: ahh, connect 4 has no bronze

Arridian: oh, rip

Westicles: might as well go for two silvers since you'll need it later. FWIW, the only two I have are CSB and FC2020

Arridian: What is FC2020?

Westicles: fall challenge

Arridian: Oh, okay

Arridian: How should I get started with ghost in the cell? I have no clue what to do.

jacek: miszu ^

jacek: first, read the statement

Default avatar.png Kingooooo: How do I use the variables defined in a for loop outside the for loop?

Schwase: define them before the loop

Schwase: set their values inside the loop

Schwase: what language btw?

Schwase: if java that is what you have to do

Default avatar.png Kingooooo: JavaScript

Schwase: im not sure idk JS but in java you would need to do that

Schwase: like

Schwase: http://chat.codingame.com/pastebin/909aad6d-5fff-49fb-9990-f22a47c56b9c

Default avatar.png Kingooooo: thanks

Arridian: I sent you a PM jacek

Arridian: What is the max number of links a facotry can have in Ghost in teh shell?

Arridian: *cell

struct: max number of planets -1?

struct: so would be 14

Arridian: lol, this challenge is showing me how bad at coding I am

Arridian: The coder strike back one was easy tho

Default avatar.png Kingooooo: This whole website shows me how much I suck

Shrimpster: alright... so ive made a fairly descent MCTS algo for tictactoe that got me to top 100 in gold, to beat the bot what do I have to do? Just optimize machine circles?

Default avatar.png Kingooooo: I can't complete this apparently super easy CoC

Schwase: which one?

Schwase: was i in it or no?

Default avatar.png Kingooooo: nope

Schwase: what mode

Default avatar.png Kingooooo: shortest

Schwase: f

Void9080: How did u do it so fast goddam

Westicles: never fear, I have been steadily adding many high quality clashes. eventually all clashes will be by me

Default avatar.png Kingooooo: Can I look at other people's solutions?

Default avatar.png Kingooooo: oh yeah nvm

Void9080: wait how u do that

Default avatar.png Kingooooo: these people doing moon runes the frick

jacek: Shrimpster how many simulations per turn do you get

jacek: yes, uttt is optimization fest. though some universal mcts enhancements apply

Void9080: How do you see other people solution?

jacek: like C exploeration tuning,; checking for mate-in-one in tree and/or simulations every turn; mcts solver

jacek: Void9080 if you solve puzzle you can see others people solutions

Void9080: well f

Void9080: im not gonna solve this hahaha

jacek: oO

Schwase: yo i levelled up yooo

jacek: :tada:

Arridian: How do I solve the error: not in a function on line 25?

Arridian: I tried googling it, nothing comes up.

Arridian: Like 25 simple is while True:

jacek: whats on line 25

Arridian: It is just a "while True:"

TheBlueBias: problem's before

jacek: whats before and after

jacek: is indentation ok

Arridian: Before is the stuff they gave me when I started, I haven't changed it:

Arridian: for i in range(link_count):

   factory_1, factory_2, distance = [int(j) for j in input().split()


Arridian: And after if the entity_count = int(input())

Arridian: idk what could cause it

Arridian: ima just reset the code

Arridian: Okay, I got it to work, but for some reason after the first two turns it just stops working and just sits there. LEtting the enemy win.

Arridian: This is my code:https://tech.io/snippet/jLV4IYG

darkhorse64: reset troops

Arridian: wdym?

jacek: what error do you get?

Arridian: After a few minutes I get the error: Can't send a troop from a factory you don't control (7).

jacek: you have biggest_factory before the loop. what if there is no biggest factory?

Arridian: But for some reason my troops just stop sending after two turns

Arridian: Then shouldn't it just use 0? as default value?

darkhorse64: I mean that 'troops' keeps on growing

Arridian: Oh, I see what you mean

Westicles: Hey blaise, tell your french buddies to try my DAWG puzzle

Arridian: What?

TheBlueBias: DAWG?

Westicles: just a contrib, don't want to spam it here

Westicles: https://www.codingame.com/contribute/view/7352dc06dcce447cd96a058f0bb2509a70b3

Astrobytes: /ban :P

jacek: oh, a nine men's morris yet again on cotributions

struct: i had to scroll so much

struct: to get to the bottom

Arridian: lol

TheBlueBias: Graphs! Graphs are cool :heart_eyes:

Westicles: I hate graphs. I was just trying to fit in

Arridian: lol

Schwase: graphs *shudders*

jacek: graphs?

Schwase: physics major. PTSD. dont wanna talk about it

jacek: physics?

Schwase: what is...

Schwase: PHYSICS?!?!

Arridian: Does anyone know how I can solve the "Can't send troop from factory you don't control" in Ghost in the cell? My answer didn't work.

Arridian: My answer was here:https://tech.io/snippet/7hcA6jv

jacek: umm Westicles is this phone numbers thing?

TheBlueBias: Was thinking about this too.

struct: target_factory is not updated

struct: is always 0

Arridian: Oh, good point.

Arridian: ty

jacek: Westicles https://www.codingame.com/training/medium/telephone-numbers

Westicles: That is only first digits. A DAWG shaves nodes in other places as well

Westicles: https://www.researchgate.net/figure/Graph-Representations-of-Strings_fig1_1955715

struct: is this ddawg or nddawg?

JHowell: Is there a way to go back to see the problem on a Code Clash after submission?

SNEEDSTER: I don't think so

JHowell: I thought I saw some one post some sort of database with all the clash problems but not solutions.

Default avatar.png StanleyKubricker: Waheeeey

JHowell: Found it: https://eulerschezahl.herokuapp.com/codingame/puzzles/

Arridian: Does anyone know a simple way to find whicever one of my factories has the most cyborgs in ghost in the cell?

Default avatar.png Dren: depends on how you store data

Default avatar.png Dren: i would imagine

Arridian: Well, yeah.

Arridian: I currently just have an array of "myfactories" and an array of "oppfactories"

Arridian: And in each array is a tuple for factory id, cyborgs, and rate of creation

Arridian: I tried to make a for statement that loops through and finds biggest, but it returns at Answer.py. not in a function on line 31

Arridian: idk how to fix it, because nothing comes up when you google it

JHowell: so the cyborg count is the second value in each tuple? Are you recreating your array on each game loop, or updating an array created outside the loop?

Arridian: I am rewriting with classes now, because I think it will be better.

Arridian: But thanks!

JHowell: Yeah, I'd just suggest printing debugs to make sure the values you think you're comparing are what you think they are.

Arridian: Okay thanks

Westicles: ddawg

Default avatar.png gidwwdw: hi

Wontonimo: hig hdawg

Default avatar.png Cyber_Glitch: hi

Wontonimo: :wavw:

Wontonimo: :wave:

Default avatar.png Cyber_Glitch: :grinning:

Wontonimo: what a happy wavy group we have

Default avatar.png Cyber_Glitch: :hi:

Default avatar.png Cyber_Glitch: :mad:

Default avatar.png Cyber_Glitch: :yum:

Wontonimo: hey Cyber, how did you hear of codingame ?

Default avatar.png Cyber_Glitch: um can anyone help me with this one

Default avatar.png Cyber_Glitch: http://chat.codingame.com/pastebin/b1722a2a-bab0-4f9a-8919-af567b42137e

Default avatar.png Dren: depends on the language i guess

Default avatar.png Dren: what do you need help with

Westicles: I can tell you the validators are the same as the tests

Wontonimo: http://chat.codingame.com/pastebin/1e7cb8d5-5ae9-409e-b86d-3aa738e8ec48

Wontonimo: ^^ Cyber_Glitch that is for you

Westicles: ooh, me next. escaping the cat please

Wontonimo: there exists a distance from the middle such that the mouse is able to make a revolution around the pool faster than the cat but just barely. stay at that distance and revolve until the cat and mouse are on opposite side, then head straight to the outside

Wontonimo: the distance is pool_radius * mouse_speed / cat_speed

Wontonimo: just shy of that

miszu: datastructure question for c++. Let's say you have an array of something and you want to get rid of the middle one, how could you do it so you don't compromise the array? Like I want to replace my vector with array

Westicles: okay, I guess I should try it. I hate 360 degree trig problems... always so many sign errors

Wontonimo: are you going to insert something later?

miszu: no, either iterate it or remove it

Wontonimo: if it is a list of large sized classes, i manipulate a list of ints instead that point to their ordinal

Wontonimo: i'm sure there is a better way

Wontonimo: if it is a linked list, just change the link pointers. again, ints can be used instead of hard pointers

Wontonimo: for most CG games I don't do garbage collection in c++

Wontonimo: no need

miszu: alright

miszu: I want to improve my speed at some point

Wontonimo: i used singly linked list in UTTT for a very long time and it was pretty fast for dynamic addition and subtraction of elements. Now I only add elements.

Wontonimo: Westicles, I just finished https://www.codingame.com/ide/puzzle/escaping-the-cat

Wontonimo: thanks for suggesting that puzzle

Westicles: nice

Wontonimo: it wasn't as straight forward as my write up made it sound. There were 2 hyper parameters that I had to tune because of the 350 frame limit

Wontonimo: at a high level, certainly my original hypothesis was correct, just that the mouse radius has to be closer than I suggested so that it is solved in time.

Wontonimo: there was a numberphile on this exact problem a couple years ago and I just remembered it. Otherwise I wouldn't have had a clue

Wontonimo: https://www.youtube.com/watch?v=vF_-ob9vseM

Wontonimo: found it

Westicles: Yeah, I saw that. Others said at the time you can run for the edge and zigzag and that works as well

Westicles: Make the cat continually change directions

Westicles: https://www.codingame.com/replay/516138224

Wontonimo: nice

Wontonimo: which one was that?

Westicles: not sure, that was from an old chat by Uljahn

Wontonimo: oh, that wasn't your replay

Thorcode: Given a list of integers, multiply the even integers by 3 and the odd integers with 5. Return the sum of all the items after the multiplication.

Thorcode: this puzzle is like an old puzzle yesterday a guy asking on this channel

Thorcode: oh fortget it

Westicles: the one you approved without solving it

PatrickMcGinnisII: die(array_sum(array_map(function ($a) { $a*=($a%2?5:3);},$list)));

Thorcode: ?

Default avatar.png zerotwo1: help

Thorcode: ?

Default avatar.png Karmit: :upside_down:

Thorcode: oh I know what puzle

Westicles: https://www.codingame.com/contribute/view/7440af86a345bbedead52d5e6c93c58f47ad

Westicles: and everyone complained because it was clearly not ready

PatrickMcGinnisII: did i not solve it right?

Westicles: I meant Thorcode

Thorcode: I solved it

PatrickMcGinnisII: oh i forgot the return

PatrickMcGinnisII: oh well, i don't CoC

Thorcode: I forgot the question

Westicles: it was a big scandal. the validators and testcases are the same

Thorcode: oh yeah so pp can use alot if

Thorcode: well this puzzle could be shortest

PatrickMcGinnisII: ok i did it

PatrickMcGinnisII: http://chat.codingame.com/pastebin/a98b4b87-89c9-4878-a9dd-87f48897b331

Thorcode: nice

Westicles: PatrickMcGinnisII, here's a special puzzle just for you

Westicles: https://www.codingame.com/ide/puzzle/king-of-diamonds