Chat:World/2021-07-07
WhaIe: @binjn sus
ninjago_get_some_bitches: kinda sus tho
jacek: dbdr was up all night oO
dbdr: no, only my training was
dbdr: though it was killed again, I think it's a memory usage issue
dbdr: be happy jacek, this version pushes you up ;)_
dbdr: and robo down
MSmits: morning
SuryaTheOP: anyone tring coding escapee
derjack: i always escape from coding
drosh: i didnt understand one shit
drosh: like what the hek was that code saying
juice0: sometimes i understand less than one shit
juice0: if (myUnderstanding < 1): return shit; and even that throws an error because either shit and understanding are undefined, or both are uninitialized, or sometimes the compiler can't even understand why i'd compare the two
juice0: thank you for coming to my ted talk
juice0: the only recursive algorithm i know is that whenever i drink a beer, there's another empty beer can in my trash
derjack: oO
Marchete: dbdr I think gc.collect() solves memory problems
Marchete: at some point I tried cvs_data=None
Marchete: it seems it's not freed fast enough
Marchete: or never, who knows
Marchete: throwing gc.collect() here and there reduced the memory problems (and in some cases the kernel killed)
derjack: hmm https://github.com/Sneeds-Feed-and-Seed/sneedacity/issues/58
Saint_Rose: the comeback is alwyas greater than the setback
Saint_Rose: The comeback is always greater than the setbackd
princess_of_zeal: Question for the performance pros: I just came across https://nullprogram.com/blog/2017/04/27/
princess_of_zeal: Half-way down the page under the struct definition it states "Rather than native C pointers, the structure uses 32-bit indexes into the master array. This saves a lot of memory on 64-bit systems"
princess_of_zeal: is that something you use on CG as well?
derjack: woah yavalath
Astrobytes: Yeah, an array of preallocated nodes, index in and increment when you use a new one.
derjack: aka nodes pool
princess_of_zeal: thanks - didn't realize fully that using normal pointers basically will cost you performance
darkhorse64: Using indexes saves memory at the cost of doing pointer arithmetics. In practice, it looks like a good trade-off
princess_of_zeal: and what do you think of the way he defines his node struct? Wouldn't you typically store the number of playouts / visits of the node itself instead of storing it for the children?
princess_of_zeal: I was also wondering about storing the score explicitly, as updating that would be more expensive than just incrementing a victory counter - but then again you probably need the score more often than you would update it, I guess ...
punter147: i am able to pass all but a few(7 :disappointed:) testcases of sokoban. I used bfs. Thanks to sprkrd i switched from A* to bfs. BUt i have a doubt now. Do yall use the sophisticated algorithm given here for deadlock detection? http://sokobano.de/wiki/index.php?title=How_to_detect_deadlocks
punter147: right now i use a rudimentary algorithm,(a box must not be in a corner) for deadlock detection...
princess_of_zeal: I also only checked for corners (brought me from 40% to 70%)
princess_of_zeal: The rest was box permutations
punter147: princess_of_zeal oh nice jump in accuracy. btw what are box permutations?
princess_of_zeal: when two boxes switch place, it is still the same state, but depending on your data representation it might be considered different
princess_of_zeal: you can save quite a bit of time by not checking an identical state again
DaNinja: I just check corners and use a 128bit bitmask to detect seen box states
BlaiseEbuth: I do nothing.
DaNinja: we know
BlaiseEbuth: Good.
punter147: princess_of_zeal oh i see. i am afraid my impl suffers from this as well. Nice trick. I will try to incorporate it in my impl.
punter147: DaNinja nice trick, but since C++ does not support 2^121 i converted bitset to string representation and stored it in hashmap. Is there a better way to do this? This seems to work for me but i would love to know a better way...
DaNinja: other solutions put the player and box positions into a 64bit int
DaNinja: and just keep the boxes sorted by x/y
DaNinja: __int128 is supported if you want to go that way
punter147: oh i didnt know about __int128 thanks DaNinja for the tip. I will check out the 128bit beast.
Saint_Rose: The comeback is always greater than the setback.
Keep on coding gyuys.
progamego: can sombady help me
Color-Coder: yes
BlaiseEbuth: :(
Color-Coder: hi
Samson120: how verbose do you guys make your code for these games. Are you creating full classes, or just putting data into "simple" arrays. Looking at "Code vs Zombies"
struct: I think I store it in a struc
struct: like Entity { int x,y }
derjack: my code for CG is hackatonish
Samson120: Thanks, anyone have a distance calculator for C# without using System.Math? I couldn't get that to work
BlaiseEbuth: :straight_ruler:
princess_of_zeal: would that help? https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code
Astrobytes: Distance? For CvZ? Just Euclidean distance (pythagoras)
derjack: that requires sqrt no?
Samson120: I don't have access to sqrt
BlaiseEbuth: Wut?
Astrobytes: why not?
Astrobytes: And yeah derjack, I misread
Samson120: C# requires the math assembly for sqrt, I haven't been able to add or reference it. I get an error when it goes through test
Samson120: I'm assuming because this is just a stub of the main
Samson120: Maybe time to switch languages...
BlaiseEbuth: I know C# sucks, and I know the CG support of the languages is not perfect, but no sqrt ? Srsly ?
derjack: maybe you need to import something
Astrobytes: sqrt is definitely available in C# on here
BlaiseEbuth: Perfectly works...
Astrobytes: works perfect right out the box
Samson120: You are right. I swear I tried it yesterday and it failed,
Samson120: Nevermind thanks for the help
derjack: oh my https://en.chessbase.com/post/alpha-zero-to-analyse-no-castling-match-dortmund
Astrobytes: Intriguing
bociricsi: Hey, is there a good way of learning c++? I have basic programming knowledge that gets me trough the easy puzzles, but then i check the solutions and i see that people using advanced functions that i've never seen before...
derjack: some people write clever and/or golfed answers
derjack: this site improves learning of what you already know. it's not for total beginners
derjack: if you already solved few easy puzzles then it is alright
bociricsi: yeah, the site is good to practice with the toolset you've got already, but idk where to learn about those i don't even know
bociricsi: like it's easy to google how for cycle works if you know it exist but what if you don't?
derjack: you can look others answers and google what they mean
dbdr: and then you find the monte-carlo solution to Onboarding :D
Astrobytes: and the NNs
BlaiseEbuth: :no_mouth:
[CG]Maxime: :)
MSmits: bociricsi I knew no algorithms when I got here, only basic coding
MSmits: I had no formal education either
MSmits: when you chat here, people will give you ideas. Then you will google what they mean and learn to implement them
MSmits: that's generally how I learned
Astrobytes: ^
BlaiseEbuth: Not me. I don't trust people in that chat...
bociricsi: That seems like a very inefficient procedure :D
MSmits: it's inefficient if you just want to learn things that are known. It is great if you want to learn to creatively apply them
Astrobytes: You'll get out of it what you put in, and more
MSmits: google is your friend really. There's courses and tutorials on almost everything. You come across something, there will be someone who wrote something that *is* efficient
MSmits: need to do pathfinding? Dozens of good webpages and YT tutorials
MSmits: need to learn mcts? Tons of free examples and tutorials
BlaiseEbuth: 'google is your friend really'... Yeaa, gimme your data. :smirk:
MSmits: it's an expression, the company google is not your friend :P
MSmits: I meant the search engine
MSmits: google anonymously if you want :)
BlaiseEbuth: Don't use google
bociricsi: what's mcts? that is my problem... google only helps if you know the question
struct: monte carlo tree search
MSmits: bociricsi thats what the chat is for bociricsi
MSmits: i pinged you double, sry :P
BlaiseEbuth: bociricsi
MSmits: we give you the ideas and tell you what they mean, you go look up the details elsewhere
BlaiseEbuth: We do?
MSmits: or if it's something that I like to talk about, you can read the text wall that follows
Astrobytes: Everyone other than you Blaise :rofl:
struct: i dont even know how to code
BlaiseEbuth: Oh! That 'we'.
MSmits: ah yes, i meant the exclusive we
Marchete: mcts is a tree structure
Marchete: ups, old chat :D
MSmits: it's a process
BlaiseEbuth: it's letters
struct: maybe we need a tech io for mcts
derjack: is life
MSmits: struct euler did this
bociricsi: yeah, my girlfriend (wiki) already showed me ;)
Astrobytes: unnamed codingamer did an example in Java on techio
MSmits: euler did in C# I guess?
Astrobytes: Yeah
BlaiseEbuth: So there's nothing that worth the look about mcts on tech.io...
MSmits: it's kinda weird imho. He almost never uses mcts i think?
Astrobytes: (I think it was in Java, I can't remember)
Astrobytes: When needed MSmits
MSmits: yeah i know
MSmits: he knows a lot he doesnt use much
MSmits: he also codes better c++ than I do I think, but he doesn't like it
princess_of_zeal: nobody likes c++
MSmits: good point
Astrobytes: ahem
BlaiseEbuth: ...
derjack: nopony?
Marchete: no :racehorse:
MSmits: https://www.codingame.com/profile/aded62be13940e5023597372894cb433883451
MSmits: top 100 pony
bociricsi: I like to punish my brain with shits like C++ :D
BlaiseEbuth: shits ?
MSmits: :poop:
princess_of_zeal: top 100 pony seems to prefer other languages as well
struct: if you use c++ you cant get top 100
MSmits: who hacked struct
dbdr: Marchete: https://github.com/marchete/CGZero/blob/0fbbc6d289082dc399bd4e315f0eed4abd009df1/src/Train.ipynb?short_path=290d4e3#L438
dbdr: is there a point to using K_BATCH_SIZE/4 instead of K_BATCH_SIZE ?
Marchete: dbdr, about memory issues, I don't know if you saw my chat earlier, try to use gc.collect()
BlaiseEbuth: No need to hack, everything is public in struct
Marchete: not at all
Marchete: :D
Marchete: it's a bug
Marchete: remove the /4
MSmits: makes sense BlaiseEbuth
Marchete: when I tried to use 1M samples
dbdr: yay, though so. lazy to update the constant? :D
Marchete: the /4 comes when I was trying the minibatches
Marchete: minibatches I think it uses bigger batch_sizes
Marchete: or the opposite, can't remember
Marchete: but that /4 is a bug
MSmits: mini suggests smaller...
Marchete: subset samples of Nk, but then the hyperparameter batch_size
Marchete: I don't know what to use
MSmits: maybe it's one of those params with a large plateau of effectiveness
dbdr: btw I fought all morning to get GPU working on tensorflow. result: it finally works, and it's slower :D
dbdr: I think all the time is spent passing around the data. just a guess
MSmits: or your gpu is much older than your cpu
RoboStac: it'll depend a lot on that batch_size too
RoboStac: bigger batches are much quicker
MSmits: that's true without gpu also
dbdr: yes, saw that. but won't that be true for both cpu and gpu?
struct: no
MSmits: but gpu has better parallization ofc
Marchete: also CPU model.fit doesn't use all CPU for me
MSmits: on cpu bigger batches are mostly faster because you dont backpropagate as much. Correct me if I'm wrong
MSmits: at least i noticed that. It was superfast when training with big batches
RoboStac: but it can cause issues with the training
MSmits: yeah you dont converge properly
Marchete: issues as worse learning?
RoboStac: yeah
Marchete: then use batch_size=1, ezpz
MSmits: it's like using a learnign rate that's too big
RoboStac: that has the same issue in the opposite way though
Marchete: lol define big
MSmits: that's relative
RoboStac: well, it's averaging gradients / loss over all those samples so if you go too big then it tends to make very small changes
RoboStac: if you go too low it's noisy and unstable
Marchete: that's sounds cool, then I ask. And how do I know I'm in the sweet point?
Marchete: and the answer is, you can't
RoboStac: yep, pretty much
RoboStac: luckily it tends to work fairly well over a large range
Marchete: by trial and error, and suddenly we changed from NN to Monte Carlo
Marchete: and it's a damn inception
RoboStac: and theres other related parameters (learning rate, momentum) you can tweak to make up for it :)
Marchete: we need to go deeper, hire Leo Dicaprio
struct: finally found how to win vs robo on connect 4
struct: just need to increas exploration factor from 1 to 10'000
struct: https://www.codingame.com/replay/568847718
RoboStac: did you just copy what msmits does?
dbdr: lol
Marchete: hey he has a point
darkhorse64: I usually test values around 1 by 0.25 increment. Did you really use 10000 factor ?
struct: only way to beat robo is to make my bot play worse
struct: my bot seems to solve sooner if i dont reuse the tree :thinking:
RoboStac: yeah, on frame 37 you manage to find a move that looks terrible short term into a solved win :(
struct: i already solved as win on that frame
dbdr: exploration 10'000 basically means a MC
RoboStac: yeah, mine solves it quickly on the next turn once it's been played, just had barely looked at it before that (233 visits)
darkhorse64: I have a C4 MC ranked 55 (approx)
dbdr: darkhorse64, he just increased by 0.25 40k times
darkhorse64: It would be a good boss. 40k submits then ? CG will complain
struct: anyways you should not worry about it, if i submited that bot it would not even get top 10
struct: i think my 5ms version would be a good boss
princess_of_zeal: is C4 9x8 solved? I didn't find any data when I last looked for it
struct: no
RoboStac: not that we're aware of
MSmits: maybe my next version would be worse against robo again...
princess_of_zeal: every smaller bot size is solved, right?
princess_of_zeal: *board
darkhorse64: 8x8 is solved if I remember well
MSmits: 8x8 is solved
MSmits: 9x7 is not, at least not publicly
darkhorse64: first
MSmits: yes :)
MSmits: 9x7 is harder to solve than 8x8 btw
MSmits: because of +1 branching
darkhorse64: MSmits is solving 9x7
struct: just solve amazons
MSmits: trying, but it might be out of reach. Without finishing i can pretty much tell it's a draw though, in our version
Astrobytes: "just"
struct: low branching factor
darkhorse64: like clobber
princess_of_zeal: I remember giving a presentation in 2002 on the 7x6 solution
MSmits: thats cool
struct: I dont think i even know to play connect 4 at that time
MSmits: the factor in time required when you just go up 1 size is extreme
Marchete: but 8x8 seems similar in area size
bociricsi: lol i just tried this with a random generator and it won xD
MSmits: might seem similar and still solve 4x faster, who knows
MSmits: exponential things are like that
struct: on cg checkers can you capture backwards after you capture the first piece?
MSmits: i think only kings can
MSmits: not 100% sure
MSmits: check a few replays, should be obvious then
MSmits: jumping is mandatory so if you see it not jump backwards, you know it
struct: I think you are right
struct: So many variations
darkhorse64: According to the statement, CG checkers are English checkers where only Kings jump backwards
BlaiseEbuth: ngl
Teefkiller: how are you guys good at this stuff
Astrobytes: Practice.
BlaiseEbuth: Inborn.
princess_of_zeal: good is quite relative
Teefkiller: is there practice mode here?
Astrobytes: There is indeed. Activities->Practice. Start with easy puzzles. You are clashing currently I take it?
Teefkiller: nah im not clashing
Astrobytes: What are you doing then?
BlaiseEbuth: Chating. Don't you see?
Teefkiller: im just on the site right now
Astrobytes: I thought that said 'chafing' for a second blaise
Astrobytes: Ah OK, then start where I said Teefkiller
Astrobytes: afk
Teefkiller: damn this is a global chat, thats nice. How do i find clans/ teams to join
BlaiseEbuth: #ru
codeing: hello BlaiseEbuth
codeing: sup ?
BlaiseEbuth: yo
codeing: bruh
Teefkiller: am i in the clan after i clicked that?
jacek: #fr
BlaiseEbuth: That was a joke Teefkiller, there's no clans on the site.
jacek: good evening
punter147: it would be good to have a monte carlo clan :joy: (MCC)
jacek: welp https://i1.kwejk.pl/k/obrazki/2021/07/t2ePV97Y4FZEhshk.jpg
A_noob_ayu: https://www.codingame.com/clashofcode/clash/18531711a3df2ad3cd49c758192b125804374e2
punter147: jacek :joy: thats a good one
A_noob_ayu: join if yall want to
Westicles: Anyone have experience running JS from dart?
Wontonimo: software is soft
jacek: thats what she said
Wontonimo: lol
Marchete: :joy:
Wontonimo: what are you finding difficult Teefkiller ?
Teefkiller: answering the questions.
Wontonimo: only if you want the right answer
Wontonimo: which one are you working on?
FalINTOblivion0112: ohhh
FalINTOblivion0112: damn
Wontonimo: hey punter147, you can access the Monte Carlo Class here #MCC
punter147: Wontonimo it was a joke, i meant monte carlo clan would be a good idea. but thanks for the channel, i will get to learn more about mcts!
jacek: its wednesday https://img-9gag-fun.9cache.com/photo/a1rxVGR_460svav1.mp4
Wontonimo: * ultimate weapon *
BlaiseEbuth: eulerscheZahl at work
jacek: looking for bugs
BlaiseEbuth: :rofl:
Astrobytes: hahaha
Saint_Rose: The comeback is always greater than the setback.
Keep on coding guys.
BlaiseEbuth: Fckin spam bot.
Astrobytes: Every damn day.
FalINTOblivion0112: some humans are legit spam bots
BlaiseEbuth: Oh I absolutely don't know if he is human or not.
punter147: I solved sokoban. Thanks eulerscheZahl for the puzzle. And thanks all the experts here, particularly sprkrd, DaNinja, jacek, Wontonimo and a few others whose names i cant recollect regrettably. Next time i will keep a note :smile:
Wontonimo: Super!
BlaiseEbuth: You're welcome. :thumbsup:
Wontonimo: Hey, I haven't even attempted that one. Great job punter147, it looks hard
princess_of_zeal: yeah - that's how it is categorized: Classic Puzzle - Hard
BlaiseEbuth: :clap:
jacek: but i havent done sokoban :thinking:
Illedan: MuddySneakers around?
jacek: hm?
code_act_gamer123: ?
Illedan: His/her bot crashes in Blocking :P
Illedan: Annoying with 7 players in Wood 1 xD
jacek: oO
KiwiTae: Got a lucky submit on pcr :")
Wontonimo: so, how is MuddySneakers' bot got a score of 22.19 if it keeps crashing?
Illedan: Because it worked on submit and crashed after updates..
Wontonimo: ;(
Astrobytes: c#?
Illedan: Rust
Astrobytes: ah
Illedan: From December
Astrobytes: lol
Astrobytes: try discord?
Astrobytes: For Muddy I mean
jacek: spam the chat everyday until he comes
BlaiseEbuth: This methode remind me someone... But who? :thinking:
DarmorGamz: Damn this game bussin
Keegangb: facts i wish i knew about this earlier, just found it today
DarmorGamz: I'm just at work and code bored of coding for them so now im coding on here
DarmorGamz: lol
jacek: im gonna report to your manager
Spiderpiggydog: Your words are being broadcasted to the entire world
godkingandrew: they are the manager :o
Illedan: hm, blocking is a terrible game if 1 player crashes :(
Illedan: 90 % of the time ends in draws
dbdr: how is that related?
jacek: block him from crashing
Illedan: Because the number of tiles are determined by the number of players.
Illedan: And if 1 crashes, the rest is most likely able to use all tiles
dbdr: oh, there are >2 players?
Illedan: yeah
dbdr: I see!
jacek: yes, pull down robo further
dbdr: :)
Marchete: ok stop doing that!
Marchete: :D
jacek: keep going
dbdr: make up your mind
Illedan: Do it!
dbdr: yay, #4!
struct: submit again to be sure
dbdr: if I improve
jacek: i used to be #1 ;(
jacek: why did i tell you about onehots
juice0: this whole afternoon was spent trying to fix a return that should have been a continue. ugh
Illedan: Thx for sharing
Marchete: because you are a nice guy
darkhorse64: No worries, jacek, it's clearly documented in Stockfish forums
Astrobytes: when do you release your NN Dark_Vacode
Astrobytes: *darkhorse64
darkhorse64: still a long way before reaching submits
struct: good enough to "play my code"?
jacek: i used onehots in bt before the nnue hype
Illedan: nnue?
Persus: hullo there
Persus: how are you guy
Persus: im new here
jacek: hello new here
darkhorse64: Effiiciently Updatable NN
struct: https://github.com/glinscott/nnue-pytorch/blob/master/docs/nnue.md
struct: ƎUИИ
jacek: something that made stockfish get +100 elo
jacek: out of arse
Marchete: but that seems more complicated than I imagine you do on first one-hot layer
Marchete: At least I just set to bias and add or fmadd the ones
Marchete: just add*
jacek: that essentially what it is. you add only active ones
jacek: in chess 40k inputs, but at most 32 are active
Marchete: but it seems it goes beyond 1st layer
jacek: for 1st layer, the rest goes the same
darkhorse64: NNUE is very much chess oriented and really heavyweight but the optimization idea stands whatever the domain
Marchete: then why that fuzz?
Marchete: -<last_pos> +<new_pos>
Marchete: similar to zobrist hashing
jacek: in oware 14 inputs are ones, in bt 64. etc etc
jacek: pl? perl?
jacek: the NNUE is fast, but also grasps the important feature of the game. in chess the relation between kings and other pieces is important, more so in shogi
darkhorse64: the fuzz also comes from the fact that NNUE shows that you don't need many GPUs to run a NN
darkhorse64: before NNUE, there was Leela chess zero (GPU based chess software) that took the lead for a short while
Marchete: but they use ints for layers
jacek: to exploit avx/simd registers and make it faster
darkhorse64: For performance reasons. I don't know what the difference with floating point
Marchete: 16x int16
struct: vs 8xfloat
Marchete: or int8?
Marchete: I don't know
struct: its int16
Marchete: I've read int quantization, but it was too complex for me
darkhorse64: I forgot that "detail"
jacek: and you can fit those more than floats
Marchete: they also double some operations inside loops
jacek: but i have never used simd instruction explicitly
darkhorse64: Mokka with sugar
Marchete: I need to do that
Marchete: it seems it improves
Marchete: compiler can do a good job with autovectorization
jacek: but it would not use int16 or int8 explicitly
Marchete: I'd need to read again about those int quantizations
Marchete: int8 seems too much
Marchete: but it seems they use it
jacek: welp i use about 1/2000. precision and its sufficient
Marchete: I don't understand, you have 1/2000 as minimal step? so -1 to 1 fits in 4000?
jacek: somewhat yes
Marchete: and why?
Marchete: like
Marchete: whyy?
Marchete: 2000 seems so random
jacek: i could use probably more, but its sufficient for my needs when converting to CG
Marchete: for your compressor?
jacek: the weights are not restricted to -1..1
Marchete: tbt I've never checked trained weights
Riku5720: what is ranking based on
jacek: trueskill :?
Marchete: blood and honor
KiwiTae: corruption
KiwiTae: https://www.codingame.com/help/rank
FalINTOblivion0112: please no more dna clash of codes
Persus: oohhhhhh
Persus: it is dna clash of code
struct: tr ACGT TGCA
TheOtherAKS: wini flousi ya 7ouma
Payro: ya 7ouma flousek mchat tnayek
MaliciouslyCrypticUsername: http://chat.codingame.com/pastebin/dd18d8c9-2a0a-4269-bcf9-108f97806de6
duck_man: do any of you know who joe is
Grinder4everSolved: joe daddy