Chat:World/2022-01-16
Smelty: yea i main java but use python for short
Tiberiusen: anyone know any optimazing tricks for recursive dfs in 2d array, i already have a visited variable
Tiberiusen: def dfs(visited, maze, pos_row,pos_col,len_maze): http://chat.codingame.com/pastebin/30dac079-590a-4531-96c6-35b33b6a7acf
struct: which puzzle are you doing?
Tiberiusen: its not from codingame, its a maze traversal problem though
struct: usually i do it like that
struct: but i dont use recursion
struct: i only really use the visited
struct: is your visited a dictionary?
Tiberiusen: its a set(). it can solve mazes up to 49*49 size.
Tiberiusen: maybe recursion is to slow to solve big mazes
Quidome: maybe python is to slow :)
Uljahn: could be faster in numpy
jacek: or C
Alshock: I see the same suggestion twice :P
humanbeethoven: hello world
jacek: and so the NN article is published
jacek: good morning
6opoDuJIo: how do you, guys, train NN agents in mad pod racing?
ASM_MOV_INT: ah, hello peeps
ASM_MOV_INT: I don't wanna help no weird frog profile dude ;)
ASM_MOV_INT: later
6opoDuJIo: Kek
ASM_MOV_INT: keK
ASM_MOV_INT: kEK
ASM_MOV_INT: you're supposed to say, wtf? why not? rofl
ASM_MOV_INT: unless you don't care
6opoDuJIo: Because I find refusing to help someone because of a silly frog PFP to be so stupid, it becomes hilarious
struct: have you checked? https://github.com/pb4git/Nash-DQN-CSB-Article
6opoDuJIo: Nope, didn't manage to stumble upon it yet, I'l take a look rn
ASM_MOV_INT: then laugh bro
ASM_MOV_INT: or sis
ASM_MOV_INT: rofl
ASM_MOV_INT: but if you are that stupid, then should you laugh at yourself? ok, then grow up
ASM_MOV_INT: :joy::nerd::sunglasses:
5DN1L: 6opoDuJIo https://github.com/pb4git/Nash-DQN-CSB-Article
6opoDuJIo: You need some reading comprehension, pal
5DN1L: oops
ASM_MOV_INT: the response is: ineffective jab
ASM_MOV_INT: rofl
5DN1L: i hate it when the chat doesn't scroll to the bottom occasionally
6opoDuJIo: it's fine, @5DN1L
6opoDuJIo: Thanks anyway1
ASM_MOV_INT: lag rofl
ASM_MOV_INT: just cuz u binary, doesn't make ur frog sh** ok bro or sis... u like how I can't tell ur gender rofl, sorry if that bothers u
ASM_MOV_INT: go jump in ur pond
5DN1L: be respectful and stop commenting on profile pics please ASM_MOV_INT
struct: ok its enough
ASM_MOV_INT: :money_mouth:
6opoDuJIo: STOP PUTTING CHEMICALS IN THE WATER THAT MAKES THE FRIKKING FROGS GAY
5DN1L: 6opoDuJIo stop it now, he's been kicked
6opoDuJIo: ok, sorry
6opoDuJIo: So, speaking of the actual article : do I understand it right, and the author trained his model solely on replays?
jacek: from self-play
jacek: from replays would be too slow
jacek: and not much
ASM_MOV_INT: test
6opoDuJIo: I just can't find the part in which author launches the agent in the environment
ASM_MOV_INT: sorry for any harassment, not my intention, peace bro
5DN1L: no next time, next time is ban
Frukostbord: Hello there! Might be wrong forum? I´ve been programming for about 2 months and started some university courses. My question is if anyone got a good link (blog, vlog etc) for the journey of a rookie programmer?
Regards // Andreas
FORMS1: Im trying do do the Mars Lander ep1.
FORMS1: AM i just supposed to impliment a while speed less than x cout y thrust
struct: for ep 1 I think so
5DN1L: you're required to output rotate and power, not y
FORMS1: sorry, just meant y as a place holder. I really shouldnt do that
5DN1L: ok
FORMS1: http://chat.codingame.com/pastebin/c2b8beaf-497a-44a4-84c2-efa2c5cd5f19
FORMS1: can someone tell me why this code isnt outputting anything when I run test case?
5DN1L: you need to output new line too
FORMS1: thanks. I did that but it still "did not provide inpit in due time"
5DN1L: what's your new code now
FORMS1: http://chat.codingame.com/pastebin/156c1122-cb4c-4cec-9d69-30c0266bf626
5DN1L: what if v_speed == 0
5DN1L: :)
jacek: oh my https://i1.kwejk.pl/k/obrazki/2021/11/5C3GkiPoh0yBJvob.jpg
5DN1L: Automaton2000, Cure4Life or Code4Life?
Automaton2000: if you try to write a solution for a puzzle that's all
Nachosauce: Okay I'm starting from scratch on Coders Strike Back. It's time. Going to be a good day. A great day. The best day. Going to learn things and make it better.
jacek: coders strike back?
5DN1L: Nachosauce strikes back
Nachosauce: https://www.codingame.com/ide/puzzle/coders-strike-back The pod racing one. I love it
Astrobytes: Copyright Strikes Back
Nachosauce: Yeah that
struct: 1 day ill finish my breakthrough bot
Astrobytes: :grin:
jacek: only in 1 day? nice
Nachosauce: I love you guys
struct: yes, im coding for breakthrough but not ai yet
Astrobytes: topcoder marathon is on, 3 days 4 hours left, gonna do that now I have some time
struct: is it ai?
Astrobytes: optim
struct: how long ago did it start?
SMOKEz8z8: hi, big noob here, just took a few hours to convert an input to a list of list, to then build it back to a list of strings : https://pastebin.com/tqiSkEMN
SMOKEz8z8: could I get some feedback on what topic to learn about
SMOKEz8z8: seems it can be done much easier, but the solutions provided are to complex to comprehend for me
Astrobytes: struct: 12th I think
Astrobytes: has some kind of similarity with A*Craft but not quite
BlaiseEbuth: Astroback o/
Astrobytes: yo dude, btw I have no idea what happened to franknzappa channel, lots down recently due to copyright strikes :(
BlaiseEbuth: Yeah... :(
5DN1L: SMOKEz8z8 You can use "ord" to get the ASCII value of a character and then to calculate the index of the ascii art you need to convert the character to
SMOKEz8z8: looked up ord, my self, but what I found was, P has a value 80, how would I use that for an index?
5DN1L: subtract a constant
5DN1L: for "?", make use of another constant
YS_Yousef: can any one help
Astrobytes: only if you ask a relevant question.
YS_Yousef: with?
BlaiseEbuth: Is that a relevant question ?
Astrobytes: with.
BlaiseEbuth: Wiiiiiiiiiiiiiiiizzzzzz
SMOKEz8z8: thx for the tip, now I dont have to create an alphabet list myself to find the index. But I am gettings errors because of the spaces in the last test. Back to google it is :)
5DN1L: :thumbsup: Keep going
5DN1L: Also, this: https://stackoverflow.com/questions/58960689/is-there-an-already-made-alphabet-list-in-python
5DN1L: though it's not really necessary
2D20: can anyone tell me how to do "The River I." ?
Nachosauce: Well you see, you walk into it thinking "Oh this will be easy. no problem." then you go to start, you panic, you give up, and go do something else.
5DN1L: 2D20 https://www.codingame.com/forum/t/the-river-i/34563
5DN1L: Nachosauce which state are you in then?
Blabbage: I want to recommend Wontonimo's Wave Function Collapse - Classic Puzzle HARD. It has two days left and only needs one more approval. I had a lot of fun with it and really think that it deserves approval: https://www.codingame.com/contribute/view/75474b51e6b3186ea493a8467395fbbefad7
Hope it is ok, to post it here :)
Nachosauce: I'm much too dumb for that one :grimacing:
jacek: shall i approve it without testing? :thinking:
Nachosauce: It's Wontonimo so probably nothing would go wrong lol
Uljahn: "The River I" is kinda straightforward, you sum digits for the smallest river and make it progress one step ahead untill both rivers meet
Blabbage: jacek: wouldn't do that, I think at least 3 people should be able to solve it from it's current description, otherwise it might be too unclear to others
Blabbage: I do understand that approving a hard puzzle is a lot of work, and I honestly used a lot of time on reading about the Wave Function Collapse and fighting my own bugs to make it work. I just think it was a nice journey with a cool end result
Blabbage: Gotta go now, take care everyone
xlr4829: users.match('me').delete()
jacek: Blabbage i could copy paste the solution and call it a day :V
Alaory: yooooo
jacek: :upside_down:
SMOKEz8z8: look at the mad pod racing challenge, is there away to store a value to the next iteration? so I could compare next_checkpoint_angle between two frames?
jacek: yes :?
jacek: you can init variables before the loop
SMOKEz8z8: hmm, does the part before the loop get executed with each pass?
SMOKEz8z8: next_checkpoint_angle is only defined when the loop starts
jacek: compare next_checkpoint_angle with t, do something
jacek: then t = next_checkpoint_angle
jacek: n next loop iteration youll get t = angle of previous iteration
Smelty: yes.
jacek: eeyup*
SMOKEz8z8: thx, was setting t = to early :)
struct: (╯°□°)╯︵ ┻━┻
jacek: hm?
struct: gui is hard
jacek: thats what she...
jacek: what gui
struct: im making for breakthrough
jacek: web, app?
struct: app, c++
struct: im using sfml + imgui
dogerish: I'm making my own gui system in my ray caster using sdl2
jacek: :+1:
struct: i have little to no experience with this stuff
struct: so its taking me quite some time
struct: but its fun
jacek: got any screen?
Astrobytes: imgui is awesome
struct: yes but its still very basic
Blokops: question how hard are the language certifications?
struct: the problems are the same level of the easy ones
struct: maybe medium at most
Blokops: oh nice
BlaiseEbuth: No
BlaiseEbuth: More a clash level
Astrobytes: certificates for all! \o/
struct: jacek
struct: https://i.imgur.com/eACbhxP.gif
Astrobytes: struct: do you already know sfml?
struct: nope
jacek: noice
struct: now i was trying to have multiple boards
jacek: wouldnt black pawns have the white borders?
struct: inside the imgui itself
struct: https://i.imgur.com/fHbbnWl.png
struct: i removed them
jacek: multiple boards? are you doing 5d chess for breakthrough
struct: lol
struct: was just something i wanted to try
Astrobytes: Nice.
struct: its still not much but its something :p
Smelty: za heccer 6d chess?
struct: what language is that?
Astrobytes: "the heck is"
Astrobytes: I think
jacek: is this scottish
Astrobytes: No.
Astrobytes: we'd say "whit th' f**k's that"
BlaiseEbuth: Chicky bastard
Astrobytes: :chicken:
BlaiseEbuth: Ah yeah. Dat f'ckin nationalist chicken in kilt...
Lambert_W_Function: lambert w function
struct: :wave:
Wontonimo: hey strüct Smëlty Aströbyes jäck n BlaïseEbuth
Astrobytes: heya Wontonimo
Wontonimo: what a great turnout on a sunday
Astrobytes: I'm fraternizing with another platform though :P
Wontonimo: oh, do tell!
Astrobytes: nothing much, another topcoder marathon
Astrobytes: (optim)
jacek: ah
Wontonimo: snake charmer Astrobytes?
Astrobytes: Marathon 132
Astrobytes: It's like a ball bouncing game, deflecting b balls with n panels to maximise score
Astrobytes: kinda A*Craft style
Astrobytes: anyway, I must eat, afk
struct: hi Wontonimo
Wontonimo: hey hey struct
Wontonimo: by Astrobytes :wave:
Maxim251: http://chat.codingame.com/pastebin/32548e3d-a319-4e29-aae1-658c1d92a376
Wontonimo: in these lines
Wontonimo: vector<PLAYER> players;
vector<ZONE> zones;
Wontonimo: I think you need to assign them to something
Maxim251: normally It should be like this ... players->push.back( new PLAYER( i ) ); But I see that another way is working also players.push.back( PLAYER( i ));
struct: if you already know the number of players you can do
struct: vector<Player> players(n);
struct: but push_back is fine I think
Maxim251: No I don't know. Thats why, I am adding players on the fly, In game there can be up to 4 players
Wontonimo: or just use a primitive list for faster operations
struct: -> new Player() would be used if it was
struct: vector<Player*> players;
Maxim251: And my question is if that line " players.push.back( PLAYER( i )); " is no causing any memory leaks
Wontonimo: holy cow, my wave function collapse puzzle just got approved! I didn't think it would happen considering how non-traditional it is. I do really like the algo for this though
Maxim251: Yes Struct, normally I should use pointers and create players with "new" comand
Mrs.GloriaZindlebocker: yes, we will monitor #fr for any reactions
Wontonimo: thank you calebharrison , Husoski, LazyMammal, and Blabbage
Maxim251: Congratulations Wontonimo
Wontonimo: :D thanks Maxim251
jacek: well Blabbage advertised it
struct: I dont think any leak will happen on that code Maxim251
Maxim251: then, I can use this way ? players.push.back( PLAYER( i )); Because when I was learning C++ I never see this line in use from anybody.
Maxim251: Thats why i am suprising that it works.
jacek: whats wrong with it
jacek: besides PLAYER being all caps
struct: new is a banned keyword on my ide
jacek: oO
Maxim251: http://chat.codingame.com/pastebin/cb40c8fb-9f93-4f28-913d-b8987d287be8
struct: https://stackoverflow.com/a/8036528
Maxim251: In very short way... class PLAYER{...} class MANAGER{
struct: maybe this can answer your question Maxim251
struct: or it will confuse you even more
Maxim251: http://chat.codingame.com/pastebin/a3944a58-f257-4f9b-a35c-490357b1118a
struct: whats that supposed to do?
BlaiseEbuth: That's a link struct, you have to click on it.
struct: thanks
BlaiseEbuth: You're welcome.
jacek: you use vector of objects. no pointers or direct class creation so no memory leak. as soon as those things will go out of scope, they are destroyed
struct: ^
Maxim251: Trying to add position to a vector, using class constructor. Normally always I need do PLAYER player; Assighn some values, and then push that player to vector.
Maxim251: But rather creating obiect, I use constructor straight away.
dang.e: http://chat.codingame.com/pastebin/299d728f-c430-436d-ba8d-1620161dd421
derjack: :thinking:
Maxim251: Game is "Game of Drones", maybe I send to you that code to review.
Maxim251: http://chat.codingame.com/pastebin/16f32165-88c4-460a-b8e6-44a37c388b0b
Wontonimo: hey dang.e , what does your code return for the following input 10 9 8 7 8 9 10 ? it should return 3, but what does it return?
struct: Maxim251 code looks fine
struct: But I dont really know how to code so dont take my word for it
jacek: oO
dang.e: Hi Wontonimo, it returns -3 because i count the loss negatively
Wontonimo: right -3.
Maxim251: Ok, Thanks Struct. Its nice that i fount new way to push obiects in to vector. Have Nice day.
dang.e: I tryed to switch int to long number because at the exemple 5 it was big numbers but i still have the same result
McLaaamb: Its impossible to beat Python or Ruby for shortest code when using C# :D
struct: yes
jacek: then use python or ruby on shortest [solved]
5DN1L: McLaaamb It's possible, if your score is greater than all other players' :yum:
Wontonimo: or play a multi or puzzle [solved]
struct: try bt, best game on earth
jacek: if there was only an app for that...
McLaaamb: @jacek you can switch language after clash starts?
jacek: yes
McLaaamb: interesting
struct: wait, thats not allowed
McLaaamb: even more interesting :D
5DN1L: wait, switching languages is mandatory
jacek: 2 mods, 2 different opinions
jacek: Automaton2000 which one is right?
Automaton2000: because i need to store it in a stupid way
struct: 1 is trolling
jacek: a trolling mod on CG? impossibru, Automaton2000
Automaton2000: yeah i was thinking about what you are talking about the contest
Husoski: @McLaaamb Yes, you can switch langauges. You must compile and run in first language if you want it to be remembered in case you want to go back.
SheLuvCoding: i suck agt pyhton
struct: its time to improve then
SheLuvCoding: what are some easy coding questions
struct: check easy category
jacek: the descent, power of thor, temperatures, breakthrough
struct: https://www.codingame.com/training/easy
struct: also this site assumes you already know the very basic
SheLuvCoding: I know some things
struct: if, loops?
SheLuvCoding: but i suck with loops
SheLuvCoding: well wit while loops
struct: who doesnt
SheLuvCoding: i only started to actually in winter break
struct: I see
Blokops: try doing etective picakchu one
Blokops: is a good start for loops
struct: try the puzzles jacek said
Blokops: detective*
SheLuvCoding: puzzle or pikachu
struct: they are both puzzles
struct: Try the descent
struct: there is a search bar at the top
struct: https://www.codingame.com/training/easy/the-descent
Blokops: avoid any from java_coffe_cup since they are more "strategy" and less learning
Blokops: they are for more experience users
Blokops: oh he made detective picakchu i stadnc orrected
struct: :D
SheLuvCoding: idek how to do this descent thing
SheLuvCoding: do i just attack mountains
struct: press hints on the left
struct: every new turn you are given the height of all the current mountains
struct: in the for loop
struct: you need to print the index of the highest one
SheLuvCoding: it is while loop
struct: you can ignore the while loop
struct: is just so the game loops forever
SheLuvCoding: ok i printed 7 because thats the highest range it can go
CoonCoder: i m trynna get likee struct
SheLuvCoding: but it didnt work
struct: thats the height
struct: you need to print the index
CoonCoder: use .index function :D
SheLuvCoding: it says for i in range(8)
SheLuvCoding: so wouldnt it be likke 1 less
Blokops: if its a list you can use list.index(value) to give you the index of where the value is found
SheLuvCoding: is there no run button
SheLuvCoding: is it only the testcase thing
jacek: there are always 8 mountains, destroyed mountain has 0 height
jacek: there is play testcase, play all testcases and submit
jacek: https://i.imgur.com/2Viq1T4.png
SheLuvCoding: i made a list woith number 1-7
SheLuvCoding: and printed that
SheLuvCoding: but oit didnt pwrk
Blokops: first try to pass all the test cases
SheLuvCoding: do i just print all the indexes
Blokops: okey so what you need to do is each loop print the mountain with the biggest value
each loop the bigest moutaing will loose one "height"
Blokops: but then the tallest mountian will change
Blokops: thats why 1 to 7 does work
Blokops: M(ountian) 1 can be the tallest more times in a row
SheLuvCoding: mannnn this is too hard
SheLuvCoding: is there an easier one
SheLuvCoding: or can i looka t someones code
Blokops: one sec looking for a easier one
Blokops: okey this will take longer to write but will be easier to undestand
Blokops: https://www.codingame.com/training/easy/detective-pikaptcha-ep2
Blokops: http://chat.codingame.com/pastebin/020ae959-e6b1-42b2-8532-c59190e87267
Blokops: hold up!! i gave you the aprt 2 sorry
Blokops: https://www.codingame.com/training/easy/detective-pikaptcha-ep1
SheLuvCoding: ok i suck at this
struct: well when did you start coding?
struct: which month?
Frukostbord: SheLuvCoding. I came here waaaay too early. Learn basic conditional statements and loops (If, while, for, etc). Variable types and functions. After that you can do the quests here.
Frukostbord: I just started two months ago. But programming is sooo much problem solving. So solve alot of basic problems. Build basic programs, such as a calculator or temperature converter.
Wontonimo: ^^ +1 to that!
SMOKEz8z8: try something like https://automatetheboringstuff.com/ to get a feel for the basics
RainMeikar: I'm rank 1 in gold for mad pod racing, I'm ahead of darth, and the time for rank up passed, but I didn't rank up, is there a delay or do I have to log out and log back in?
Blokops: you need to defeat the boss not just rank 1
5DN1L: He does
RainMeikar: my points are 44.35, darth is 44.2
Blokops: “¯\_(ツ)_/¯“
5DN1L: Not sure what's keeping you, maybe you wait again, and if you still aren't promoted, then contact CG staff to ask them to fix the issue
RainMeikar: is legend going to introduce any new mechancis?
5DN1L: i don't think so
RainMeikar: btw how do you print messages next to the pods?
5DN1L: what do you mean? is there a replay where you see that?
RainMeikar: some people print debugging messages next to the pods, so you can see them on the game window
RainMeikar: instead of down at the game logs
Antessial: just add the message as the 4th output parameter, right after thrust value
Spaticus: need help
Antessial: what kind of help?
Wontonimo: the helpful kind
Blokops: question easiest bot programing challange (or shortest)
Blokops: i dont want another legends of code & magic
Blokops: that took me for ever
C26_1: Oh good morning everyon
C26_1: Somhow my computer laggd with '3', 'e', 'd', and 'c' keys
C26_1: I have a very easy puzzle
C26_1: Given a number 'a', compute the number 'b' such that b is the smallest number where a*b is an integer
Blokops: wdym by is an integer
Blokops: what
C26_1: a is a float number, sr because I didn't mention that
Blokops: oh
C26_1: input 3.5 will output 2
C26_1: because 2 is the smallest number
C26_1: and 3.5*2 = 7 (7 is an integer of course)
Blokops: the easy answer would just be a while loop
snoyes: 3.5*0 is also an integer, and 0 < 2.
C26_1: pretty trivial for all numbrs
C26_1: Have you ever heard of Lexicography Order Computation?
C26_1: Given a number N in decimal, print all the numbers that satified all conditions below: - Each numbers have the number of digit '1' the same as the N when converted to binary - The length of each numbers must smaller or equal to the length of N in binary
C26_1: There is one thing I need to clarify
C26_1: The length of a number in binary
C26_1: You're just ignored all the trailings of 0
C26_1: so 2 in binary (10) has a length of 2
C26_1: @all, can I ask a question
C26_1: Can I make a lot of var to keep track of some info
C26_1: to make debugging easier for me