Chat:World/2021-08-09
martinpapa69: 281474993527863 thats a big number
martinpapa69: careful with the owerflow
martinpapa69: v
will.claude: Trying this site out for the first time, used to doing stuff like Codewars/leetcode, feels a bit different
jacek: amazons puzzle of the week :tada:
xxd: @martinpapa69, yeah, we figured it out, it was uninitialized. it's odd because I could've sworn struct members get default initialized to the "0" value...
akashhuyaar: how to understand that ai of coders strike back game i can't understand the problem exactly fr
xxd: Do you have a question about the rules or are you asking how their bot AI works
akashhuyaar: how it works
Uljahn: you mean under the hood? you send the bot code, it gets executed, then you receive JSON replay back to be shown in the browser visualizer
Uljahn: also there is a game engine (a referee) which generates inputs for bots depending on its outputs, so your task is to write a program which reads inputs and outputs some commands
Uljahn: you should implement some logic to make these commands sensible, that is called AI
Hmode: system out println ("1");
akashhuyaar: ohhh cool @Uljahn
OldJohn: @martinpapa69 What are you testing, you were so much more successfull last week ?
[-8-]pro[-8-]: how do i close the chat?
OldJohn: Litlle arrow just at he bottom of the chat
Artycoka: right next to the little "gear"
martinpapa69: i worked on quantized nn inference last week. still buggy i think. or just bad parameters
OldJohn: quantized ?
Uljahn: is it QAT or post-processing?
OldJohn: Do you have a reference ?
martinpapa69: qat. i train ith tflite
martinpapa69: https://blog.tensorflow.org/2020/04/quantization-aware-training-with-tensorflow-model-optimization-toolkit.html
OldJohn: Ok thanks I 'll take a look even if I am using pytorch :-)
martinpapa69: did you add some smart stuff to your bot or just lucky parameters?
OldJohn: Mostly optimization
martinpapa69: how many rollouts do you have in 50ms ?
OldJohn: more than 9000 in the opening
OldJohn: up to 50000 in the ending
martinpapa69: nice. 4k at start here
martinpapa69: nn size? i have 128->64
OldJohn: actually the first layer here is 88 :-)
derjack: oh my
martinpapa69: the input layer 88 ?
martinpapa69: or the first dense
OldJohn: Input 291
martinpapa69: ok
martinpapa69: ye my nn might be a bit too big. but it worked with the float version
OldJohn: But the input is sparse so the matrix vector can be optimized
derjack: yay for one hots
martinpapa69: ye, i have precalct the input*first_layer
martinpapa69: as the input is always 1.0
OldJohn: Exactly
OldJohn: the matrix vector is then very optimized (that is my main job in real life)
OldJohn: Even if normally I use the mkl library
martinpapa69: nice. I too have avx matrix multiplication. but for some reason its not much faster than my float one
OldJohn: It should be, you can use Intel oneapi tools to understand why it is not
OldJohn: I was so surprised o how bad compilers are on dotproduct
OldJohn: and if the size of the matrix is big, blockind may be necessary
OldJohn: Even for matrix/vector
martinpapa69: no idea what is that
martinpapa69: i just copied my code from here
martinpapa69: https://github.com/glinscott/nnue-pytorch/blob/master/docs/nnue.md
PeaceMoreZ: how do i see the correct answer after finishing a game?
PeaceMoreZ: "view code" option is not showing
RoboStac: if you mean clash of code then it's up to the other players if they share or not
PeaceMoreZ: oh ok
PeaceMoreZ: thanks
PeaceMoreZ: and yes it was in clash of code
PeaceMoreZ: An error occurred (#705): "You are not allowed to access to this solution".
Izzy90: Hey - noob question here. Say I wanted to use a NN for a certain bot. How would I go about training it? Where and how would the model parameters be saved between training iterations, and after training is completed?
martinpapa69: if u want to learn how to make nn bots I'd recommend you to start with DQN
martinpapa69: https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html
Wontonimo: Izzy90, usually you do that offline
Wontonimo: by using 10,000's of games
owenmelbz: just found this website, but confused as to what it's trying to do. Is it learning how to code games? or just learn code via gaming quizes?
just looking at the first coders strike back, and it's talking about figuring out "thrust" - is the challenge here how to code... or is the challenge here understanding like physics and maths?
AntiSquid: hey Automaton2000 what's up ?
Automaton2000: cant see it in the ide
Wontonimo: hey owenmelbz, there are several things on this site. The bot battles like coders strikes back are fun ways of seeing how you are able to code and problem solve compared to other people
Wontonimo: different bot battles have different problems, and not physics bases. Connect 4 and Ultimate Tic Tac Toe are examples of classic board games with no physics
Q12: Hey, does someone have a good algo for learning spells in the beginning of game in Fall Challenge 2020? this would help a lot
Hunter64TheOne: hello
Wontonimo: Q12 I haven't entered that game until just now
Wontonimo: what have you tried so far?
technoindiangamerg: hi
technoindiangamerg: 0x0x0x0x
Wontonimo: hi
Q12: learning the first spells in list to get opponent blue ingredients, learning the highest spell by value I can learn (the value for each ingrdient is his tear + 1)
Q12: creating cycles, which means that from each ingredient you have a spell to convert to each other ingredient
Q12: as much cycles as I can
Q12: all of those options have a limited number of learns
Q12: I am currently at rank 46 at gold, I desperately want to reach legend league
ProCoder03: Wait after the contest end , does our code and ranking disappears ??
Q12: no
ZarthaxX: nop
ProCoder03: I was in Bronze league in Fall Challenge
ProCoder03: Now I am in WOOD 2 again :crying:
ZarthaxX: impossible
ProCoder03: Yup !
ZarthaxX: cant be
ProCoder03: Then where is the ranking and my code :thinking:
ZarthaxX: contest history
ZarthaxX: https://www.codingame.com/contests/fall-challenge-2020
ProCoder03: Thanks
ZarthaxX: yw :)
KiwiTae: ZarthaxX o/ not working today?
ZarthaxX: hey kiwoo
ZarthaxX: yes im
ZarthaxX: but in 45 mins
ProCoder03: Aw shit!! I forgot That was another account
ZarthaxX: told you
ProCoder03: :sweat_smile:
raiz_rizon: :inconten:
raiz_rizon: :innocent::rage:
raiz_rizon: chose one
raiz_rizon: :innocent:
raiz_rizon: :rage:0
raiz_rizon: :rage:
raiz_rizon: wait you join me
holite: hello but i am new i dont know how to do it
holite: ok i am going to leave the clash :(
raiz_rizon: wait a im
raiz_rizon: new to
holite: of can you just answer for this
holite: Mario is marching to the castle to save the princess. In the last phase he has to jump over a number of pillars of different heights. When Mario jumps from a lower pillar to a higher pillar, he has to use High Jump. When he jumps to a pillar of lower or same height, he has to use Low Jump. Your task is to find out how many High Jumps and Low Jumps Mario has to do.
holite: can you give the python or cpp code for this "raiz_rizon".
KiwiTae: aint hard though u just need to diff and count pos and neg in the array
holite: not if the array must have been not pos or neg you have to len it and and fine the the value of it using a for in range.
raiz_rizon: ok thank you
raiz_rizon: wait I ' am learning
raiz_rizon: wait
raiz_rizon: hi
Totomns: hi
raiz_rizon: I'am raiz
Totomns: iam Toto
raiz_rizon: hi want join
raiz_rizon: ?
raiz_rizon: :innocent:
raiz_rizon: toto
raiz_rizon: ?
Totomns: join CoC?
raiz_rizon: np
raiz_rizon: 'cv.SD">csdv.;asd,
raiz_rizon: v
raiz_rizon: dsl;fkl;asdfl;ka
raiz_rizon: this is my code
KiwiTae: you good? ><
General_Iroh: nice
xxd: the silver bot in CSB is pretty darn good huh
xxd: or i guess i'm just bad
TobiasA: latter
TobiasA: jk:grin:
TobiasA: do you like my new profile pic?
xxd: looks nice
TobiasA: what rank in csb
TobiasA: ?
grygory: hello:)
grygory: im looking some codeing python friends?
grygory: mayby somebody want create any easy project?
grygory: i'm beginner
michaellan: Is there any real overhead to using std::array over raw C arrays in C++?
jacek: probably not
Upskiller: any idea about this fibonacci thing?
Magnakay: You can look in youtube, there are a lot of videos with great explanation
KiwiTae: Upskiller fibonnacii thing?
michaellan: failing to convert my C++ MCTS into a bitboard-ed version :sad:
michaellan: its so finicky
Scarfield: have you tried bitboarding before?
jacek: struct left and he cant see that amazons is the potw :c
Scarfield: he left? :scream:
jacek: shore leave
Scarfield: he will be back, there are more hex games that needs to be made multies for
michaellan: @Scarfield, no, first time
Scarfield: ok, have you made a function to visualize the board? can really help finding errors :)
michaellan: yup
michaellan: i think its the MCTS part thats finicky
michaellan: one player keeps suiciding sorta
michaellan: (The other player wins normally)
Scarfield: which game?
michaellan: now what would be great is if i could visualize the tree as its growing...
michaellan: i'm just doing this on normal (not ultimate) tic tac toe on my own computer
Scarfield: how do you check if a game is won?
xxd: http://ix.io/3vug
xxd: code^
Scarfield: if you are doing it locally, you could see the tree grow, just limit the number of times the code is run or something like that
jacek: and the mcts works in normal board?
jacek: no sign errors?
xxd: that must be it, i changed the backpropagation code for no reason to try and optimize it
xxd: let me use my old working backprop code
Scarfield: no!
Scarfield: :p
jacek: oO
xxd: what do you guys use to increment
xxd: i think wontonimo does +2 for win, +1 for tie, and +0 for lose
jacek: normally is 1, 0, -1
xxd: ok
xxd: was just wondering how that would affect UCB1
Scarfield: i use 1, 0.5, 0. but remember to adjust the ucb so it "fits"
jacek: maybe not so bad, winning is highest, losing is lowest, but the range is changed
jacek: perhaps adjust exploration only
jacek: but after enough iterations it should converge even with crappy exploration
Dohmanlechx: Why doesn't C++ substr work as expected? I try to substr(16,20) for instance but still it returns a lot of letters...
xxd: second param is length
xxd: not end inde
xxd: s/inde/index
xxd: so you want substr(16, 4) ii think
jacek: c++ api :unamused:
Dohmanlechx: Lol!
Dohmanlechx: This is what I get when trying learn a new language, I guess. Thanks <3
Aina_Tiavina: Hello
PMierzwa: is there any way to debug using breakpoints for c++?
darkhorse64: Not within the IDE
PMierzwa: So i have to copy the code + the input to another editor
jacek: eeyup
jacek: here, you can print to stderr at the most for 'debug'
PMierzwa: its a shame, since i am not trying to learn how to debug without the proper tools, but rather the new language
PMierzwa: its possible to copy the stuff to another ide
Dohmanlechx: Thanks for the help about substr, managed to complete the ASCII Art now. You guys are welcome to review: https://www.codingame.com/training/easy/ascii-art/solution?id=20539508
jacek: :tada:
gilroky: System.out.println("4"); // The index of the mountain to fire on.
jacek: :thinking:
xxd: hes just telling us a fact, don't overthink it
Scarfield: the descent solved
jacek: the ascent unsolved
yfe42: the solution descended
xxd: solved descent the
Sacder: can someone help me with the temperatures
Astrobytes: bigger number == higher temperature, smaller number == lower temperature [solved]
BlaiseEbuth: Mods these days...
Astrobytes: :P
Astrobytes: "the temperatures" is a tad vague.
Sacder: the one where it asks to find the value closest to 0
xxd: so you want help with python
xxd: not with the temperatures
Scarfield: today you have the mod "emoji" blaise, chat is weird
Scarfield: Helpstrobytes
Scarfield: what have you tried so far sacder?
BlaiseEbuth: "emoji" ?
Scarfield: logo what ever, yesterday i couldnt see your mod tag
Astrobytes: Blindfield
FalINTOblivion0112: omg blaise is back to mod
FalINTOblivion0112: that is amazing
TobiasA: why?
Astrobytes: It's temporary.
FalINTOblivion0112: temp?
FalINTOblivion0112: thats even better
BlaiseEbuth: Is it ?
Astrobytes: afaik
Astrobytes: WAs cause of the chat reboot
Scarfield: so yesterday you werent a mod, but today you were resurected?
BlaiseEbuth: Yesterday I already was
xxd: light mode on codingame
xxd: its not very good right now
xxd: I use it
BlaiseEbuth: Well, unless they decide to fix their entire (weird) system, I'll be re-moded at each chat crash. So approximately once a week (unless they decide to fix the chat, but we know they won't)...
Scarfield: xD
Sharkle: yo guys im not learning anything and im really confused
xxd: can someone give an example of how to encode unicode in C to make bash solutions shorter using system()?
Sharkle: this game isnt explainging anything to me
xxd: the game wont teach you python
xxd: its expected you know python already
xxd: the problem is pretty straightforward
xxd: if you have questions about the actual problem ask
Sharkle: hmm ok im good for now
jacek: oh my
Scarfield: oh you
Westicles: xxd, try asking on #fr
MACKEYTH: https://www.codingame.com/training/easy/encryptiondecryption-software has me stumped on validator 2
Wontonimo: okay, i just tried it. I didn't have any issues
Wontonimo: did you pass all the test cases with a generic solution MACKEYTH ?
Dohmanlechx: Can someone give me a hint about how to calculate the step between turns for the Shadows of the Knight - Episode 1 puzzle game?
Dohmanlechx: I guess some kind of formula where I use the count of windows and the max jumps Batman is allowed to make
Wontonimo: how about just dividing the board given the U D L R
Wontonimo: you should be able to just divide the x axis in half and and the y axis in half every turn
Dohmanlechx: Thanks
MACKEYTH: @Wontonimo Yes, several different solutions actually
MACKEYTH: I'm breaking the key down with String.split(" ")
Wontonimo: yeah, i don't do that
Wontonimo: because it doesn't handle the " " between " " break
MACKEYTH: I also tried Scanner.read() ing 26 times. Both worked on the test cases.
Wontonimo: how are you handling the space with split(" ") ?
elderlybeginner: i have some issue with power and speed in fantastic bits
elderlybeginner: during throw, should I consider mass of the ball? e.g. ...
Wontonimo: are you doing a sim elderly?
Wontonimo: or just a if/else bot?
elderlybeginner: when wizzards goes 200, power of throw is 500, what will be the speed of the ball?
elderlybeginner: kind of evaluation. I'm trying to get proper throw angle, I tryied to calculate it basing on sine theorem, but I see that 500 + wizzard_speed cannot be taken as a ball speed after a throw
Wontonimo: that feels like something you could use stderr to print out when you recreate a similiar situation in the game, then make that a test case for yourself for reverse engineering the equation
Wontonimo: is the equation not in the problem statement of the game?
elderlybeginner: I have equation, thou it need ball/snaffle speed.
elderlybeginner: and e.g. wizzard is moving 343 when grabbing the ball (snaffle), slowing down (according to friction 0.75) to 257 when it's going to throw, but the ball gets the speed of almost 1500
elderlybeginner: ok, maybe it's power = 1/2 * (mass * velocity **2)
elderlybeginner: but that would be even less
Wontonimo: some game data would be valuable
Wontonimo: including the power of the throw,
Wontonimo: the next turn vx vy of the snaffle
elderlybeginner: http://chat.codingame.com/pastebin/77f3590b-ca21-4888-b9f0-900d71c2e332
elderlybeginner: http://chat.codingame.com/pastebin/6ff688d3-4376-481b-a27b-c3df47370d9c
elderlybeginner: https://www.codingame.com/replay/574876919
elderlybeginner: ah, links problem ;)
elderlybeginner: I'm looking for connection between: power, velocity and mass during the ball is thrown
Wontonimo: got a second data point?
Wontonimo: from this, all we can say is power 500 = 1463
Wontonimo: which, by the way is 1950*0.75
Wontonimo: so, for all we know the velocity is ( power*4 - 50 )*0.75
Wontonimo: or power * 3.9 * 0.75
Wontonimo: need another couple data points to rule out different equations
elderlybeginner: ok, counting
elderlybeginner: power 100: gives 531 power 200: gives 725 power 300: gives 924 I will need to throu it straight, as now there is an angle which can decrease maximal speed
Wontonimo: or also collect that data
elderlybeginner: power 400: gives 1094 power 500: gives 1318 as the throu is not perfectly in line of wizzard movement, speed of the ball is lower
elderlybeginner: i guess I have to throw it stright
Wontonimo: or not and just record all the data
Wontonimo: put it all into a spreadsheet
Wontonimo: including the speed of the thrower during the throw
RoboStac: if you've got the wizard thrust working it's exactly the same (other than half mass). When thrown it has the speed of the wizard and then gets a thrust of up to 500 in the direction thrown
Wontonimo: and the target throw
Dohmanlechx: Okay looks like medium puzzles are too hard for me yet, have to make more Easy ones...
Wontonimo: have you done all the easy ones Dohmanlechx?
Dohmanlechx: Nah only like 5 of them and jumped right away to Medium :P
Wontonimo: Have you tried https://www.codingame.com/training/easy/1000000000d-world Dohmanlechx ?
FalINTOblivion0112: well i solved three very hard puzzle
FalINTOblivion0112: thats nice
michaellan: nice
michaellan: which ones?
michaellan: i solved the ones that arguably didnt belong in Very Hard xD
Westicles: Mars 3, Resistance, and Recurring Decimals
michaellan: oh nice
michaellan: i solved resistance, unflood the world, and barnyard
BlaiseEbuth: Still one to do.
michaellan: which?
michaellan: what do you mean by that
BlaiseEbuth: A third very hard
xxd: ha
xxd: which one are you implying is not very hard?
BlaiseEbuth: You didn't understand me. I only did 2 very hard.
RaulButuc: lol
BlaiseEbuth: RaulButuc ?
RaulButuc: anyone got any idea which dates the fall challenge 2021 will cover?
RaulButuc: really looking forward to it but if it's going to match the same days as last year I wont be able to attend :(
BlaiseEbuth: Why lol so?
BlaiseEbuth: Nobody knows about the dates. We don't even know if this gonna be a bot programming challenge...
RaulButuc: the period before black friday is going to be super busy (contract with an ecommerce platform and its the busiest 2-3 weeks of the year)
RaulButuc: ah fair then
AllYourTrees: wait it might not be bot programming??
AllYourTrees: what else is there?
BlaiseEbuth: Escape thing...
RaulButuc: nice
RaulButuc: it'd be my first community event lol, hope i won't miss it
AllYourTrees: is a 4000 person clash of code possible? XD fastest mode incoming
AllYourTrees: over in 1 min
RaulButuc: wow, that'd be total chaos :)
xxd: What if it's a code golf challengee
BlaiseEbuth: Server will be dead after 10 seconds.
RaulButuc: haha, very likely
xxd: hmm... if it is escape that will be disappointing
xxd: my impression of the tutorial was not the greatest
Westicles: All the complaining will be awesome though
michaellan: how do leagues work in a live challenge?
BlaiseEbuth: At start only bronze is open. After a few days the bot of a player is chosen as the boss, and silver open. And so one for next leagues.
BlaiseEbuth: *on
michaellan: I see, thank you