Chat:World/2021-03-21

From CG community
Revision as of 12:02, 15 June 2021 by Chat Log (talk | contribs) (Created page with "File:Default_avatar.png ShishirTiwari: hello world File:Default_avatar.png ShishirTiwari: what!! there is no one in the world,how in the world that is even possible...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Default avatar.png ShishirTiwari: hello world

Default avatar.png ShishirTiwari: what!! there is no one in the world,how in the world that is even possible

zapakh: You can say hello to the world, but it cannot say hello back.

Default avatar.png snoyes: You've never heard an echo?

zapakh: never heard an echo

zapakh: heard an echo

zapakh: an echo

zapakh: echo

zapakh: ...

jacek: meow?

Default avatar.png kunal_lingwal: bhaw bhaw

jacek: :3

adarshbolettin: hi

Default avatar.png kunal_lingwal: supp

Default avatar.png kunal_lingwal: 8==D

adarshbolettin: dont know

N_Flamel: wtf

Default avatar.png kunal_lingwal: lmao

Default avatar.png kunal_lingwal: supp bros?

peteje: sup bro?

peteje: 8==D?

InCog: false

MadKnight: hey InCog

peteje: no hey for me tho? kys

zapakh: D:

peteje: bash cringe bro

zapakh: D: D: D:

peteje: :eyes:

InCog: hey MadKnight

MadKnight: what are u working on ?

InCog: some puzzle called regular polygons

InCog: https://www.codingame.com/ide/puzzle/regular-polygons

peteje: zap wtf is that shit man

peteje: that perl shit

zapakh: It's exactly what it looks like

peteje: kys gtfo with that pussy shit man

zapakh: hahaah

zapakh: no u

peteje: use a respect lang

peteje: problem?

peteje: have fun getting a job with that shit bro

peteje: js

peteje: jfc

zapakh: Haha have fun getting a job

peteje: yeah i have one bro

zapakh: Yeah that's kind of my point

peteje: ????

peteje: nice burn idiot

peteje: ever had sex tho?

zapakh: Enjoy judging your self-worth by enriching the boss

peteje: ever been to aleppo?

peteje: i am the boss kid

peteje: ever heard of me? jeff?

zapakh: Nope

peteje: could buy you kid

peteje: tbh not even lyin

zapakh: At least I'm not an asshole

peteje: cap

peteje: perl using

peteje: mf

peteje: im sorry

peteje: ill sub twitch prime

peteje: anything helps

zapakh: All is forgiven

peteje: what is the #subgoal?

zapakh: Like, one.

peteje: ah nice

peteje: you will find one some day

peteje: not me doe :joy:

peteje: arch btw

struct: He is banned now.

zapakh: Sorry for swearing

struct: np

struct: what you said wasnt 1/100 as bad

InCog: what did he even say lol

zapakh: I feel better now tho :joy:

InCog: oh

InCog: bruh

zapakh: Who knew my perl could be so triggering?

struct: He took CoC to extreme

jacek: huh

Default avatar.png Xzoky174: hi

-oa-: hello world!

DaNinja: elo

InCog: http://chat.codingame.com/pastebin/a05b4e96-9577-4122-8c3e-c1f061a0619d

InCog: what does that mean

InCog: its an error I got

DaNinja: JavaScript heap out of memory

InCog: ty

Default avatar.png RandomCodeX: b4bvbnuy

Default avatar.png RandomCodeX: .7hb4v4 4 444 44h444hn4n44202 20020 0 20m ≤≥,m. m,202.≤≥µ.0¬≥≥¬

AntiSquid: RandomCodeX wtf is that cryptic message?

InCog: if he told you it wouldnt be cryptic anymore

[kirr]: l

Default avatar.png GarageBap: how can I debug in GoLang? fmt.Fprintln(os.Stderr, "Debug messages...") this is giving me an error, because "os" is unknown. how do I initialize the outputstream? can anyone help?

jacek: this line works for me

jacek: do you have import "os"

Default avatar.png GarageBap: yes, there was no import. thank you!

Default avatar.png TheAlps: Hello everyone :)

Default avatar.png GarageBap: hi!

Default avatar.png TheAlps: How you doin ?

AY09: hello

InCog: can someone help optimize my code for js cause I cant see to iterate over a loop of huge range with out timing out

InCog: http://chat.codingame.com/pastebin/79138be1-1245-4458-99d4-5be43cbb086b

InCog: https://www.codingame.com/ide/puzzle/regular-polygons

InCog: the puzzle

DaNinja: you missing a -1 on the length in your for loop?

InCog: no as in it passes all the validators

InCog: guessing cause x%NaN is just undefined which is not zero

InCog: but for some reason its too unpotimized

InCog: and I have pretty much removed all possible loops other than the ones needed

Westicles: You are looping up to 2 billion

InCog: ye but idk how I would go about the puzzle without checking each n side polygon if its possible

InCog: my only other guess is you create an array with all the values then pop all multiples of invalid numbers

InCog: but then I would still have to loop over the initial array to pop them out

Westicles: There are only 31 fermat primes in this range, so you only need to loop over them

InCog: oh wait there are 31?

InCog: I mean currently I only have 5 so if theres 31 its just gonna be longer right?

Westicles: Oh, there are only 5. The 31 is this https://oeis.org/A001317

InCog: yeah

InCog: I am inclined to just estimate that anything after a billion isnt correct

Westicles: I did this puzzle a while back so don't remember much, but looks like I have two loops of 31 each

InCog: two seperate loops or nested

Westicles: nested

InCog: what language?

Westicles: C++

InCog: hmph

DaNinja: two separate loops works in js

InCog: yeah but not sure if its too unoptimized cause of the language or cause I suck

Westicles: Well, looping to 2 billion is going to be quite a bit slower than looping to 31...

InCog: true

AntiSquid: have you tried precomputing the primes?

InCog: as in all the primes are in a list cause the primes needed are extremely small

InCog: like only 5 values

AntiSquid: oh

AntiSquid: ya well i bet you have bug somewhere

InCog: Idts because I pass all the validators except for the last one

InCog: and thats cause it times out

InCog: not cause it fails

AntiSquid: didnt mean timeout bug

InCog: oh

AntiSquid: what about last test case then? or just validator?

InCog: both

Westicles: He is checking every number instead of just the powers of 2

InCog: oh bruh thats actually so smart

AntiSquid: so you have problems with big numbers

InCog: yeah

KiwiTae: o/

AntiSquid: hi

KiwiTae: hello squidi

AntiSquid: lol

InCog: Westicles I think that may actually solve the problem

Westicles: ah, great

AntiSquid: how are things inside best China? KiwiTae

AntiSquid: and how is other china treating you ?

KiwiTae: Im in europe atm , Taiwan is not China ~~

DaNinja: first loop to 31 counts the values within a,b. The second loop to 31 uses the fermat numbers to count the rest

AntiSquid: oh whereabout in europe

KiwiTae: just changed job 3months ago forgot to update my flag lol im in northwest of France on the seasside

AntiSquid: well republic of china, but other china won't like calling best china, china

KiwiTae: ><

DaNinja: * first loop to 31 counts the Math.pow(2,i) values within a,b

Westicles: Lots of weird propaganda in the US news about asians. I think not a good portent for Taiwan

InCog: DaNinja yeah imma do that now

AntiSquid: which kind of Westicles ? only seen the news about some asian guy being shot by a non-white and then blm protest against white supremacy

AntiSquid: congratz on your new job KiwiTae

AntiSquid: and i was just making a joke based on the fact that China (the big country) doesn't like to acknowledge Taiwan as a country

jacek: oO

Westicles: There is a flood of stories about racism against China about covid. The conspiracy theory is they are building a cancel culture on anything anti-China to suppress backlash if they take back Taiwan

KiwiTae: AntiSquid thanks :D

AntiSquid: doesn't sound like a theory lol

AntiSquid: not sure if you've seen the news UK plans to take in 300k Hong Kongers ...

Westicles: I sure they will integrate just like the rest of your recent imports

Westicles: aka not at all

AntiSquid: depends on each individual

Westicles: Not much of a religious component at least

AntiSquid: the people that usually don't integrate are either illegals or do dodgy business here, aka albanian drug lords which couldn't even be kicked out since it would be illegal under EU law

InCog: wait I am kind of stupid but is there a way to generate out all the multiples of a few values

InCog: like given a set of number can you churn out all the possible combinations

InCog: of products of numbers there can be

InCog: cause I am doing it manually and I realized that I am kind of an idiot

AntiSquid: precompute numbers of 2 to the power ... make an array

AntiSquid: or whatever

AntiSquid: what does your code look like anyway InCog ?

InCog: rn

InCog: nothing

jacek: 2 ** n? so 1 << n ?

Default avatar.png sonic1991: hi

Default avatar.png sonic1991: Did you make algo of the week ? "Flower beds"

InCog: can i ask in js is there a cleaner way to do this var array = [1,3,5,17,257,65537,3*5,3*17,3*257,3*65537,17*5,257*17,5*257,5*65537,65537*17,257*65537,3*5*17*257*65537,3*5*17,3*5*257,3*5*65537,3*17*257,3*17*65537,3*257*65537,5*257*17,5*257*65537,5*17*65537,17*257*65537,5*17*257*65537,3*17*257*65537,3*5*257*65537,3*5*17*65537,3*5*17*257]

InCog: like

InCog: to generate out all the combinations of multiples

Default avatar.png MAST3R: hi I'll become best programmer kurwy jebane\

jacek: Oo

Default avatar.png MAST3R: siema

Westicles: a(n+1) = a(n) XOR 2*a(n)

geppoz: InCog there should be 2^5 combinations, you can use binary enum to generate

InCog: aight thanks

geppoz: for (let i=0;i<32;i++){

   all.push(((i&1)!=0?3:1)*((i&2)!=0?5:1)*((i&4)!=0?17:1)*((i&8)!=0?257:1)*((i&16)!=0?65537:1));

}

Default avatar.png Tonnoaw: anyone code in C++?

AntiSquid: lots of people do

Default avatar.png Tonnoaw: how will they win in shortest mode

geppoz: any worth to be in this chat :D

AntiSquid: Tonnoaw clash isn't the best part of this site

AntiSquid: to put it nicely

jacek: are there any other parts of this site?

InCog: the multiplayers

InCog: the puzzles

jacek: oO

AntiSquid: InCog, he was being sarcastic / joking

InCog: I couldnt tell

jacek: :scream:

AntiSquid: most people only know about clash, InCog

InCog: thats quite sad

Default avatar.png AnushaDsouza: I AM LOVING THE PUZZLES

geppoz: ty InCog , loved that puzzle ;)

InCog: what the regular polygon one

InCog: a pain in the ass

geppoz: nah, quite fun

InCog: depends

InCog: you didnt spend an hour trying to optimize looping over an array of billion integers

InCog: only to realize a much quicker and easier solution

geppoz: well, no need to looping more that 32 times...

InCog: 32*32 to be exact

InCog: but yeah

InCog: oh well

geppoz: I just looped twice 32 times

geppoz: once for a and once for b

InCog: oh lol I nested the loops

geppoz: no need

InCog: yeah I should probs fix it if there is a faster method

InCog: but nvm maybe tmrw

geppoz: anyway, general rule, when you see inputs range so huge neither waste a second trying a full loop on that ;)

InCog: yep

InCog: learnt my lesson

geppoz: and, second hint, when asked for search between two numbers A and B, often more easy to find answers like f(B)-f(A) and implement just an f()

InCog: what do you mean by that

InCog: like if x^2 then dont loop through all but loop through all the possible squares only?

geppoz: in that case, I just did a function that find how many solution are below n: solutionsBelow(n)

geppoz: then the answer is solutionsBelow(b)-solutionsBelow(a-1)

geppoz: in the meaning that is more difficult to search between two numbers that below one number

geppoz: so i search below one number (twice)

InCog: oh aight

Default avatar.png FocusTurtle: hi

geppoz: that happens in other problems too... maybe this morning i used that method again in a CoC

InCog: oh so like a summation notation you would change the lower range to zero - the summation with an upper range a and lower base zero

Wontonimo: AnushaDsouza "I AM LOVING THE PUZZLES" - spread the word!

jacek: dat grammar

AntiSquid: looks fine @_@ Automaton2000 can you spot any errors?

Automaton2000: it's not a problem for me in the right direction

jacek: welp im not native english speaker

jacek: but it seemed off for me

InCog: spread the word does sound grammatically incorrect

AntiSquid: think he meant the i am loving it

AntiSquid: part

Wontonimo: "spread the word" is an English phrase which means "tell others about it". It's a common phrase

jacek: "loving it"

jacek: i thought expressing emotions dont have present continuous

AntiSquid: it's an alternative way of saying "i am enjoying" it

Wontonimo: no

InCog: Seriously, never heard of it

AntiSquid: common here

Default avatar.png AnushaDsouza: @Wontonimo : Deal!!

Wontonimo: it has a religious connotation to tell others as if you are on a mission of god

AntiSquid: jacek just treat it as an idiom i guess

Default avatar.png AnushaDsouza: "religious connotation" .. facePalms!

AntiSquid: i hear it when people talk about how they feel about an experience

AntiSquid: for example: "How are you finding your new job." => "I'm loving it."

AntiSquid: might be a well paid job

AntiSquid: my grammar isn't perfect sometimes, i fuck up a lot of sentences @_@

InCog: can I just say

Default avatar.png AnushaDsouza: along the lines where the work at job dosnt feel like burden but make you look forward to it everyday... the puzzles here have me hooked, i just woke up today and wanted to solve more!... the best part is after i solve a puzzle i can compare my solution to others and improve my solution

InCog: most of the maths puzzles here

InCog: are easily cheatab;e

InCog: cheatable

BlaiseEbuth: Stop worshiping your job

InCog: like they all have some formula which have already been figured out

InCog: making them kinda pointless

AntiSquid: was an example BlaiseEbuth

BlaiseEbuth: :3

Default avatar.png AnushaDsouza: depends on the person.... if we wanna improve or just wanna be in limelight

AntiSquid: you could be on holiday in a country with no lockdown and someone asks how's your holiday and you can answer "I'm loving it!"

InCog: No as in like if you do end up researching more about the formula sometimes you unknowingly get the answer

InCog: doesnt mean you are actively cheating

InCog: but its not through code

Default avatar.png AnushaDsouza: when it comes to coding, as long as one can understand the research and implement it, i think its great.... i have tried to train fresher's who would directly just copy paste a solution and then complain they have error.... thats what i call cheating

AntiSquid: that's my annoyance with the math puzzles, the creators most likely found out about some formula on a numberphile video or elsewhere and then they decide to make a puzzle based on it while also trying to hide where they got the idea from, they should definitely state somewhere what math formula it's based on

InCog: yeah

Default avatar.png PeakMaster: yo!

InCog: then it comes down to writing out the formula in code

InCog: and no longer about how you solved it yourself

AntiSquid: and what am i supposed to do? reinvent the formula?

InCog: I mean its an easy way of getting points for a puzzle though so I am not too annoyed

Default avatar.png AnushaDsouza: whats the fun in that? the fun part is figuring out the formula!

geppoz: well

geppoz: in this last puzzle

AntiSquid: if you keep researching the solution you'll eventually stumble upon the formula

InCog: nah nah as in like this puzzle called carmichael numbers

AntiSquid: and this is a coding site, is this supposed to test your math skills ?

InCog: is like quite easy once you research it

geppoz: i just figured out the solution, it is not need to know the specific theory behind

InCog: but its really hard if you dk how to do

InCog: so then I am kinda inclined to just use the formula online and get the answers afterwards to see the proper way of doing it

Default avatar.png AnushaDsouza: i guess...

AntiSquid: https://www.codingame.com/share-replay/535577758 here last test case without know about the formula, i almost aproximated the solution through different means, but what's the point of me tweaking numbers until it works?

AntiSquid: and here with the formula : https://www.codingame.com/replay/488029795

AntiSquid: knowing *

InCog: lol

InCog: thats actually pretty funny

AntiSquid: as you can see i almost done it just with approximating values ... could train an NN i guess but it's all about knowing the formula since that's the most efficient way and therefore the right way to do it, that's why the bloody math formula should be mentioned in the god damn statement

InCog: what level difficulty was it

AntiSquid: i should go nervously downvote all puzzles in contrib section that don't mention the formula

InCog: oh it was in the contrib section

AntiSquid: https://www.codingame.com/training/medium/escaping-the-cat

Default avatar.png AnushaDsouza: nooo

AntiSquid: it's medium

InCog: oh what

Default avatar.png AnushaDsouza: that was fun, i want to try that game

Default avatar.png AnushaDsouza: *puzzle

AntiSquid: formula is on numberphile, search for cat and mouse game

InCog: aight

InCog: I will probably try on my own first

AntiSquid: i am 100% certain that's where he got it from

Default avatar.png AnushaDsouza: gonna go now, got an interview here in codingame later in afternoon... wish me luck guys!

InCog: gluck

AntiSquid: and you could probably find the magic numbers to do it, but it's really all about guesswork without formula

AntiSquid: i am the 1 star voter on that puzzle btw

AntiSquid: there's only 1

jacek: what puzzle? botters of the galaxy?

Default avatar.png AnushaDsouza: i wonder... if the interviewer will look for formula or will appreciate the efforts if i go about applying my own logic....

SamSi: Hi where are the 5 min games here in codingame?

SamSi: I am coming back after a long time and I couldn't find it here

InCog: pretty certain if you know the formula then the interviewer sucks

InCog: SamSi you referring to CoC?

SamSi: The place where you need to solve some basic problem in 5 mins or something

SamSi: Yes CoC

Default avatar.png AnushaDsouza: CoC

InCog: uh check the pracitce

jacek: under compete tab

InCog: oh yeah

InCog: compete I mean

**AntiSquid kicks jacek

jacek: generally people struggle finding anything else than CoC

SamSi: Yep I was checking it under the practice tab :D

AntiSquid: no the "escape the cat" puzzle

SamSi: Shouldn't it be under the practice tab though

InCog: no

InCog: cause its a competition

InCog: though only bots play it most of the time

InCog: theres like 10 active players every hour

AntiSquid: SamSi those are not games, go to compete and then bot programming

Default avatar.png AnushaDsouza: i was pretty confident until now... now i am wondering if i should start my research by searching for formulas if im given a puzzle in interview...

AntiSquid: hm i wouldn't bother, they should give the god damn formula

Default avatar.png AnushaDsouza: lol

InCog: AnushDsouza I really doubt some guys gonna give you some complex theorem for you to figure out

AntiSquid: AnushaDsouza you're more likely to struggle with regex questions imo

AntiSquid: some interviews ask basic regex because they use them a lot

Default avatar.png AnushaDsouza: im a intermidiate level unity3D developer, so i think they will check my core logic grasp

AntiSquid: i mean in general, not CG specific

Default avatar.png AnushaDsouza: or they might ask to design a bot

AntiSquid: why not a multiplayer game?

AntiSquid: if your interview is on CG you probably do something similar to puzzles

Default avatar.png AnushaDsouza: i have 0 exp with multiplayer game, its mentioned in my cv... im learning now though

AntiSquid: doing a multiplayer for CG platform is different from a real multiplayer

AntiSquid: they won't ask that i doubt it at least lol

Default avatar.png AnushaDsouza: i guess... thanks for the cheer up guys..

Default avatar.png cicero06: ım not doıng anythıng

Default avatar.png cicero06: ı guess ım a stupıd

KiwiTae: AnushaDsouza just do your best if you failthis one u can try next one hehe

Default avatar.png Prostetnic_Jeltz: Here's a general thought about interviews: the job of the interviewer is to gauge your knowledge and ability. Ideally, they can sort of skip around and identify the edge of your ability. If they ask you only questions you know, then they have failed to sketch out the boundaries of your knowledge and ability.

jacek: winter wrap up winter wrap up ~

AntiSquid: depends what they're looking for lol

AntiSquid: jacek https://imgur.com/a/2OA2yOJ am i doing it right ?

jacek: :3

Default avatar.png thanos98: c'ami faaaa

jacek: :F

Default avatar.png BadnessFaded: hi

Default avatar.png BadnessFaded: i need learn a programming language


Default avatar.png BadnessFaded: but i need help

jacek: mhm

orangesnowfox: hey, jacek, I made my rust use beam search, ;)

jacek: :confounded:

orangesnowfox: Now it's 42 in 2048

orangesnowfox: jacek, what would you do if my rust code beat your c++ code?

jacek: ill ddos the cg

jacek: though guy behind me has nice avatar

orangesnowfox: lol

geppoz: lol solved that https://www.codingame.com/ide/puzzle/escaping-the-cat

geppoz: it was not so trivial as seems... for me at least...

leojean890: W1 reached in clobber.. just by luck:p

darkhorse64: welcome

darkhorse64: to real business

leojean890: because my winrate was not great in W1

leojean890: but I beat the boss

leojean890: made him 25 => 20

orangesnowfox: geppoz, I remember the basics of the solution to that lol

leojean890: and you all kill me in W1

leojean890: especialy u darkhorse64

leojean890: lly*

darkhorse64: I like fresh meat

leojean890: migrated python to cpp

leojean890: not hard in this game

leojean890: done for othello oware bull and cows 2 search race as well

KiwiTae: 1. make the boss loose score 2. better bots get pushed to bronze 3. resubmit 4. promoted

KiwiTae: :joy:

orangesnowfox: That's uhh... *a* way to do that

Kellthazar: Skynet Revolution Ep. 2 done! :D

jacek: good for you

AntiSquid: Kellthazar now beat jack here in multiplayer section for his snarky reply

Kellthazar: Hahaha AntiSquid, I think that I need to improve more my skills to be able to do well in multiplayer.

AntiSquid: just practice

AntiSquid: i mean play multiplayer

AntiSquid: watch some CG intro videos on youtube, they have decent tutorials to start

Kellthazar: Codingame is a bless... I was wasting my time playing "League of Legends", now I'm learning and have fun as well here. :) My objective now is finish all the classic puzzles.

jacek: now youre wasting time on codingame :\

wlesavo: beat jacek in coc ladderboard

KiwiTae: Kellthazar i got an idea beat jacek in Botters of the galaxy (get a LoL feel playing that multi)

jojoisyoyis: hello

Wontonimo: o/

Wontonimo: you go Kellthazar ! crush those puzzles

Wontonimo: orangesnowfox are you using any memorization in 2048 or is it all computed?

orangesnowfox: all computed I think?

orangesnowfox: Not sure what memorized would be

Wontonimo: like pre-computed offline

orangesnowfox: ah, no, it's all computed

Wontonimo: nice

orangesnowfox: Do a lot of people use memorized solutions?

Wontonimo: yes

Wontonimo: (i think)

Wontonimo: for optimization puzzles at least

orangesnowfox: hmm, I haven't run into any that allow memorized solutions I think

Wontonimo: for 2048 you are given the seed. you could compute the 1,000 moves offline for 1 board. When given that board, first play the 1000 precomputed moves

davilla: all the ones I've run into have random tests, so you can't memorize the entire solution... but given the seed it would always play out the same way

Wontonimo: weird, then why are the test cases numbered in 2048

davilla: memorization can be useful otherwise, you don't have to know the complete solution, for instance with opening chess moves, but then completing the game all computed

davilla: dunno I haven't done that one yet, maybe they want you to do that

Wontonimo: darkhorse64 , you worked on 2048, can you shed some light here?

Wontonimo: are the tests and validators different?

orangesnowfox: They aren't, except the "random" one

orangesnowfox: which is... Random, every time

Wontonimo: right, so you could hard just the start of one to get X number of moves pre-done.

orangesnowfox: Right... Also, 1k moves is potatos

Wontonimo: i see your 1k and raise you 2k

davilla: that's not how calling works :-P

orangesnowfox: ... My current code gets me to 16k in some seeds (possibly more or less in others)

Wontonimo: i'm checking my 290797 score

orangesnowfox: Although... I should take advantage of the fact that turn one gives me like... 20x more time

Wontonimo: ?!? you don't!?!

jacek: 2048 here is deterministic, so you can make 'opening books' for it

orangesnowfox: ... no?

orangesnowfox: jacek, do you?

jacek: no, i compute online

orangesnowfox: same

jacek: but if rust will beat me, then who knows

orangesnowfox: Do you take advantage of turn 1?

jacek: i compute more moves

orangesnowfox: ah, so you do. I don't.

jacek: noob

orangesnowfox: lol

orangesnowfox: And, because of random timeouts, I actually use `elapsed + average < 36ms` for detecting if I should make another move

jacek: i have 35ms some myself

jacek: and can rarely timeout :<

orangesnowfox: Yeah, I bumped it to 36, becuause the number of resubmits I have to do there aren't that bad

orangesnowfox: ... mind you, not that bad means between 1 and 3 submits total

orangesnowfox: I could probably also be detecting time better than I do, who knows, maybe I spend a couple ms locking and unlocking stdin

orangesnowfox: nah, only like 5 micros

AY09: hello

Wontonimo: \o

jacek: people are so nice, pushing me in uttt

jacek: im 3rd, when i submitted month ago i was 7th

orangesnowfox: But yeah... I suppose if I actually used turn 1 properly, I'd have like... Hmm, I have about 58%-72% time efficiency (spending 29-36ms per turn)... that's worth like 30 turns wao

orangesnowfox: I mean, it's not the biggest timesave I've had, but knowing I have a free 30 turns worth of slack I can pick up is good to know

Wontonimo: jacek - that's not "people", it's MSmit s and kov i

jacek: and the pikachu earlier

Wontonimo: it's not been nice for me.... i got pushed down :(

jacek: time to go back to uttt :imp:

orangesnowfox: Hey, jacek, anything you do other than tune your beam search?

Wontonimo: no ... i've got to resist. I wanna get my global leaderboard score up, and a few more positions on uttt ain't really gonna move me much

jacek: beam search? o.O

jacek: i use minimax-like

jacek: Wontonimo whatre you doing now

Wontonimo: i do depth search using a heuristic with inefficient java code

orangesnowfox: jacek, wait, you use minimax like? Do you use heuristics other than the direct score?

jacek: yes, like snake-like tiles

orangesnowfox: I... Have been using 0 domain specific knowledge

Wontonimo: jacek I did a real hack attempt on SC2020 with no simulation. so going back and actually writing a proper simulator+search

jacek: i attempted to do td learning but probably was very buggy and didnt learn anything

jacek: sc2020?

orangesnowfox: Spring Challenge 2020 probably?

Wontonimo: Spring Challenge 2020 - the pacman battle thing

jacek: why do people use weird acronyms

Wontonimo: i didn't before, but after a few months of seeing everyone else doing it i thought it was a requirement for being part of the cool crowd here

Wontonimo: lol

orangesnowfox: https://www.codingame.com/replay/535624091 jacek, my bot literally just uses "throw more compute"

jacek: you got the balls to share 2048 replay

orangesnowfox: ... wat?

Wontonimo: why not?

jacek: how much does it weight

jacek: for some people its too heavy

jacek: :v

orangesnowfox: oh, right, that

orangesnowfox: it weighs over 15k moves :p

jacek: and this is heuristic https://www.softwire.com/blog/wp-content/uploads/2014/07/2048Example.jpg

orangesnowfox: Yeah... If my bot did that, it's emergent behavior

Wontonimo: ^^ that's the heuristic i use

orangesnowfox: tfw y'all use complex scoring heuristics

jacek: i weight tiles with something like this

jacek: http://chat.codingame.com/pastebin/a8825a5b-8354-4f4d-b954-0c70d2ee178c

Wontonimo: by p[x,y] > p[x+1,y] then yes

orangesnowfox: cg pastebin doesn't load for me

jacek: then no heuristics for you

jacek: it isnt in rust anyway

orangesnowfox: lol, as if I haven't written a CSB bot in C++

jacek: few ifs dont count

orangesnowfox: legend :D

jacek: few ifs dont count

orangesnowfox: ... But my bot literally outranks yours, so I guess yours doesn't count either

jacek: i wasnt serious in my csb

orangesnowfox: ah

orangesnowfox: What heavy compute bots do you have that you took seriously?

Wontonimo: i see you are 226th in CSB

jacek: mostly board games

jacek: breakthrough, uttt, checkers, othello, chess, oware, onitama, ...

orangesnowfox: ah, I couldn't figure a nice way to lay out data for uttt

orangesnowfox: because 9

jacek: rust doesnt support 9?

orangesnowfox: lol, no, I was trying to bitset

orangesnowfox: well, bit map

orangesnowfox: bitvec? whatever

orangesnowfox: Got demotivated because checking win conditions is pain

jacek: hm? its just lookup 512 states

Wontonimo: return if players bitmap in winconditionHash

Wontonimo: return if players bitmap in winconditionLookup (not hash)

orangesnowfox: welp, I guess I should get around to setting up those 512 states

darkhorse64: Wontonimo: I have a beam search with a snake like evaluation. I surely missed something because others are much higher with similar soutions

orangesnowfox: darkhorse: maybe you're leaving perf on the table somewhere? Or others are using opening books

orangesnowfox: err, darkhorse64: see above

orangesnowfox: meant to ping

jacek: tab plx

Wontonimo: that's a great idea. i've done something similar but realized I messed it up and now it isn't beam but just depth darkhorse64

Default avatar.png UnnamedCodinGamer: the trick that did it for me was to use the whole time you have including for the turns for one continuous beam search

orangesnowfox: Also, is there a better way to do `can_move` / `apply_move` than the ref?

orangesnowfox: Other than making can_move short circuit because... well

Default avatar.png UnnamedCodinGamer: basically at the end of each turn you remember your best found move, apply the path to it and start from there the next turn

orangesnowfox: mmm, the tricky thing there is that sometimes one of the other N-1 beams will be tied for score or have less score (but not to the point of elimination)

orangesnowfox: and then those turn out to be better in like 5 more moves

Default avatar.png UnnamedCodinGamer: kr

darkhorse64: It's not a performance issue rather something tied to the evaluation that makes me select the wrong beams

orangesnowfox: I actually only take the first N moves of a beam

orangesnowfox: Lets me restart whenever they converge

darkhorse64: I also do that to prevent going into dead ends

orangesnowfox: Yeah...

orangesnowfox: Especially when your depth is decently high compared to the beam size

leojean890: Astrobytes : now you kill me ;)

leojean890: 100%

leojean890: not when I pushed

leojean890: well.. I timeout, idk why^^

jacek: o:

jacek: astro after submit https://www.youtube.com/watch?v=J---aiyznGQ

Default avatar.png UnnamedCodinGamer: darkhorse64

Default avatar.png UnnamedCodinGamer: {{1073741824,268435456,67108864,16777216}, {65536,262144,1048576,4194304}, {16384,4096,1024,256}, {1,4,16,64}};

Default avatar.png UnnamedCodinGamer: this is the evaluation that I use

Default avatar.png UnnamedCodinGamer: the other thing is to make your beam search carry on turn after turn, as I mentioned

darkhorse64: ofc

Default avatar.png UnnamedCodinGamer: locally I get the same results in one continuous search

Default avatar.png UnnamedCodinGamer: I guess the top guys are doing the same but with even better evaluation

jacek: or... they cheat :O

Default avatar.png UnnamedCodinGamer: how so?

davilla: I tried cheating, it's really hard

jacek: eric timeouting ~

leojean890: I'm doing shit on clobber w1 hmm

leojean890: mass losing

jacek: youre timeouting also

leojean890: yes ik^^

leojean890: my cpp is not very fast

jacek: no pragmas?

jacek: increase your safe time buffer

jacek: im usng only 90ms

leojean890: weirdly not faster than my python I think xD

leojean890: I use pragmas

leojean890: and weirdly I never timeout against boss W2 and 100% winrate..

jacek: then how can it be not faster than python

leojean890: I'm missing something

leojean890: I was careful about not copying data when I don't want (ref/pointers)

leojean890: but still slow

leojean890: :s

jacek: using vectors and not using reserve?

leojean890: maybe it's timeouts related to bugs in my code as well

leojean890: yes without reserve:p

leojean890: using reserve is better, ik (or arrays)

davilla: python compiles pretty optimally

leojean890: puqh <ith python, but more loses

leojean890: push with*

leojean890: will re-take my cpp

Default avatar.png Midori404: Can someone please help me? https://forum.codingame.com/t/the-descent-puzzle-discussion/1332/463?u=midori404

davilla: I'm kinda new here so I don't know how to look at your code, Midori

jacek: Midori404 you could paste your code here :v

Default avatar.png Midori404: It's okay. :) I'm new as well.

Default avatar.png Midori404: Oh okay one sec. Though it's not technically my code. It's based on a video I was following along with since I couldn't figure out the Descent game. Anyways one sec thank you

Default avatar.png Midori404: http://chat.codingame.com/pastebin/c3f6387a-8c1f-47c6-87ea-b4c2694f1c0f

davilla: you're outputting a string

davilla: it's not outputting the value of the variable, it's outputting the name

davilla: because it's in quotes

jacek: remove the ""

Default avatar.png Midori404: Oh. I guess yeah. I was just doing what the guy in this video said, but I may have looked at something wrong.... oh wait I'm dumb lol. The guy in the video wasn't using C++ so it's his error, not mine. I see now oops...

Default avatar.png Midori404: Thank you guys :)

Default avatar.png sonic1991: who is bot on chat ?

Default avatar.png Midori404: ooops

Default avatar.png Midori404: aaaa

Default avatar.png Midori404: I meant my error

Default avatar.png Midori404: not his lol

davilla: heh, no problem

jacek: :+1:

Default avatar.png Midori404: Okay, I did it without it being a string and I still get this error: "Invalid command sent. It should be an integer from 0 to 7."

davilla: do you know what it sent?

davilla: you might have to debug

Default avatar.png Midori404: Standard Output Stream: http://chat.codingame.com/pastebin/61721da1-8928-4f61-9e5e-4ea0c5489ef5

davilla: wow, that looks like it hasn't been initialized

davilla: just some random bits in memory that never got set

Default avatar.png Midori404: Oh. I sort of understand, but I'm confused on what I should do next.

davilla: OK, well this problem is about looping, right?

jacek: you make highestMountainIndex = i, the i from int i; in the beginning.

MadKnight: Midori404 why is your if() not inside for() ?

Default avatar.png UnnamedCodinGamer: orangesnowfox I just looked at my code - the best move is the one that has the common path of all moves in the beam at the end of the search for the turn

davilla: I think the way the loop is supposed to work, it has to check on every i if it's the highest so far

Default avatar.png UnnamedCodinGamer: in this way there is no loss of information for the next turn

davilla: yours is only checking at the very end, after the loop has completed

jacek: Midori404, yeah move your if to for loop

jacek: http://chat.codingame.com/pastebin/6231f928-346c-4103-954e-4b53d61d2836

Default avatar.png Midori404: Oh okay jacek, I changed highestMountainIndex to i. And yes, davilla, I have to the loop games for the quest thingies.

MadKnight, I dunno, I was trying to follow along with this video: https://www.youtube.com/watch?v=t-tPMY9wdE8

Default avatar.png Midori404: Okay knight I'll try that once sec

Default avatar.png Midori404: one*

Default avatar.png Midori404: http://chat.codingame.com/pastebin/24ce657a-9047-47bb-8244-eb90b274eeea

davilla: which ones are undeclared?

jacek: they are after while

jacek: move the for before that }

davilla: they're all undeclared in the second section, right?

Default avatar.png Midori404: @davilla all three mountain related variables :(

@jacek "for" before the "while"?

Default avatar.png SaidRasinlic: anyone got grid task solution java?

Default avatar.png SaidRasinlic: You are given an HxW grid consisting of the letters A-Z. The letters are weighted from A=1 to Z=26. Find the coordinates of the grid location closest to the center of mass of the grid (no solutions are exactly halfway between two grid positions).


Default avatar.png SaidRasinlic: this one

Default avatar.png SaidRasinlic: in java

davilla: that's because you added a loop at the top, and the variables declared there are only valid within that loop

davilla: I don't think you need that first loop anyway

Default avatar.png Midori404: Oh

Default avatar.png Midori404: The first loop is that "while", right? Sorry if that's an obvious question. So I should delete the "while"?

jacek: https://i.imgur.com/fAtbFOM.png

davilla: yes, a while is a loop

jacek: no, dont delete while

davilla: sorry, jacek is right

davilla: you do need that, but you need to do everything inside of it, my bad

Default avatar.png Midori404: I uh... I feel dumb. You want me to put the for loop just after the variable names? I'm slow sometimes I'm sorry lol

Default avatar.png Midori404: I just wanna make sure I understand the image you sent me

davilla: like his image, yes. don't worry, just try it

jacek: yes

Default avatar.png Midori404: only the line with the "for"? Okay I'll try one sec

davilla: the whole for loop

Default avatar.png Midori404: Including the "if"?

davilla: yes, that's all inside that one for loop

Default avatar.png Midori404: Alright one sec

jacek: yes, but put the cout after the for loop

davilla: oh good catch

Default avatar.png Midori404: Oh okay one sec

davilla: basic outline is this: http://chat.codingame.com/pastebin/3f56750c-3829-4382-abaa-b2a3bb99f4c3

Default avatar.png Midori404: It looks like the cout is after the for loop. This is what I have now: http://chat.codingame.com/pastebin/e16194a5-07b7-428a-9c9f-e8cff4a95a97

Default avatar.png Midori404: Oh okay one sec

Default avatar.png Midori404: Oh okay I see @davilla

davilla: not sure about your indentation in the last one, does it work?

jacek: Midori404 not yet, you still need another } above cout

Default avatar.png Midori404: I may have messed up my indentation while editing :( It doesn't work yet, no... It says my "program did not write to the standard output in due time."

Default avatar.png IxionTour: How to report someone?

Default avatar.png Midori404: Oh. Okay Jacek I'll try that

davilla: every time you have an open curly bracket, the next line should be indented

jacek: IxionTour in their profile

Default avatar.png IxionTour: thanks :)

davilla: every time you have a closed one, you unindent

davilla: that's not required, but it makes it a lot easier to follow

davilla: so you can tell what's inside each loop or if

davilla: and it makes sure the curly brackets are balanced

Default avatar.png Midori404: THANK YOU SO MUCH GUYS! IT WORKS NOW :) I passed all the test cases.

davilla: woohoo!

Default avatar.png Midori404: Oh so after every closed curly, I indent?

jacek: :tada:

Default avatar.png Midori404: I like to be neat, so I'll remember that

Default avatar.png Midori404: er... you said unident oops

Default avatar.png Midori404: unindent*

Default avatar.png UnnamedCodinGamer: is anyone using mcts for breakthrough?

jacek: i think dbdr is

davilla: maybe this would have made more sense: http://chat.codingame.com/pastebin/f764415a-f67d-4f89-9497-1e18d87e659c

Default avatar.png UnnamedCodinGamer: I wonder what roll out policy he is using

Default avatar.png UnnamedCodinGamer: random does not do well

Default avatar.png Midori404: Ah. Okay I'll look that over and I'll look over my code again to try to understand it more before doing a different game. I'll let you guys know again if I need any more help (which I will cuz I suck lol). Anyways seriously, thanks again guys :)

davilla: now that you got it, look at jacek's first sample to see good indentation practice

davilla: good work, don't be hard on yourself

Default avatar.png Midori404: Alright I'll check that out. And thank you. :)

davilla: very welcome

Default avatar.png Perwex: Hello, I'm stuck on the puzzle of the week. My code passes all tests except the last one, where the answer is 1 number lower. Any hints/tips on how to fix this?

jacek: add -1 in last testcase? :V

Default avatar.png IxionTour: ;D

davilla: interesting, I had exactly the same result in one of my solutions

davilla: but I was literally counting each spot, which isn't the way to approach that

Default avatar.png OGWhisper: https://www.codingame.com/clashofcode/clash/1650357f25e872f4881049c330a49611e4352fc

Astrobytes: leojean890: wtf happened to your Clobber bot?

Default avatar.png sonic1991: what it means in ruby

Default avatar.png sonic1991: k=$<.map{|i|i.split.map(&:to_i)}

Default avatar.png sonic1991: $<

Default avatar.png sonic1991: ?

Astrobytes: ew

leojean890: Astrobytes I beated you mostly a few hours ago when I reached W1 and then you submitted something else and you have since then 100% winrate against me^^

Astrobytes: leojean890: Ah yes, I changed 1 or 2 things, I didn't even test against you, it was an experimental submit that worked quite well :D

Astrobytes: leojean890: you're using MCTS or alphabeta now?

YurkovAS: Astrobytes do you know about game specific bonuses/penalties for connect-4? do they exists?

Astrobytes: YurkovAS: I'm not the best person to ask re Connect4 to be honest, MSmits or jacek should be able to help more. There's a useful website... let me see if I can find the link

Astrobytes: YurkovAS: https://tromp.github.io/c4/c4.html

leojean890: Astrobytes I see hehe^^alpha beta :P but my c++ is not very fast :P I have just added reserve to my vectors xD

YurkovAS: Astrobytes thanks

Astrobytes: leojean890: vectors for what? :P

Astrobytes: YurkovAS: sorry I can't help further, I haven't worked on it properly yet

leojean890: I use vectors < vector<char>> for the map xD

leojean890: ik it's not the best way xD

leojean890: maybe bitboard

Astrobytes: bitboards!

leojean890: chips hehe

leojean890: (meabs we told the same thing in the same time;))

leojean890: means*

Astrobytes: Yeah I know :D

Astrobytes: 8x8 = bitboarding

leojean890: I used a bitboard for FC2020

leojean890: just for castable and repeatable

leojean890: my first bitboard ever xD

leojean890: will be faster ik :p

leojean890: you knew "chips" expression???

Astrobytes: hm, that's just storing things bitwise, board games with bitboards are a little more 'involved'

leojean890: yes^^

leojean890: it's feasible

leojean890: maybe I'll do so

Astrobytes: Yeah, I remember a couple of people I worked with used to say "chips" in that way

Astrobytes: No idea where it comes from lol

leojean890: i see^^it's young people kidding:p

Astrobytes: verlan?

leojean890: no^^

leojean890: just joke:)

Astrobytes: cool, I always get confused with verlan

leojean890: expression

leojean890: verlan is hard for not-native people^^

leojean890: confusion

Astrobytes: Some of it is obvious but not all

leojean890: yes^^

Astrobytes: DEpending on your exposure to French/French people and familiarity with how they speak :D

leojean890: so - bitboard - terative deepening - MCTS =>=> do better here^^

leojean890: yes:p

leojean890: you lived there so you know a little:)

Astrobytes: I have bitboard, iterative deepening, TT, little bit of strange ab window pruning

AntiSquid: TT ?

Astrobytes: And I'm now at the point of giving up and going full MCTS instead. Ah transposition table

Astrobytes: not the race AntiSquid :P

AntiSquid: which race ? @_@

leojean890: so you prune using eval ?^^

Astrobytes: The Isle of Man TT Race!

leojean890: such that keep the N best for max, and the N worst for min ?;)

leojean890: so that you go deeper ?;)

Astrobytes: Tourist Trophy, big bike race

AntiSquid: oh i don't watch motor sports atm

AntiSquid: ya just googled

leojean890: or remove the ones you're sure they are too bad

AntiSquid: at least someone is getting fresh air Q_Q Automaton2000 how you feeling ?

Automaton2000: i haven't touched it since

Astrobytes: leojean890: well, standard alphabeta rules apply, but modifying alpha and beta appropriately as you go

Astrobytes: trying to reduce the search window to speed up/increase depth etc

Astrobytes: TT helps with move ordering, good score with a cutoff improves depth, trying hashed move first also

Astrobytes: AntiSquid: The TT is always a great event, you should watch it sometimes

Astrobytes: *sometime

leojean890: idk TT^^

Astrobytes: check chessprogramming

Astrobytes: Just a fancy hashtable

leojean890: transposition table you told that earlier sorry

leojean890: zobrisk hashing

Astrobytes: zobrist yes

AntiSquid: stuck here overengineering vindinium lol, just gained 30 ranks and basically 60 CP Q_Q

leojean890: to not visit again states similar or very close

leojean890: to already seen

leojean890: ab "window" idk that^^

Astrobytes: Yes, you can use the stored score or the move if you choose to store the move too

AntiSquid: have some fancy approach i want to try out and meanwhile everyone else and their neighbour's dog is doing their bitboards and TTs

Astrobytes: What fancy approach?

AntiSquid: ah ... that's secret sauce

Astrobytes: leojean890: alpha and beta - the range between the two

Astrobytes: ML AntiSquid?

AntiSquid: nah

Astrobytes: Well, whatever it is, good luck with it :)

AntiSquid: some search algo, maybe someone else already tried it, but i want to think mine is special

leojean890: vindinium => I'm #13 xD

leojean890: with some BFS only

Astrobytes: I need to get back to that game, it's fun

leojean890: my eval is not bad, I think

leojean890: fun, didn't touch it for a long time

leojean890: I was #30

leojean890: and was just pushed #13 ..

leojean890: If I submit I will be #30 .......

Astrobytes: Let sleeping dogs lie :)

leojean890: ML often wins I think

leojean890: ^^

leojean890: in CSB it's great^^

leojean890: in oware, robostac uses it I heard ?

Astrobytes: It's definitely a strong approach for some games

Astrobytes: Yes he does indeed

Astrobytes: As does re curse, agad e

leojean890: because offline calculation for a long time has to be strong if it's done well

leojean890: recuyse and agade on CSB AND oware

leojean890: ok^^knew only for csb

leojean890: pb4 as well for csb

Astrobytes: Also I think jacek uses some kind of learning for his jacekmax

leojean890: idk his algo jacekmax^^

Astrobytes: https://www.codingame.com/playgrounds/55004/best-first-minimax-search-with-uct

leojean890: will read that tomorrow^^

Astrobytes: It's a good read

Astrobytes: Anyway, gn leojean890, AntiSquid

leojean890: gn as well:)

AntiSquid: gn

pathus90: gn