Chat:World/2020-06-24
Raghu0214: http://chat.codingame.com/pastebin/cc3d961e-9187-423f-b741-d470c60b0a82
WINWINWIN: Any reason why the .�� diamond symbol is printed to stderr?
BigBadOctopus_af5d: I have 2 problems about programing.Can someone help me?
Raghu0214: can anyone allow me send messages in disord
Raghu0214: https://www.codingame.com/contests/fall-challenge-2020
manan_ali23: I need team of 3 members to participate in it
manan_ali23: where you from ?
manan_ali23: Have u completed your graduation
manan_ali23: Okay.am 23
manan_ali23: are u a developer?
manan_ali23: You like programming then?
manan_ali23: I have some programming problems for you
manan_ali23: Can you solve them?
manan_ali23: yes
manan_ali23: But its a multinational interview question
manan_ali23: Your gmail??
DieuMQ: hello
manan_ali23: hello
imbadpython: they fixed clash of code :O
imbadpython: it shows pending and submission results now! :D
imbadpython: i think for shortest code it should hide the code size
imbadpython: cuz then it fforces people to do as well as they can
demen: Ye
rak1507: I disagree, it's nice to know what you're competing with in shortest
rak1507: And it's funny to see people submit with like, 500
imbadpython: ye like show it when you submit
imbadpython: so like in the game rn you can still see
rak1507: yeah I can see you got 180
imbadpython: someone submitted and got a 100% 180char let's say
imbadpython: you shouldn't be able to see that
imbadpython: you should only see someone submitted and (perhaps) the score as well but not the char count
imbadpython: so you try to optimise it as much as you can
imbadpython: and not just "optimise till 179"
rak1507: I fail 4 but pass the rest
rak1507: how does Do have a higher average than i
LelouchVC2: i = 105. 105/1 = 105
LelouchVC2: D = 68. o = 111. 68+111 =
LelouchVC2: 179. 179/2 = 89.5
rak1507: ruby is best golf lang
LelouchVC2: maybe you meant 'd' ?
LelouchVC2: do average is 105.5
rak1507: making it lower case failed other cases
LelouchVC2: Some CoC are broken
Zerp: is there a way to view distance between factories in gitc?
Uljahn: they are given in inputs i guess
WINWINWIN: For distance between any 2 factories, google Floyd Warshall algorithm
EvgenieTivaniuk: I am now trying "Test befiore validate". All testcases are successful, but on "submit" I fail a hidden case. I guess I'm missing something, but can't guest what. Is there way to check hidden testcases somehow? I can't fix if I don't know where the error is.
Zerp: i just finished implementing it
Zerp: but i'm trying to compare my output matrices with the actual distances
Uljahn: read the discussion page for the puzzle, EvgenieTivaniuk
EvgenieTivaniuk: @Uljahn Can I access it before I solve it 100%? I didn't find the link.
Uljahn: EvgenieTivaniuk: which puzzle are you on?
Zerp: this is supposed to send troops to the nearest non-ally factory, i don't think it's using the optimal paths
Zerp: https://www.codingame.com/replay/474271589
EvgenieTivaniuk: Test before validate: https://www.codingame.com/ide/puzzle/test-before-validate!
Uljahn: EvgenieTivaniuk: i'll help you in pm, pls answer there
Uljahn: yw
jrke: anybody on kaggle is present here now
jrke: i wanna know how to know the no. halite present on any cell
DongZhuo: Damn this is amazing
AggYz: guys is w3schools good for py or is it shite llike it is for everything else
MPSI_LIV_CronierDamiano: hi guys, do anyone code in ocaml here ?
MPSI_LIV_CronierDamiano: fuck u
MPSI_LIV_AnthoandLoulou: do you want some help
dbdr: jacek: you found a way to make both of us go down? :D
jacek: i win to you and start losing to fox
dbdr: so was it fox or trictrac who paid you? ;)
IamthatIam: hello world
IamthatIam: I am new to this site
Hjax: hello
IamthatIam: @Hjax how are you?
Hjax: pretty good
struct: hi
Hjax: hi struct
Undaare: Is there a reason, why to not share your code when you are in 1st place of the Clash of Code? I play this game, to learn from others. If the code is not shared, this game is useles for me.
Hjax: maybe you arent proud of your code
Hjax: or you have secrets
Astrobytes: Some people may still wish to remain competitive
tanmaycodernovice: @Aisenma hey bro
Aisenma: yo ?
tanmaycodernovice: nvm solved it
Aisenma: :)
LeBaoHoang8A4: Whut?
pardouin: 95% of top 1 share their solution
pardouin: so it's no big deal if a few hide it
Uljahn: btw what esoteric techniques do you learn in clashes? :smirk:
pardouin: most of the time it's useless golf but sometimes there are nice regex solutions for example
Hjax: ever know you are tired and that theres something wrong with your code
Hjax: and you literally cant figure it out
Hjax: thats me right now
Hjax: its got to be so obvious, but my brain just cant
Astrobytes: Take a break
Hjax: its 10 am
Uljahn: just turn 360 and go away
Astrobytes: Go have some coffee, take a walk
Hjax: i wonder if i just dont understand how java handles bitwise operations
Astrobytes: It's a bit different to C/C++ iirc
Hjax: basically i have (a & b = a) when (a & b = b) is expected, but if i do the same math and print the result out on a separate line, i get (a & b = b)
WINWINWIN: When you print an array in C++, is it given like in python with the square brackets etc.?
WINWINWIN: like cout << arr << endl
WINWINWIN: ['elem1', 'elem2']
Hjax: dont think you can do that WINWINWIN
Astrobytes: No, you'll get a memory address
WINWINWIN: Not trying to print like that, trying to understand the debug prints from Othello
WINWINWIN: Fixed the minimax and ported over to C++ now it wont store the board properly -_-
Astrobytes: In what way?
WINWINWIN: I have a char board[8][8];
WINWINWIN: cerr << board[7 - i] << endl;
WINWINWIN: ........................
WINWINWIN: that is a set of 24 dots, dont get why 24?
Hjax: lmao i found it, i << i instead of 1 << i
Astrobytes: lol
Astrobytes: what are you trying to print exactly WINWINWIN
WINWINWIN: the board...
Astrobytes: duh
Astrobytes: The whole board?
WINWINWIN: I want to see the state and understand it
Hjax: oh it seems like two people in chat are struggling to print an othello board
WINWINWIN: Yeah
Hjax: thats what my bitmath does too
WINWINWIN: I'm trying to get the board in inputs but for whatever reason its not working
WINWINWIN: so error prints give this, can't get why
struct: why 7 - i?
Astrobytes: yeah
WINWINWIN: I used the top left corner as (0, 0)
Astrobytes: http://chat.codingame.com/pastebin/788249b7-fd60-440f-b7bd-cc7d36d67079
struct: does arr[0] even print the entire array in that row?
Astrobytes: woops I gave you the 1D version
WINWINWIN: Yes
WINWINWIN: Any idea why the 24 dots?
Astrobytes: Why aren't you just doing a double for loop to loop over the array?
RoboStac: c style arrays are just passed as pointers with no size information, so printing one to debug prints it as a c style string (keep printing until a null terminator)
WINWINWIN: It is a double loop
RoboStac: the easiest thing to do is print every cell individually
wlesavo: # To debug: print("Debug messages...", file=sys.stderr, flush=True) :scream: :scream:
Astrobytes: yeah they posted in the forum that they updated the python stub
wlesavo: gj
jrke: hey anybody on kaggle here
WINWINWIN: Me
Astrobytes: thibpat has a discord channel for Halite 4 if you're doing it jrke
jrke: Oh thanks
Alshock: just a random question: If a floyd warshall is slower than N² floodfills, somethings really wrong with it, right?
Scrimmy: hi, is there a way to toggle line comment on multiple lines?
Uljahn: yes
Uljahn: ctrl+/
Uljahn: Alshock: no why?
Uljahn: floodfill is one-to-many and F-W is many-to-many i guess
Uljahn: many==all
Scarfield: Floyd Warshall is O(n3) Alshock
Alshock: and N² floodfills should be O(n⁴), no?
Alshock: I think there was something wrong with my stuff, but I'll go the easy way and simply check it out later this week
Scarfield: floodfill is n2, if you do it from every cell, it will be n3, which i suppose Floyd Warshall is, havent used it, but it has been mentioned here before
Alshock: Oh that's because N here is the number of cells, not the width of the grid, right?
struct: yes
struct: N = number of cells
Scarfield: yup, n = width * height
tanmaycodernovice: @elmarcho please share ur code dude
imbadpython: floyd warshall is v^3
imbadpython: are you guys talking about rgid
imbadpython: and flood fill why you doing n^2 of them
elmarcho: @tanmaycodernovice just a few nasty tricks I saw from someone else
imbadpython: its common sense to share code in CoC right
Alshock: @imbadpython nope
imbadpython: wait nope for what
Alshock: Just let people do whatever they want to
Alshock: it's a competition system, not a teaching one
imbadpython: its fine i get number one anyways smh
**Hiro776 hello
**remi6 hello
**QossMean Hello
**QossMean hello
QossMean: (╯°□°)╯︵ ┻━┻
QossMean: (╯°□°)╯︵ ┻━┻
Zerp: anyone know how you remove an element from an array knowing it's index in c#?
QossMean: RemoveAt
Hjax: Astrobytes you here?
Zerp: i think that only works on lists
QossMean: But you can use ToList and ToArray
QossMean: To easily convert
Astrobytes: Hjax wassup
Zerp: shouldn't arr = arr.ToList().RemoveAt(index).ToArray() work?
QossMean: Yes, it should
Zerp: it's complaining about the last dot
Zerp: Operator '.' cannot be applied to operand of type 'void'csharp(CS0023)
QossMean: Oh yeah
Zerp: aka the "dot" before ToArray()
QossMean: RemoveAt doesn't return the list
QossMean: It just applies the remove to it
QossMean: So you need to do it in two steps
pardouin: it's funny when the 2nd submited before you and didn't share his code and you share a code with half his number of chars XD
Zerp: factoryArr.ToList().RemoveAt(minFactory);
factoryArr.ToArray();
QossMean: var l =factoryArr.ToList();
Uljahn: can you see sharp, Automaton2000?
Automaton2000: if you keep track of how much you can do a bit more
imbadpython: has anyone done Bulls and Cows 2 here
imbadpython: and can give me a hint?
Hjax: Astrobytes can i pm you about some othello stuff
Astrobytes: Go for it Hjax
dbdr: yes
imbadpython: can you give me any hint on bulls and cows 2
imbadpython: the one where you guess the secret number
dbdr: did you do the puzzle?
imbadpython: I haven't but i can solve it
imbadpython: my current code currently gets 45% it's bruteforce and can solve up to 5 digit
imbadpython: actually sorry i realise the puzzle is different, ill think about it first. sorry for bothering you
dbdr: have fun :)
imbadpython: is there a smarter way other than bruteforce
dbdr: the puzzle is a bit out of my head at the moment
dbdr: what do you call bruteforce in this case?
imbadpython: emm first generate the (10k?) possible 4 digits
imbadpython: then eliminate the possible ones for each guess
wlesavo: that is the way, but you need to optimise it quite a bit to solve 10 digits
wlesavo: i think brute force with python for 10 digits is impossible
wlesavo: i managed to solve only 7, further just some simple greedy algo
wlesavo: i.e. take a guess, mutate some digits to get another valid number if there are more bulls than in previous guess keep it
hanzhere: :heart_eyes:
imbadpython: wdym for "i managed to solve only 7"
somethingjustlikethis: help me
wlesavo: to brtuforce up to 7 digits
struct: Should i use fen notation if i ever port it?
Astrobytes: Works for me. Use Shredder FEN for 960.
Astrobytes: Or whatever works for everyone
Astrobytes: Wait, struct, do you mean as input?
struct: yes
Astrobytes: Oh I thought you meant as debug output or something. No I think just square notation will do
Zerp: holy shit, i just spent an entire looking for a bug that caused a function to now work, just realized i never called it
Astrobytes: Or algebraic struct - I donno. Open to discussion I think. Regular square notation would be simplest but some folks might prefer algebraic
Astrobytes: lol Zerp, did the same just yesterday
Astrobytes: meh, it happens
jacek: hmm puzzle of the week
jacek: i see familiar nick on top 2
struct: I wonder who it might be
jacek: so hot ~
dobroleks94: Hello everyone!
jrke: hello
jacek: ohai
bohuss: ){
trictrac: gg jacek on othello !!
Astrobytes: oh wow, I didn't see that!
Astrobytes: very gg indeed
jacek: you cant see that hight?
Astrobytes: Ha. Ha. :P
Astrobytes: Very impressive. Lucky submit or solid change?
jacek: we may never know
trictrac: we have all a new target
jacek: now lets see trick's response
jacek: its like unlocking new level
Astrobytes: :D
trictrac: nothing ready no danger
Astrobytes: Give trictrac an hour or 2 at least jacek ;)
Hjax: there goes my theory that tric always has a better bot waiting
codeing: hi.
codeing: i want to write trim() algorithmic.
codeing: but i find a little problem.
code_maniac: What's the problem ?
codeing: String test = " toto "; test.trim(E e)
codeing: test.trim(" ") return "toto"
codeing: we delete space before and after
dobroleks94: function trim() doesn`t take any argument, does it?
codeing: yes. but how you write it ?
dobroleks94: do you want to write your own trim function?
dobroleks94: try to use RegEx
dobroleks94: (\\s+)(.*)(\\s) - something like this
dobroleks94: and return second group
dobroleks94: i.g (.*)
dobroleks94: *ie
dobroleks94: ))
dobroleks94: this one is suitable:
dobroleks94: (\s+)([A-Za-z0-9].*[A-Za-z0-9])(\s+)
AntiSquid: ah regex black magic
AntiSquid: alright, going to the shop to buy myself something nice, any suggestions?
AntiSquid: Automaton2000 ?
Automaton2000: does anyone else have this problem?
code_maniac: You need to use anchors as well
code_maniac: ^(\s+)([A-Za-z0-9].*[A-Za-z0-9])(\s+)$
jacek: you give the guy how cant trim the solution of regex?
jacek: now he has 2 problems!
Voidsway: I would just use replace...
wlesavo: how many rollouts considered to be ok in oware for raw mcts?
Astrobytes: Donno. Wouldn't advise it though
wlesavo: too late, already implemented
Astrobytes: Switch to EPT variant and work on eval
wlesavo: well its not exactly raw, i have e-greedy rollouts
Astrobytes: oh ok
Astrobytes: How many are you getting?
wlesavo: only around 1k for turn 2
Astrobytes: You can definitely do better than that. Depth?
struct: I have beaten the french
wlesavo: i stop around round 50 from the current time
wlesavo: yeah, thats probably it
wlesavo: and also im not hashing anything
struct: Whats EPT?
Astrobytes: early playout termination
Astrobytes: High depth doesn't work well in Oware wlesavo
wlesavo: hm, ok, thx
Astrobytes: "I have beaten the french " struct, clashing again?
struct: it was just 1 clash :(
Astrobytes: Hey I'm not judging
Astrobytes: How's Project X coming along?
struct: taking a bit of time
Astrobytes: Still in JS module hell?
struct: yea
Snef: anyone know the memory limit ? i thought it was 750 MB Has it changed ?
struct: Dont think so why?
Snef: i just tried to allocate 2GB of node and it works
struct: yeah, but try storing stuff on them
Astrobytes: ^
Snef: on all of them ?
Snef: just tried to change one value on the 65500001 th and it didn't timeout
tim-kt: hey
struct: did you try reading it aswell?
Zerp: this is weird, in gitc i tried implementing a method account for troops being sent to factory, but it seems to make the bot worse :d
Snef: struct yes
Zerp: not sure if its a bad idea in general or just bad implementation
struct: I can't remember but I asked the same question when I did uttt
struct: And someone told me to try something that instantly broke the bot
struct: No, I was talking about node allocation on UTTT
Snef: i did that maybe it's not enough to break my bot struct
Snef: http://chat.codingame.com/pastebin/f5bdd514-15eb-4bbf-ae75-a557f6f418cf
SituatedDust: Hey, im trying to learn python, which wouldnt seem so hard but i am running into a problem with the defibrilators easy puzzle, does someone feel like helping out?
struct: I have solved it, but not on python
struct: can still see the code though
struct: or answer any doubt
SituatedDust: how do i send this pastebin kind of message
struct: just paste the code
SituatedDust: http://chat.codingame.com/pastebin/e8dcca1a-4af8-4f3d-953d-c7592993338d
SituatedDust: ah okii
SituatedDust: it passes the first 2 cases but then gets the wrong one to be closest, i'm really not sure where i went wrong here
struct: checking
struct: give me a sec
SituatedDust: sure :)
SituatedDust: also my apologies for using defib and Defib, i didnt mean for anybody to read this code:grimacing:
SoLiDwAtEr: Do you guys find yourself actually getting better over time with these puzzles? or not really?
struct: I have the same formula and it gives me different number :/
Uljahn: with puzzles and contests, and multi - yes
struct: :thinking:
SituatedDust: @struct thats interesting...
SoLiDwAtEr: okay i'll continue with them then, thanks.
Iboss15: hi
Uljahn: SituatedDust: where is to radians conversion?
SituatedDust: ah... i should convert lat and long to radians still.... yh ofcourse
SituatedDust: yh it works now, thanks
Uljahn: :thumbsup:
LelouchVC2: I hate formula coding puzzles
freeman42x: hey everyone
Kshh: hey
Irene_iylr: anyone playing checkers here?
TheSpiffiest: Yep for checkers
TheSpiffiest: Just started. It finds simple moves and picks ones at random. Ranked about 40ish in wood league
TheSpiffiest: I just realized I always assume I'm the black ones so that explains a lot. :)
Irene_iylr: I assumed m the red one..but I was wrong
TheSpiffiest: first line of input is your color
TheSpiffiest: huh, now that I'm debugging it I get "w" as the color, not r/b like I expected
Irene_iylr: I started with codingame just about yesterday did some easy ones and today I'm feeling m dumb
TheSpiffiest: Ha, same. I'm on day 3 I think
Irene_iylr: yes..you can check out the forum its mentioned there ..maybe its a bug or something
TheSpiffiest: I've got the basic moves, then basic offense, next is detecting when you're vulnerable, and after picking the best move
TheSpiffiest: the rule that you have to jump if you are able can be used to set traps
WINWINWIN: I guess that w means you are the one to move first
twitlydoof: mangekyou sharingan
TheSpiffiest: yep, and the direction changes. My logic is all built around trying to get to row 7.
TheSpiffiest: Kinda fails when you start in row 5 :)
twitlydoof: shortmode is a horrible idea