Chat:World/2021-09-01

From CG community
Jump to navigation Jump to search

ProCoder03: not per move, totally in the game !!!

derjack: :upside_down:

Y.Srihari: Hi gayes

Y.Srihari: Can you help me

Y.Srihari: by deliting all

Y.Srihari: It is so dullcult

Y.Srihari: This is your hint

water_man: Which man has passed?Help me!Thanks!!!

water_man: This is my code.

water_man: http://chat.codingame.com/pastebin/fb2800d7-dbe4-4fc2-81d7-7ace4d93ac2d

water_man: I can not understand what should I need to do.

water_man: :grimacing:

Uljahn: modify your print like this: print(next_checkpoint_x, next_checkpoint_y, thrust)

derjack: alternatively, there is no " " between y and thrust

LaoFeng: Thanks very much

Uljahn: you could also use string interpolation like print(f"{x} {y} {t}")

akashhuyaar: from where should I start leaning algos ??

akashhuyaar: I mean practice not learning

darkhorse64: you could also look at what you emit and discover it is not consistent with the statement requirements. CG tells you that your output is incorrect. Listen

derjack: space shooter quadrapled users ~

It_potato: Hi guys

ProCoder03: how player do you need to open bronze league in a community multiplayer ??

Butanium: SDK question : Is there a difference between setVisible(false) and setAlpha(0) for entities ?


Butanium: I'm trying to reduce the amount of datas sent in the viewer

RickJ: @ProCoder03 Community games only habe wooden league, no matter how many players :/

RickJ: have*

RickJ: and @Butanium: Setting visible to false is faster - that way all event listeners are ignored

Arcadia17: Hi guys, I have a question. In the profile page there is a certification called "Coding speed". What does it depend on?

jdsigg: It is directly related to achievements completed in Clash Mode

Default avatar.png CoonCoder: I think it is based on how fast you submit the solution

Default avatar.png CoonCoder: ah;)))

Arcadia17: Ok thank you

jdsigg: If you are on your main page, follow the clash of code tree and you'll see little "graduation caps" along its path. Hitting those goals helps you level that up

jdsigg: np

TimothyAlexisVass: T_T

MiyamuraIzumi: when can I gain grandmaster titile :(

MiyamuraIzumi: too far

Default avatar.png smacker01: how do you even gain grandmaster title?

MiyamuraIzumi: I think around 40k CP

MiyamuraIzumi: Just feel unmotivated with writing simulation

MiyamuraIzumi: any tips?

dreadylein: tips about ? :)

MiyamuraIzumi: like improve speed to code a simulation

Default avatar.png smacker01: i ma crafter and done nothing but clash of code what tip i can give u

dreadylein: repetion prettymuch :)

MiyamuraIzumi: It take me alot of time, that why I just feel lazy

dreadylein: it will get easier after a while

dreadylein: try to target something you like

dreadylein: maybe if you are someone that likes optimization, think about what parts could be done nicer while coding the base

MiyamuraIzumi: what part could be done nicer?

MiyamuraIzumi: like I am simulate Marlander for example => what par for this ?

MiyamuraIzumi: (I already finish ML, I just want to get some idea, as I take a lot of time for it, that why I just feel lazy after ML)

dreadylein: multiplayer challenges are nicer as you can work on it and see the benefits of optimization, but overall, trying to save the state of a simulation efficient, caching, math heavy paths, compare heavy paths, allocations (if you are using a managed language, gc pressure) etc

dreadylein: there is tons of stuff to toy around with :)

MiyamuraIzumi: I see, so It is actually finding the joy to optimize the simulation

MiyamuraIzumi: thank you

dreadylein: in the end its up to you, maybe you love to organize your code extremly tidy, maybe you are incredible competitive and just want to beat everyone else

dreadylein: prettymuch find fun in doing the boring stuff by thinking about howmuch realy cool stuff you can do with it in the end ;)

Butanium: thanks @rickj

MiyamuraIzumi: oh, actually "just want to beat everyone else" is my very goal, thank you dreadylein, I will keep that in mind for motivation :D

Justin-Truong: Space shooter is hard :grin:

Mohammed_Galal: Good afternoon guys

Default avatar.png Allison: Good afterevening.

Uljahn: bot games are hard when you can't copy-paste a bot from github :smirk:

Default avatar.png entcune: burn

akashhuyaar: @Justin-Truong yeahhh

akashhuyaar: I can't even understand the problem statement

akashhuyaar: wtf is tick ???


Wontonimo: hey hey, great to see so many familiar people here !

PatrickMcGinnisII: damn, still need 111 xp to lvl

PatrickMcGinnisII: a puzzle a day keeps CoV away

Wontonimo: have you done unflood the world or the lucky number?

PatrickMcGinnisII: hmm, haven't lucky number

Wontonimo: i don't think lucky number should be in "very hard". Maybe hard or medium.

PatrickMcGinnisII: 10^18....hmmm, yeah not that hard

Wontonimo: you may find this handy https://oeis.org/A016185

PatrickMcGinnisII: looks like just a memoization puzzle

Wontonimo: and it isn't 10^18. It's more like 18

PatrickMcGinnisII: yup max loops are like 18*8=144

Wontonimo: I just turned off the memoization part of my solution and it still solves it in time. Actually

Wontonimo: without memoization it can solve the 'Biggest' test case in 0.0033 seconds

PatrickMcGinnisII: a(n) = 9^n - 8^n .. i don't get it

PatrickMcGinnisII: ahh just combination

Wontonimo: for a number with n zeros, that is the number of combinations that has a 6 or an 8

Wontonimo: for 1000, there are 9^3-8^3 six's

Wontonimo: you can easily brute force the solution up to 10,000 which gives you a great unit test set ... 10,000 unit tests to be precise

PatrickMcGinnisII: hmmm, I think IP mask calc and Lucky number would get me closer to lvl the fastest, but still 1 puzzle short

PatrickMcGinnisII: I could just do an easy one in another lang

PatrickMcGinnisII: i think that gives more xp

PatrickMcGinnisII: *shrug*

Wontonimo: are you trying to get to lvl 40?

PatrickMcGinnisII: just 37 for now

PatrickMcGinnisII: been 36 for like ever

PatrickMcGinnisII: feels like

Wontonimo: do you get xp for doing the same puzzle in a different lang?

PatrickMcGinnisII: i think you get achievements, i dunno about base xp

PatrickMcGinnisII: Astrobytes ?

jdsigg: I believe solving a puzzle once gives you XP, and some puzzles have extra achievements like "solve in language <x>"

Separately, there are achievements for solving <n> puzzles with a language. For these, you can solve the same puzzle with two different languages to further both language challenges

Wontonimo: ^^ yeah, that is my understanding

darkhorse64: You get 75 XP for solving 15 puzzles in a given language

jdsigg: Horse-Racing Duals is an example of a puzzle with a special language achievement (I don't know if they differ per person, but I can get an extra 25xp for solving this particular puzzle in Bash)

PatrickMcGinnisII: hmm, homepage shows languages...hmm says I've done 355 in PHP, 7 in java, and 1 in C++ lol

PatrickMcGinnisII: and says if I do 1 in java I'l level up, but I assume that is for an already unsolved puzzle

PatrickMcGinnisII: er 6 in java

Wontonimo: nope, you can solve the same puzzle in every lang to get the lang count

jdsigg: Check out my page. I mainly do JavaScript, but all other "solved 1 with language x" badges came from the same puzzle

(tried to solve one puzzle with all languages)

jdsigg: Only got big XP for the first solve, like Wontonimo mentions

PatrickMcGinnisII: ahh +10xp for 1 puzz in a lang

darkhorse64: optims count as puzzles

darkhorse64: code golf too

jdsigg: Some languages translate quite nicely to others. Could be favorable to pick solutions to repeat in groupings!

I find JS, TS, Java, and Ruby are nice to transition between :)

darkhorse64: TS = JS with a twist

jdsigg: ^

jdsigg: or JS = TS :dizzy_face:

darkhorse64: I mean you can tell TS to use your JS code

PatrickMcGinnisII: number of 6's in 1 digits = 1 number of 6's in 19 digits = 1206736529597136217

PatrickMcGinnisII: tx Wontonimo that's kinda fun

Seiryn: TS = JS but more safely

darkhorse64: When I say TS = JS, I am referring to the fact that you can run JS under TS hood (unsafe mode ?) and farm achievement languages more easily

Wontonimo: :unamused:

Wontonimo: what's the point?

darkhorse64: farming

Wontonimo: sounds like work

darkhorse64: yeah, it's boring

darkhorse64: but it's here ...

Wontonimo: if i want to be bored I could just log off CG and actually get back to work

darkhorse64: With CoC, language achievements is the thing I least appreciated

darkhorse64: afk

Wontonimo: "Solve clashes with 3 different languages" - I forgot about this achievement

Wontonimo: the "win 3 games in a row" was the one I least appreciated. Made me not like CoC

PatrickMcGinnisII: the play 50 games sucked, now it wants 100

PatrickMcGinnisII: is there an achievement after 100?

Wontonimo: 500

PatrickMcGinnisII: no wonder people are trying to bot CoC

piratas: for me the hardest achievement was win 3 shortest clashes

piratas: after that i got almost everything without even doing it

PatrickMcGinnisII: damn, raining...was gonna cut the lawn

PatrickMcGinnisII: might finish these puzzles

Wontonimo: it's not raining here, so come on over and cut my lawn

Wontonimo: you'll have to watch for the dog bombs though

Wontonimo: gtg , see ya later

PatrickMcGinnisII: glhf

Aman918an: hi

Maazo_o: hi

PatrickMcGinnisII: 1 more puzzle done

Aman918an: how should i start

Aman918an: i am new

Aman918an: please help

Maazo_o: Are you here to learn coding for the first time?

Aman918an: yes

Cybertron415: https://escape.codingame.com/game-session/gxw-zsD-t1J-OPu

Cybertron415: anyone?

Aman918an: anyone please tell me how should i start coding for python

Mohammed_Galal: yeah sure Aman918an

Default avatar.png end-y: find a project that u need and start coding

PatrickMcGinnisII: 1 more puzzle down

PatrickMcGinnisII: that's 3 today

PatrickMcGinnisII: 11 xp to lvl, sigh

eulerscheZahl: just create a game but keep it WIP for years. easily worth 3000 points

PatrickMcGinnisII: fer da votes?

eulerscheZahl: 10XP per upvote. 0 per downvote

PatrickMcGinnisII: lvl will have to wait, RL calling.

Westicles: must... not... level... him... up

PatrickMcGinnisII: don't worry, no one is catching up to you

Westicles: I meant it is hard to resist the urge to do it

PatrickMcGinnisII: ahh, i heard it in a classic capt. kirk voice

PatrickMcGinnisII: glhf...:pizza: :point_right:

Westicles: congrats

king_akshat: hii

Maazo_o: hola

Comrade_Thotsky: joe

jacek: :upside_down:

MiyamuraIzumi: goooooo

MiyamuraIzumi: :expressionless:

MiyamuraIzumi: :cooking:

eulerscheZahl: the chat is getting spammy, isn't it?

BlaiseEbuth: Ban everyone

eulerscheZahl: shall I start with you?

BlaiseEbuth: Do your job

eulerscheZahl: https://external-preview.redd.it/8DeMRXj5fKblUQpy0joel8CsTeeQG6mbho469g4C210.jpg?width=960&crop=smart&auto=webp&s=72f4b5ad20c298b5701ea114ccae9b64026f4a8e

BlaiseEbuth: Do what you must because you can

eulerscheZahl: i see my appearance on the chat as an official warning. further emoji spamming or similar will result in a kick

eulerscheZahl: only 4 mods online, 2 of which rarely show up on world

jacek: frog apperance on wednesdays is a tradition

eulerscheZahl: frog going to bed as well

eulerscheZahl: Astrobytes you are in charge of the trolls now

Astrobytes: I'm busy but pingable

Uljahn: Automaton2000: no fun allowed

Automaton2000: actually that long vertical line was "invented" by automatonnn

Astrobytes: :D

Astrobytes: That's a classic right there.

BlaiseEbuth: What line?

Wontonimo: Aman918an if you are learning python you may find this site useful https://www.hackinscience.org/exercises/

Wontonimo: This site is better once you know about concepts like: "if/then", "for", "arrays", "dictionaries", "functions", and "loops"

Default avatar.png apoorv: Hello world

Default avatar.png apoorv: get it

Default avatar.png apoorv: bc im texting world

Astrobytes: You're a natural. Get on the standup circuit immediately.

Default avatar.png Gvinfinity: lol, I actually laughed at this...

Astrobytes: Which part?

Ashraful: The website is behaving slowly

Ashraful: The progress bar fills up and goes down again

k2xl: clash of code broken?

Justin-Truong: really

Justin-Truong: Is there anyone free

Wontonimo: no one owns me

Wontonimo: arn't we all free?

Justin-Truong: Yeah

Wontonimo: nice

Wontonimo: do you want help with something?

Justin-Truong: Play codeescape

Wontonimo: no thanks

Justin-Truong: Ok

Justin-Truong: What is the best place to learn many language like you Wontonimo

Wontonimo: job dissatisfaction

Default avatar.png Allison: ^ best encouragement to learn ever.

Wontonimo: seriously, when I'm not all that happy with what I'm doing at work I use that to look around at what interests me

Wontonimo: learn that in my spare time, try to weave it into my current job if possible, then take the plunge in a new position or job

Default avatar.png Allison: Or when the company you work for completely screws you over? :P

Wontonimo: are you spying on me? :P

Justin-Truong: Oh I can't learn that method :grin:

Default avatar.png Allison: Nah, just recently happened to me.

Wontonimo: okay, said another way that may apply to you Justin-Truong - each language has certain benefits. Embrace a new language for its benefits

Justin-Truong: Ok thanks :open_mouth:

Default avatar.png Allison: Used to be in a super high stress/busy position at work that basically helped the company I work for do what it needed to do every night. They then said, hey, you can either go to this position that is a hell of a lot less stress, no longer doing what you're currently doing, and get paid more, or you can keep doing what you're doing, and then some, and get paid less. Whatcha want?

Justin-Truong: You guy all cool can learn from stress :scream:

Default avatar.png Allison: More like anger/job dissatisfaction, like Wontonim said.

Justin-Truong: Thanks all

Wontonimo: learn one language really well first

Default avatar.png RoyGerman: is this website better than leetcode ?

Wontonimo: i don't go to leetcode. this site has BOT BATTLES !

Default avatar.png Allison: Lol....

Justin-Truong: Just in bot programe

Justin-Truong: Leetcode is nice to

Justin-Truong: too

Wontonimo: yeah, i was able to improve my Space Shooter bot https://www.codingame.com/ide/puzzle/space-shooter

Wontonimo: finally broke into the top 20

Wontonimo: using .... wait for it ... ** PID Controllers **

Default avatar.png Allison: PID controllers =/= healthy. :P

Justin-Truong: yeah I just use wait and i got to top8 in wood 2

Wontonimo: what? oh come on Allison

Default avatar.png Allison: :D :D :D

Default avatar.png Allison: :stuck_out_tongue_closed_eyes:

Wontonimo: oh, you got into GOLD today

Wontonimo: but your bot is now broken because there are 2 pods and you are not reading the input correctly

Default avatar.png Allison: Yeah, it literally went Bronze -> Silver -> Gold all within an hour or two.

Justin-Truong: so fast

Default avatar.png Allison: Yeah, been working on fixing it and it currently errors out.

Default avatar.png Allison: It's all Wont's fault. >___<'

Wontonimo: there is a circle arrow in the upper right hand corner

Wontonimo: click that to get the new default code

Wontonimo: then you can access your old code in the history

Default avatar.png Allison: Yeah, just working on parsing it through, since I'm kind of refactoring it at the same time.

Wontonimo: the new code is just boilerplate code but will actually read the data properly

Default avatar.png Allison: He like... slammed my face into a rough understanding of PID controllers.

Default avatar.png Allison: I'm just having issues with how I'm refactoring it and kind of throw it at a wall for now to fester while I think about it.

Wontonimo: just start with getting the code to aim the pods directly at the checkpoint and submit that

Wontonimo: it will surely do better than the current code that errors out

Default avatar.png Allison: Truuuue. Will definitely jump at least a few hundred places, since right now everyone else I'm around is also just erroring.

Default avatar.png Allison: Omg... I just figured out *why* it was erroring.

Wontonimo: and why?

Default avatar.png Allison: Wasn't initializing a variable.

Wontonimo: i'm waiting for you to submit :sleeping:

Default avatar.png Allison: Patience young skywalker. :D

Default avatar.png Allison: I may have figured out why it was erroring, but I still need to figure out some other things.

Default avatar.png Allison: There. Submitted.

Default avatar.png Allison: And promptly broken again. :D

jdsigg: Any tips on the problem "Heart of the City" ?

I have a solution that is not efficient enough. It is correct, but not valid for massive inputs. Would welcome a discussion

Wontonimo: oh wow, i got 7th in space shooter :O

Wontonimo: sure, let me take a look jdsigg

jdsigg: cool cool

Wontonimo: it definitely is a pattern

Wontonimo: how are you solving it (high level, don't paste code plz)

Wontonimo: what i can tell right off is that you only see 1 builting NSEW no matter the size

jdsigg: Sure. I have recognized that once I see a vector branching from the origin to a point, I can no longer see a vector with that same slope

So, basically, iterate over all possible vectors in one quadrant, use a set to track the slopes, the size of the set after this represents the number of buildings in one quadrant I can see. size*4 + 4 (one for each cardinal direction) is the answer

Wontonimo: and that the 4 corners are just mirrors of eachother, so there is only a point of solving 1 and then *4

jdsigg: Sounds like we are saying the same thing. The problem with my approach is definitely the "iterate over all vectors in a single quadrant"

Wontonimo: okay, so you have a brute force solution that works up to what size?

jdsigg: First four test cases pass. Test case 5 is first failure: 999999

jdsigg: Time out error, not incorrect answer

Wontonimo: test 4 is 33. Okay, so you can do up to 33 which means you have from 1 to 33 that you can generate all the answers to as unit tests for once we uncover the "magic" solution

Wontonimo: Can you also generate pictures like the example? Could you generate a picture for n=11 for us and paste it here?

jdsigg: Sure. Give me a sec

Wontonimo: :thumbsup:

Wontonimo: if you can replace B with "." that would be better

jdsigg: sounds good

jdsigg: Standard Output Stream: http://chat.codingame.com/pastebin/5aa1014e-fd09-4d67-9db7-7cc6def832f1

jdsigg: Here is the upper right quadrant

jdsigg: For N = 33, also

jdsigg: Standard Output Stream: http://chat.codingame.com/pastebin/65ed9a9c-0191-4515-a0c2-69e805b89791

Wontonimo: just a sec

jdsigg: no rush

Wontonimo: okay ... interesting. could you also print out the answers for 1,3,5,7 ... 33

jdsigg: Standard Output Stream: http://chat.codingame.com/pastebin/78d22771-b7bb-4431-84ef-b64c35d03acf

jdsigg: That ok?

Wontonimo: oh, sorry, i should have been more specific. i meant the output. like n=3 answer=8

jdsigg: No problem. One sec

SlumDawgg: has anyone solved "the lucky number" in java? i havent found any solution that has passed all test cases

jdsigg: Standard Output Stream: http://chat.codingame.com/pastebin/d5b78e89-685f-4719-8d73-5840e725c2a3

jdsigg: SlumDawgg that is also a problem I am struggling with because of runtime

SlumDawgg: yeah, those last two cases are unsolvable imo, ive tried literally everything in Java

SlumDawgg: even using Big Integer class

jdsigg: I don't think brute force is the approach. There is a pattern of sorts. Probably something Number Theory wise

Wontonimo: yeah i solved lucky number

Wontonimo: you may find this link useful for lucky number https://oeis.org/A016185

Wontonimo: hint, for a number for 16 digits, it is solvable with 16 iterations. For the hardest test case my python code takes less than 0.004 seconds

jdsigg: Gonna take a break for the evening on this one. Might be good to sleep on it

Thanks for the extra set of eyes Wontonimo. Feel free to pm me if you have thoughts

jdsigg: Tried fitting it with a regression btw. No luck

Wontonimo: well, that puzzle has me stumped tbh

PatrickMcGinnisII: hmm, someone pushed me over the top...to lvl 37