Chat:World/2022-07-05
jacek: :upside_down:
aCat: chat alive
aCat: good morning
aCat: HOLD THE EXECUTION!
Aldoggen: wow server connection failed in all chats for a moment
SugarCoatedPencilCase_8462: bruh
5DN1L: stop please
TheWaterCooledComet_63c: nem azahriah a hibás
5DN1L: Please use English here
5DN1L: and observe the code of conduct, thanks. https://www.codingame.com/playgrounds/40701/help-center/code-of-conduct
SugarCoatedPencilCase_8462: no english
TheWaterCooledComet_63c: no bicsiz?
Aldoggen: there is also a french chat if you speak that
derjack: Automaton2000 those are your last days, arent they
Automaton2000: need to check if you have a few more
Aldoggen: savage response if you ask me
DoubleCube_568c: enschuldigung ich kann nicht sprecht English
SugarCoatedPencilCase_8462: nincs szuka
derjack: schmetterling!!! :rage:
Aldoggen: Automaton2000 do you believe these people can't speak english?
Automaton2000: understandable, have a nice day
5DN1L: spammers will get kicked out, DoubleCube_568c and SugarCoatedPencilCase_8462
5DN1L: you've been warned
Ckami: :persevere:
JFB: Funny, 1st time I have been promoted to Legend with bot doing sometimes (and rather often) forbidden moves :-)
JFB: Exactly :-)
Aldoggen: they chose the wrong boss
Aldoggen: for more than one league probably
Aldoggen: so now everyone and their mother is in legend
JFB: :-)
JFB: It is only 192 bots in legend now - so around 10% of participants
derjack: speek
BlaiseEbuth: oO
JFB: But you are right - if bot not checking do move is valid or not can be promoted ... ;-
derjack: they brought back mirror matches? :tada:
BlaiseEbuth: Eeyup
gokubill: start
xx_zero: slay.
5DN1L: no spam here please
xx_zero: slay slout!
5DN1L: https://www.codingame.com/playgrounds/40701/help-center/code-of-conduct
xx_holly: sorry we are just clashing hard
xx_zero: sorry
xx_holly: you don't tell noob master off, just cause i'm a women in STEM
5DN1L: spammers will get kicked or banned, you guys have been warned
xx_holly: we were literally in the middle of a clash
5DN1L: just don't spam here, whatever you do
xx_holly: okay:thumbsup: i'm still going to slay in my clash
5DN1L: thanks
Westicles: is it necessary to define gcd for a clash, or is that common knowledge?
derjack: great circle distance?
5DN1L: green circle debt
Smai: You crack me up 5DN1L :rofl:
5DN1L: oh heehee, that's unexpected
5DN1L: hmmm, I don't think it's necessary to define greatest common divisor as the full name has been given. it's pretty self-explanatory
Westicles: yeah, that's what I thought
derjack: youll know it when see the number of 1-starts
derjack: stars even
Westicles: I wish they showed stars for clashes, you don't get feedback unless it is removed
j4at: Well, they are busy removing the chat :upside_down:
BlaiseEbuth: A lot of precautions are needed to avoid deleting the whole website and the database with it.
derjack: lets leave it on friday evening
Westicles: better run the backup script
Westicles: https://chadok.info/codingame/
derjack: sometimes you find bugs so bad you start questioning reality
Pinguin6454: :thumsup: :thumbsup:
struct: stop spamming
wianpic: here is so smart people, it is so unexpected
tevaaa: Hey do someone know hot the general ranking of clash works ?
tevaaa: like is speed more important tham having 100%
Razovsky: no
5DN1L: tevaaa different modes rank differently
Aldoggen: it depends on what mode you're playing, but accuracy is generally the most important stat
5DN1L: for fastest and reverse: pass % > time
Razovsky: for speed CoC, the evaluation is on score and time, but if u do 0% faster, ull be better than longer 0% but below slower 1%
5DN1L: for shortest: pass % > number of chars > time
5DN1L: wanna say something, Pinguin6454 ?
JASSIEL: hello world
Pinguin6454: nah i'm just quiet
Pinguin6454: and i understand 0% of the conversation on top
JASSIEL: i'm a just novice who can help me ???
5DN1L: so what are you going to do on this website? Pinguin6454
5DN1L: JASSIEL help you with what
Pinguin6454: 5DN1L i am lerning
Darleanow: Hey 5DN1L :))
5DN1L: Hi Darleanow
Darleanow: how are u fam ?
5DN1L: good thanks, and you?
Darleanow: i'm good too
5DN1L: Pinguin6454 Are you trying out any puzzle right now?
Darleanow: my brain feels lighter :)
5DN1L: good to hear that Darleanow
5DN1L: what do you mean
Darleanow: (i think all i needed was to meet back old friends)
Pinguin6454: jes im trying a one right now
5DN1L: that's cool
Pinguin6454: naah how i said i am TRYING
Darleanow: xDDD
Darleanow: which one is it pinguin?
Pinguin6454: The Descent i think
5DN1L: trying is better than copying answers without understanding it
Darleanow: i've started from nothing too
Pinguin6454: i am at the one with the space ship trying to land and destroying some thinks
Darleanow: okay, remember u need to get the biggest value from the input you are given :)
Darleanow: in the order (so it starts from mountain_0)
Darleanow: the hardest there is to get the logic when u start
Darleanow: coding isn't this hard for some puzzle, the struggle is the logic
Darleanow: you can even write it down on a paper
Darleanow: (i'm doing this a lot and it helps)
Pinguin6454: jea i have a paper beside me and i use it but i zhink i am to stupid xDDD
Darleanow: don't say this !
Pinguin6454: ok i am in a internship and have to use C# xD
5DN1L: so you have previous programming experience right?
5DN1L: Codingame is not your first coding experience
5DN1L: oh
5DN1L: if you have never learned any programming before, you may find it difficult to solve the puzzles here
5DN1L: this website assumes that you've learned some basics already
Pinguin6454: jea i am here to lern this but my "teacher" does only know these methode
5DN1L: you can't learn basics here, this is not a tutorial website
5DN1L: maybe you can, but it's difficult
5DN1L: you need more effort to research things on your own
Darleanow: i've learned there 5DN1L
Darleanow: don't say it's hard, because it's just a pain in the ass
Darleanow: i'd recommend you to play clashes
5DN1L: you need to google a lot to know the syntax
Darleanow: use google while clashing
Darleanow: indeed, for whatever you need
Pinguin6454: jea this is what i thougt but what can i do exept for googl and tutorials
Darleanow: sometimes i'm doing stupid google query's for basic things i've forgotten
5DN1L: some coding websites are specialised in teaching syntax
Aldoggen: I do that constantly
Darleanow: https://www.codingame.com/multiplayer/clashofcode
Darleanow: spam this
Darleanow: believe me
Pinguin6454: i would rather work with java
Darleanow: it's from there that i've learned the msot
Darleanow: and google
Aldoggen: if you don't have the basics, 15 minutes is not a lot
Darleanow: he can use google
Darleanow: ofc he won't finish the 20-30 first ones
Darleanow: or maybe he will
Darleanow: but he will leanr
Darleanow: anything
Aldoggen: well I guess it's a start
5DN1L: yeah, it depends on whether Pinguin6454 likes that approach of learning
Darleanow: also he can watch solution from the ones who did it
Darleanow: that's just my opinion afterall
Aldoggen: Pinguin6454 java and C# are pretty similar, so it doesn't matter too much which one you choose
Aldoggen: watch solution is a good way to learn indeed
Aldoggen: as long as it's used in the right way
Aldoggen: don't try to memorize the solutions, only memorize the language
Darleanow: well said !
j4at: c# > java
j4at: :)
Pinguin6454: jea i try thanks for the tips
Aldoggen: I don't like how C# was originally windows-only
StevenV: oh
Aldoggen: yesterday I saw a new multi in the makings that would be added: rock paper scissors. the guy did it as a joke, but the community response was overwhelmingly positive. anyone knows what happened to that multi
struct: I don't think it will become a multi
darkhorse64: and I hope it will stay as a WIP
StevenV: too many legend
StevenV: for greencircle
Aldoggen: was talking about rock paper scissors :p
StevenV: np, I will soon get to legend :D
Pinguin6454: letz play rock paper scissord
Arrrthur: scissors
derjack: hmm https://github.com/dennylslee/rock-paper-scissors-LSTM/blob/master/README.md
eulerscheZahl: struct 03:08ᴾᴹ I don't think it will become a multi darkhorse64 03:09ᴾᴹ and I hope it will stay as a WIP
eulerscheZahl: you must be talking abo troll vs castle
struct: rock paper scissor
eulerscheZahl: i know :P
j4at: rock paper scissor, Finally a game that I can do good at :)
struct: less random than green circle :)
struct: I'm joking, I think the top bots prove that green circle is not that random
j4at: It should really get accepted
derjack: right after tvc
struct: yeah the contribution probably had a lot of time invested on it
struct: and it would be a quality multi
Astrobytes: Add fog. You never know what your opponent drew until the end of the game when the scores are revealed.
Aldoggen: then I'd just choose random moves
Astrobytes: indeed
Aldoggen: wouldn't be very interesting
struct: There is actual strategy
Aldoggen: I'm assuming you're talking about the non-blind version?
Astrobytes: I know I know, it was a joke
struct: ah the fog one
Astrobytes: I was responding to struct :P
struct: if you dont know the score sure
struct: its just random
Aldoggen: if you do know the score, you might as well know what the opponent played
j4at: NN for rock paper scissors LMAO
Astrobytes: isn't the strategy something to do with the frequency of whatever move your opponent makes?
Aldoggen: j4at derjack posted this https://github.com/dennylslee/rock-paper-scissors-LSTM/blob/master/README.md
Astrobytes: I mean, it works with humans
Aldoggen: Astrobytes not only the frequency
Aldoggen: also what moves come after what
Astrobytes: yeah, paper after rock so play scissors etc
Aldoggen: well yeah maybe it all comes down to frequencies
Astrobytes: it's behavioural too
Astrobytes: Human behaviour that is
Astrobytes: Can't replicate that so well with a program
Aldoggen: I guess what it comes down to is: "given our previous moves, what is the chance opponent will play this?"
Astrobytes: More or less I suppose
Aldoggen: ideally, in an infinitely long rps game you'd write a neural network that tries to capture the behaviour of your opponent
Astrobytes: Bunch of different opponents and shedloads of games I'd say
Astrobytes: opponent 1 plays favouring one move in particular, 2 plays random, 3 tries to counter etc etc
Astrobytes: thereafter, self-train until sentient enough that it gives up on that silly game
Astrobytes: :P
Aldoggen: 5DN1L, I did the onboarding puzzle with some kind of NN
5DN1L: that's really quick :open_mouth:
Aldoggen: I think I did at least
5DN1L: does it pass the test case all the time?
Aldoggen: most of the time it passes
Aldoggen: it's because I initialize it and let it learn during the puzzle
Aldoggen: not a very standard approach, cut since this is such a simple problem, I figured it should be possible
5DN1L: during the puzzle :thinking: there are so few turns
Aldoggen: I had to make the learning rate decay in the right way
Aldoggen: and I wen from linear activation function to bounded linear
5DN1L: Forum post: You can check out my Onboarding solution 458 in C++ which uses a NN to do the min over the two distances, although the code doesn’t include the learning part of the NN.
5DN1L: ^ That approach is different from yours
5DN1L: oops 458 is the number of views
Astrobytes: that Agades one?
5DN1L: yes
Aldoggen: is there a way in which I can share a link to my code?
Astrobytes: Yeah, hardcoded the weights iirc, there are a few others too but I'm not sure what they did
5DN1L: is it published on CG? Aldoggen
Aldoggen: I clicked the button at least
Aldoggen: I really wonder if I did it right lol
Aldoggen: well, it works, so it's right in some way
derjack: NNs are forgiving in some ways
Aldoggen: the onboarding puzzle is forgiving too
5DN1L: Hmmm I can't find your code
5DN1L: but you should be able to get the link to your solution and share here
Astrobytes: or pastebin it
5DN1L: https://www.codingame.com/training/easy/onboarding/solution
5DN1L: go to this link then click your solution
5DN1L: you should get the link
5DN1L: should be able to*
derjack: i followed him and see the code
Aldoggen: aah, maybe that's it
Aldoggen: when I click on my solution, I don't have a way to share it though
5DN1L: you just copy the link from the url bar
derjack: https://www.codingame.com/training/easy/onboarding/solution?id=25373384
5DN1L: yes that
Aldoggen: I was looking for something on the website itself
Aldoggen: didn't realize the url changed
derjack: SLP eh
derjack: single layer perceptron eh
Aldoggen: it doesn't need more than that
Aldoggen: I got all the terminology straight from wikipedia
derjack: and i dont know what the code does oO
Aldoggen: I can walk you through it lol
Aldoggen: there's a NN class, which is basically a container and wrapper for the nodes
Aldoggen: the nodes store what nodes lead to them, together with the weights
derjack: whats the point of sources an d hashmap
Aldoggen: so a node that's not an input node can get its value via that hashmap
Aldoggen: the implementation is a bit suboptimal, since all values are recalculated all the time
Aldoggen: but since there's only one output node, it doesn't matter
Aldoggen: so NN gets the value of the output node, and returns if it's bigger than 0.
Aldoggen: and that's how we decide what enemy to shoot
5DN1L: wow this contribution https://www.codingame.com/contribute/view/235798e04ab0d85662e83a8333f5272f9bcbf
5DN1L: Not sure if the characters work in every language supported here though
darkhorse64: I remember Westicles found a way for C++. Yeah, very fine puzzle
5DN1L: Last puzzle which had similar character-issue was this: https://www.codingame.com/forum/t/community-puzzle-frame-the-picture/194538
Astrobytes: Monkey Island reference in username, deserves an upvote :P
Astrobytes: (coloring book contrib I mean)
Razerk: Hi there ! Is about to be lucky or not to complete the Mad Pod Racing (collision step) ? I put a slow before the checkpoint but sometimes the other car just pushes me away and then win
Aldoggen: Razerk sometimes it's luck, sometimes you can do something about it. it's generally a pretty hard problem
Aldoggen: see if you can come up with something :)
Razerk: It's bronze league btw..
Aldoggen: I got to gold by mostly ignoring the enemy and just being faster. that's a strategy too I guess
Aldoggen: though I don't think I can get much higher without doing something about the enemy
Razerk: But the MOSt annoying thing here is this following one : I need to wait so much time to face the "BOSS"
Aldoggen: you click "play my code" and there's a wait time before the video plays?
Aldoggen: that's because the server needs to calculate how the battle goes
Razerk: Nah the video tells me to go into the area mode
Aldoggen: okay, what exactly is going slow?
Razerk: i do have a rank against others players
Razerk: and I start at about 40.000 and i have to go to rank 1
Razerk: A race is about 30 secs and i have to win like 15/20 races
Aldoggen: the idea is that if you're not better than the other players, you're probably not better than the boss
Razerk: Yeah but it's so random
Razerk: If i find a code which works
Razerk: i'll go face the boss quickly?
Astrobytes: if your bot is good enough, it will take less time to rise in ranking because it will beat the others
Aldoggen: it's a bit random yeah, but there are lots of things you can try that will improve you
Razerk: yeh make sens but .. random there
Aldoggen: if you're better, it's mostly not random
Razerk: Well I'll try to think otherwise
Astrobytes: If your bot is good enough, the randomness will go away
Aldoggen: that's a better way of putting it lol
Astrobytes: yes, what Aldoggen said :D
Astrobytes: lol, nah, 6 and half a dozen I'd say
Aldoggen: the randomness is a symptom of the fact that you're as good as the people around your rank
5DN1L: better than consistently lose :upside_down:
5DN1L: ^ a split face
Astrobytes: yeah, if it sits at the bottom and loses score you know It Is Very Bad
Razerk: I should work on the slow by example?
5DN1L: MatteoS there is no fork, and there is no spoon
Aldoggen: only knives, the others went too soon
Astrobytes: can't just come in here dropping fock bombs, sort it out :P
Astrobytes: :rofl:
5DN1L: lol
Astrobytes: afk a bit, cya later if the chat is still here
5DN1L: when one has finished episode 1, one will probably not expect episode 2 will grow into entirely something else
5DN1L: https://www.codingame.com/training/medium/there-is-no-spoon-episode-1
5DN1L: https://www.codingame.com/training/hard/there-is-no-spoon-episode-2
derjack: :upside_down:
Kururugi: How do we add the honors certification for programming languages on cg
5DN1L: by taking their tests
5DN1L: CG has finally fixed the "better than 99% of programmers" description
5DN1L: they fixed it 2 weeks ago
darkhorse64: Still not a 10x dev but at least a 100% one
5DN1L: when you view the profile in incognito mode it doesn't show %
5DN1L: or if you view others' profiles
eulerscheZahl: i'm not better than 99%? that's sad :(
5DN1L: time to kick...
5DN1L: do you want to be kicked, MatteoS?
eulerscheZahl: one more and i'll call it a flock of spam messages
MatteoS: i am kick to french server
5DN1L: then please observe the code of conduct
5DN1L: don't spam
KiwiTae: o/
Westicles: This coloring book thing looks cool but I don't understand what to do
spritecan50: http://chat.codingame.com/pastebin/0a392aa6-8ca0-41d7-be77-b0f8e5da0917
struct: floodfill cells that start at that location and are equal
Westicles: oh ok
Westicles: wcin.imbue(locale(""));
wcout.imbue(locale(""));
BlaiseEbuth: dabedi dabeda
MSmits: :blue_heart:
Lynch[0]: /me
jacek: j4at do you use tensorflow and whatnot?
j4at: pytorch
j4at: jacek
struct: when will we see a NN on a multi j4at?
j4at: when i feel like it :p
Aldoggen: when will you feel like it? ;) (sorry)
j4at: Maybe this week
j4at: mad pood racing
struct: breakthrough sim takes like 5 minutes to write
struct: and NN dominate there
jacek: j4at and you simulate in python?
j4at: Well struct sent me a simulation in go
jacek: you can tell who uses NN there
j4at: so I will use that
jacek: so how do you send stuff between python and go
jacek: or other language
j4at: depends if i use brutaltester i use sockets . If not I use stdin/stdout
struct: stop spamming emotes MatteoS
struct: Next time it will be a ban
5DN1L: he can't resist it really
5DN1L: he has been warned :shrug:
jacek: struct when will we see your bt nn bot
struct: When I manage to make a NN
struct: I dont really understand self play training
struct: or w/e its called
eulerscheZahl: 5DN1L edited my forum post from 6 years ago :shocked:
5DN1L: only because somebody replied to it recently :)
MSmits: struct I think you just have your NN's play games against eachother and use the gamestates encountered in the game, as targets to train
MSmits: the labels are the values from the search
eulerscheZahl: i followed the title convention used at that time
eulerscheZahl: about the URL: right, should have added it
MSmits: because the values are gotten from many lookups and averaged, they tend to be better than a single lookup
MSmits: lookup being a nn.forward
MSmits: so you train your nn to output the value it would output after searching a tree
5DN1L: eulerscheZahl I have no idea about previous convention
MSmits: please correct me jacek
eulerscheZahl: don't worry, let's do it the way the community bot does now
eulerscheZahl: all good
struct: so if gamestate has value of lets say 0.7
struct: the NN forward should match it?
jacek: msmits eeyup
eulerscheZahl: was just surprised to see an edit in my notifications
MSmits: that would be the label yes struct
struct: but how would I give a value to a gamestate?
5DN1L: eulerscheZahl :ok_hand_tone1:
j4at: tensorflow keras is the best library to use according to contests winners stats. But Pytorch is better for research because lower level, and easier to implement more advanced algorithms. But for CG tf keras is probably better. jacek
MSmits: you run a mcts with EPT and do a forward from your NN every time
MSmits: like you would do with a normal mcts with EPT, except instead of eval it's a NN forward
jacek: https://www.chessprogramming.org/images/8/88/MeepStraps.jpg
MSmits: or think of it as replacing random rollout with a nn forward
jacek: V(position at root) -> V(leaf)
MSmits: you backpropagate the result just as you would in any mcts
MSmits: the reason this works is because you know the value of endgames
struct: But wouldnt the value of the gamestate change?
MSmits: yes
MSmits: but not near endgames
MSmits: so your nn learns endgames first
struct: I see I go backwards
MSmits: and then progressively becomes better at earlier games
jacek: at first i was using 4-ply minimax search as targets for bt nn, before switch to mcts thingy
MSmits: yes that works too, or one of those gargantuan meta mcts databases of mine
struct: So for example if the game ends in 6 plys as win
struct: the eval shouldnt be 1 should it?
MSmits: if it's a guaranteed win that would be fine
jacek: yes. (if you used tanh)
MSmits: if it's not guaranteed and it still outputs 1, it will eventually learn not to do so
putibuzu: you can also use the game result as target, i.e. label all states with +1,-1,0. this is how alphazero does it
MSmits: you'd be assuming your NN already plays perfectly
MSmits: but i guess it can converge
putibuzu: then with many learning games the NN will learn the avg of a position (given proper sampling)
MSmits: jacek did you ever try comparing this with your way?
MSmits: I think the problem may be that azero also has policy. It may not work without policy
jacek: using endgame results it was worse, but noy by far
MSmits: ah ok
putibuzu: true, the policy helps a lot ultimately
Aldoggen: I guess more immediate feedback would lead to better results, but I don't know anythin about this
MSmits: well it's always the problem with these games, knowing the end result doesnt tell you when the mistake was made
jacek: the target thingy seems counterintuitive. you converge at first into random NN predictions
jacek: but overtime the real values from the game dominate
Aldoggen: lol imagine losing a chess game and your mentor tells you "somewhere in this game you made a mistake. good luck next time"
MSmits: heh yes
putibuzu: here they compared the methods: https://medium.com/oracledevs/lessons-from-alphazero-part-4-improving-the-training-target-6efba2e71628 they concluded that starting out with the game result and then transition to the avg value the longer the training goes learns best
Aldoggen: I guess you don't get that stage where you're converging into random NN predictions, as jacek said
MSmits: jacek I can see a potential for more hyperparameters for you
struct: I need policy?
MSmits: stuct no
struct: good
MSmits: dont make it more difficult than you need to, value works fine
struct: I have no idea how I could code a policy for BT
MSmits: you follow azero methodology
MSmits: marchete shared
jacek: there are about 170 possible moves in bt :?
MSmits: but i wouldnt do it if it is your first or even one of your first 10 NN's
MSmits: breakthroug
struct: breakthrough
MSmits: +h
struct: only 170 jacek?
MSmits: i was faster because i left off the h
Aldoggen: game can last 209 moves is what I read
MSmits: if you suck
struct: thats different
Aldoggen: yeah, but I think there's a link between the numbers
struct: ok 168 moves
struct: max
struct: but can be changed to -24
struct: so 144
isimkullanmiyorum: hi , everyone from türkiye ,ecole 42
MSmits: how so many?
MSmits: you have like 16 pawns
jacek: -24?
MSmits: *3
MSmits: or am i missing something
jacek: MSmits all possible moves across all games
struct: you dont need to have moves on 7th row
MSmits: ohh ok
struct: if you are on 7th row and can move you won
struct: so 24*6
MSmits: makes sense
MSmits: when people say how many moves, i am thinking about the maximum branching factor
MSmits: which is a totally different think
MSmits: thing
struct: max moves should be 48
jacek: " (With a player point-of-view representation, there are a total of 154 possible moves, according to start square and destination square plus a no-move position if the game is over.)"
MSmits: yeah
struct: not sure if its possible
jacek: https://www.researchgate.net/publication/321991759_Machine_Learning_in_the_Game_of_Breakthrough
struct: let me do the math again
jacek: im not sure what they mean with no-move
struct: maybe the 24 is a number I have for other thing
Aldoggen: a move that signifies the game is over?
MSmits: the edges can only do 2 moves
struct: 22
MSmits: so it's 22 * 6
struct: yeah
struct: 22*7 = 154 so it matches jacek number
struct: useless to have imo
MSmits: it's stupid to include the last row, like you said
MSmits: dont make your nn more complicated than it needs to be
Aldoggen: wait no, it only takes 6 moves to go from back rank to 7th
Aldoggen: and if you're on 7th, any move is good
MSmits: thats what we are saying
Aldoggen: so you could get away with 5*22
MSmits: no, i dont think so
struct: nope
MSmits: 1,2,3,4,5,6 all need moves, 7 does not
struct: you can make moves from 6th row and still lose
Aldoggen: aah, I misunderstood
Aldoggen: I though you meant you didn't want to use your own back rank for some reason
struct: ah no
MSmits: i guess these guys from the paper want to teach their nn that if it moves from rank 7 it should output 1
Aldoggen: that's unnecessary no?
MSmits: it is
Aldoggen: just wrap something around nn
jacek: we will never know, the paper is paid :(
MSmits: but i guess if you want a sort of general board game NN and you want to use as little of the rules as possible, you would include rank 7
MSmits: Aldoggen you should read up on muzero
MSmits: it doesn't even learn the game rules
MSmits: it has an internal simulation that doesnt match the game
MSmits: you just give it the allowed actions and the results of its moves and it learns some kind of internal model of the game
MSmits: but this model can include all sorts of illegal actions in intermediate steps as long as it doesnt actually play an illegal action
jacek: good bot without game rules? thats impossible
MSmits: it's not the same as your green circle bot though, muzero has a search tree of some sort
MSmits: a search tree without a correct sim
jacek: its model-based, though model is learned
MSmits: yeah, but it's not a 100% correct model, because the goal is not for it to be correct, but for it to lead to winning the game
jacek: in model-free you can learn only 'instinct'. in model-full you can actually plan
j4at: I will give breakthrough a try. recurse top 1 like always! What type of magic is he using :neutral_face:
eulerscheZahl: neural network
MSmits: he's not top 1 everywhere
Aldoggen: is planning necessary? if your instinct is good enough, you wouldn't need planning
eulerscheZahl: he's not first at coders of the realm 1v1 :)
MSmits: a 100% perfect nn is impossible, but with a search tree it can get much better
jacek: nor in :notebook: :soccer:
MSmits: that's what planning does
jacek: you can have crappy model but the search will mitigate the crappiness
struct: for csb its easy
struct: avx sim
struct: create NN
struct: rank 1
MSmits: think of muzero like playing a soccer match. When you play soccer as a human you sort of have a model of the field and the movements of the ball, but it's not 100% correct even for the best players
MSmits: muzero accepts this fact and makes the best of its internal model
MSmits: azero cant do this
jacek: j4at i was thinking to put the gpu to use
MSmits: you should really use tensorflow then...
jacek: but tensorflow prediction is so slow
MSmits: it's only slow if you do a single 1
MSmits: if you do a bunch at the same time it parallelizes nicely i think
jacek: i would need to use very large batch
Aldoggen: wow it's really made for parallellization then
jacek: i mean i have simulation in c++, id need to somehow send stuff to python to calcuate and get the results back
MSmits: yeah it is. you are not supposed to train NN's on a single thread
MSmits: jacek, can't you gather a ton of data all at once and then train it?
jacek: im talking about forward only for neuroevolution. i have many tiny NNs
Aldoggen: I'm doing that in onboarding. training on a single thread :p
MSmits: mmh ok
MSmits: Aldoggen yeah it works fine for small projects
MSmits: sounds like a xor NN
struct: there is one NN on onboarding
Aldoggen: now there's more than one
Aldoggen: it's just max, not xor
MSmits: yeah but i mean just as simple
MSmits: make sure you use 4 hidden layers on it or something :P
Aldoggen: it's way simpler than that
Aldoggen: 2 inputs, one output
MSmits: no hidden?
j4at: lmao
MSmits: sad :(
MSmits: i like hidden
Aldoggen: it works most of the time, but it has a really small sample size to train on so
j4at: with no hidden layers it can't even calculate xor
MSmits: no this is not xor
MSmits: he is doing max
j4at: he is trying to predict the max of 2 numbers ?
MSmits: yes
struct: pretty much
MSmits: well no
MSmits: he's predicting which is largest
j4at: same shit
jacek: oO
struct: I think this NN can be trained by hand
j4at: you can't do anything with no hidden layers
Aldoggen: I set the weights by hand first
MSmits: j4at you can in this case
MSmits: he can just have all his weights set to 1
Aldoggen: j4at this was just a test. i also knew what kind of NN was sufficient and used that
j4at: oh, im dumb i though he meant return the max value
Aldoggen: one to 1 and one to -1 does the trick perfectly
j4at: not the index
Aldoggen: yeah, it just returns something that gets mapped to a boolean
MSmits: i actually do this training by hand in one of my classes struct
YBen1998: same i have to do drills in class lol
YBen1998: firs ttime doing this
MSmits: i use the tensorflow playground by google and turn off everything except the x1, x2 input and then they have to set the weights manually
MSmits: so that they get classified correctly
struct: o.o
MSmits: it's really easy
Aldoggen: okay I wanna do that now
struct: next class add 8 layers
jacek: https://playground.tensorflow.org/ ?
j4at: Well, here they teach teach to train alphago by hand and get better accruacy
j4at: teach us*
MSmits: yes jacek
MSmits: j4at sounds fun
j4at: :upside_down:
Rbinnetje: hello, I'm totally new to coding. Are there modes on this website where I can learn from scratch?
MSmits: https://imgur.com/a/9Hr0y3f
MSmits: this is what it looks like after turning everything off
MSmits: you can set the 2 weights
5DN1L: Rbinnetje other than self-learning mode, not really
MSmits: here i solved it: https://imgur.com/a/qA3Xn8g
jacek: MSmits now do the spiral one
MSmits: Heh heh, not by hand jacek :)
MSmits: you can do it with 1 hidden layer and all input types on. Or just x1 and x2 and maybe 2 hidden layers and a lot of patience
struct: oh I can change the values by hand
MSmits: yeah
jacek: https://i.imgur.com/FOrI4tm.png
MSmits: yep that's how it's done
MSmits: the nice thing about this site is that you can cut it into pieces, turn off stuff so that your students only see the parts you want
MSmits: I put this in an i-frame
MSmits: in my learning environment
struct: you did this by hand jacek?
MSmits: no lol
struct: impressive :p
struct: im joking ofc
MSmits: :)
Aldoggen: I was trying to do the upper right one with only x1 and x2 smh
Aldoggen: then I see there's an input that pretty much looks liket
MSmits: yeah
MSmits: this kind of also teaches you it can be good to preprocess the input
MSmits: make it easier on the NN
MSmits: it's like that for games on CG as well. If you use domain knowledge in addition to training an NN, it will be better
MSmits: though you have to be careful, as your own preconceived notions of a game can handicap a NN as well
MSmits: an example is fixing your NN for CSB (mad pod racing) to have a blocker and a runner. Sure that is the meta and probably correct, but it's not necessarily always the best way.
struct: i wonder if they pass timeout as input or not
struct: the 100 rounds needed to pass a checkpoint
Aldoggen: I saw some videos on the home page of csb. it looked nothing like what the lower leagues do
struct: legend league is different
Aldoggen: most of the time they stood there, and suddenly one of them went to a checkpoint
struct: it has 2 pods and max thrust is 200
struct: and the replays you saw are from old bots
struct: if you check top players replays its even better
Aldoggen: ah, that might explain something then
Aldoggen: but it looked as if bots had to wait until a checkpoint was assigned to them or something
MSmits: nah
Aldoggen: or it's just quirkyness of old bots
MSmits: typical game: https://www.codingame.com/share-replay/643216200
MSmits: (7th vs 8th)
struct: oh recurse is timing out
struct: some games
MSmits: how many?
struct: not that many
struct: look this replay Aldoggen
struct: https://www.codingame.com/replay/491776441
struct: rank 1 vs rank 2
struct: the move between frame 30 and 40 is nice
Aldoggen: first replay looks more like wrestling
struct: on this replay you can see that recurse runner also act as a blocker
MSmits: the game is like wrestling
struct: which i dont think its very common for other bots
MSmits: no it's not
MSmits: so that was exactly my point. If you limit your bot like a runner can only run, then that may work, but it may also make it weaker
jacek: having preprocess inputs has big impact on nn performance. see nnue how it made stockfish much stronger
MSmits: it's hard to say if recurse's bot is best because he allows this or not
Aldoggen: understood MSmits :)
Aldoggen: and struct and jacek. I guess I'm the student of today's chat :)
jacek: last lectures on the chat
MSmits: there's always quiet students :)
MSmits: lurking students
Aldoggen: the ones that never turn on their webcam
MSmits: those are the worst
Aldoggen: are they paying attention? do they understand what's going on?
jacek: back in my days, there werent any webcams or remote lessons
Aldoggen: are they even THERE?
jacek: playing cs or minecraft
Aldoggen: imagine saying: I played cs today in a cs lecture
MSmits: I had students literally waking up in my google meet
MSmits: they got up out of bed with their phone in their hand
MSmits: livestreaming their morning ritual almost
MSmits: thankfully no more of that
jacek: yay free onlyfans
Aldoggen: what happens at home, stays at home
jacek: oO
BlaiseEbuth: (╯°□°)╯︵ oO
BlaiseEbuth: ╰(⇀︿⇀)つ-]═───xO
Aldoggen: is that a stick in my eye?
BlaiseEbuth: Was a sword. :/
BlaiseEbuth: You're a pirate now.
BlaiseEbuth: :o
Aldoggen: but R you serious? was that really necessRy?
SatelliteMaster1337: check mate buddy
SatelliteMaster1337: Q version 69
SatelliteMaster1337: put that in your pipe and smoke it chief
5DN1L: https://www.codingame.com/training/medium/cooperative-mate-with-rook
5DN1L: https://www.codingame.com/training/hard/adversarial-mate-with-rook
redhand: Hi, is there any way to write/read an other file than the script in Mad Pod Racing? ty
Aldoggen: do you mean you want to execute a file that's not in the ide?
Aldoggen: you could try this https://www.codingame.com/forum/t/codingame-sync-beta/614
Aldoggen: I don't know in what state it is
boumagik: HI all Is there a way to make the green / red arrow in the leaderboard persistent ?
boumagik: it disapears after a few seconds
5DN1L: take a screenshot
5DN1L: make a consistently winning/losing bot
Aldoggen: sad that this isn't in CG
emh: did you guys know Dall-E mini can generate CSB art for game UI? check:
emh: https://emh.lart.no/publish/csb/dallemini_csb.png
emh: safe for work
Astrobytes: for once :P
Astrobytes: also, nice
j4at: cool
emh: thank you :)
jacek: :neutral_face:
j4at: jacek how many actions are you using for breakthrough
jacek: none
jacek: i have only value
j4at: huh ?
j4at: so action is part of the input ?
j4at: or do you valeu state
jacek: value state
j4at: lame :p
jacek: its eval. like you'd use in minimax or mcts-ept
j4at: yeah I don't want to mix algorithms with nns
jacek: you cant win in board games with nn only
j4at: you are probably correct but I will try my best
j4at: are you using dqn ?
jacek: its more like alpha-zero, except its value only
DomiKo: to train you are using jacek-max too?
jacek: hmm so bowwowforeach uses NN in UTTT? :thinking: https://bowwowforeach.hatenablog.com/entry/2022/07/05/195417
j4at: ow
jacek: for some games
jacek: best-first minimax (overwriting scores) works better, for others mcts (averaging scores) is better
DomiKo: i see
DomiKo: in my understanding mcts should be easier to train, because of averaging
DomiKo: some stuff will get a little bit bigger value and some a little bit less
JudgeDoom: NECESITO AYUDA, alguien ahi ?
jacek: actually im using combination of both. i have 2 scores in node - minimax and cumulative. and depending on game i use 20% jacekmax and 80% mcts-ept, or other way around
DomiKo: yeah I saw that in marchete code
DomiKo: he leaved a comment for it
jacek: huh
DomiKo: one second
DomiKo: https://github.com/marchete/CGZero/blob/master/src/CGZero.cpp#L1684
5DN1L: JudgeDoom, this is an English-only channel. if you want help, please ask a specific question in English, thanks.
jacek: nice :D
DomiKo: yeah I read the whole thing :D
Astrobytes: JACEK_COEFF :D
jacek: const float JACEK_COEFF = 0.0f;
jacek: no wonder youre losing
5DN1L: not specific enough
DomiKo: I'm not using JACEK_COEFF at all :(
**BlaiseEbuth give a help me to JudgeDoom
Rikus: Do you think that AZ will most likely beat DQN+MCTS in most CG games? (same CG constraints for both)
DomiKo: yes it will
DomiKo: not only in CG games, but in most games
jacek: whats DQN+MCTS ;o
Darleanow: rc95401 ?
DomiKo: first you train DQN, and then use it as eval to MCTS
DomiKo: like they did in CSB
jacek: oh
Rikus: yeap
Rikus: cool, I had double thoughts regarding the difference in the throughput of inferences that DQN vs AZ and maybe it could be _better_ for some games, but unlikely
DomiKo: yeah AZ can learn much much more
Rikus: great, so, I cannot come up with any more excuses for starting this journey besides the challenge itself
DomiKo: it really long journey, but it's so fun
Rikus: thanks for the info and motivation ^_^
MSmits: DomiKo jacek does beat all the azero bots on oware
DomiKo: what about robo?
MSmits: he wasnt azero, maybe he is now i dunno
DomiKo: O.o
DomiKo: so what is robo?
Astrobytes: think it was based around that no?
MSmits: could be
Astrobytes: robozero
DomiKo: wasn't he using policy?
MSmits: i think azero could be better in general but in really simple games it might not be
MSmits: games like oware and othello can be played near perfectly by many types of bots
Rikus: by simple you mean C4/UTT vs CSB/SpringChallenge21?
DomiKo: it could
MSmits: it's just a question of whether they make 0 or 1 or 2 mistakes per game
MSmits: Rikus C4 and UTTT yes
MSmits: CSB/spring challenge 21 no
DomiKo: as I read some papers I think in simple games, when you have near perfect games, still AZ can learn much faster than any type of DQN
MSmits: ahh ok, learn faster sure. But that is irrelevant for simple games
MSmits: the end result is all that matters
DomiKo: it still takes a lot of power to learn such games
MSmits: I guess it depends on the simplicity
MSmits: oware is really really simple though
DomiKo: yeah it is
Rikus: yeap, that's why I've dropped the idea of ZeroEfficient, it learns way faster (and ruleless) than AZ, but I couldn't find a single source that states that it can beat AZ with 'infinite' training
Rikus: *EfficientZero
MSmits: it's hard to test this too. These bots tend to become very deterministic. You'll think you are playing 1000 games but you'll be playing like 3 different ones
struct: just add random like jacek
MSmits: yeah, you have to
DomiKo: I've never heard about EfficientZero
struct: thats usually whats used to describe me
DomiKo: MSmits the problem in comparing is that you can't do it
DomiKo: nobody will give you their implementation, so basically you can't compare anything :(
struct: if cg is up by the time I understand how to make a NN ill share it
DomiKo: good
DomiKo: I'll wait then
Aldoggen: riiight here waiting for you
struct: I'll be back in a few years
DomiKo: because I can't fix my pipeline :(
Darleanow: could someone help me with code optimisation ?
Darleanow: it's for block the spreading fire
DomiKo: what language?
Darleanow: py
DomiKo: ok lets go
Darleanow: u have discord ?
j4at: cg should add pypy3
MSmits: DomiKo i was more talking about trying the NN's on the leaderboards of CG
DomiKo: ok ok
DomiKo: I see
j4at: although numpy is slower in pypy
MSmits: one could be ranked above the other because it always wins vs the other, but it's the same game every time
MSmits: tweak 1 weight and it's the other way around
MSmits: this is why i like jacek's bots, he adds random to his moves
DomiKo: everybody have to
MSmits: they should but they dont
struct: not every1
DomiKo: but something you model give like 0.99 for one move and a little random won't change anything
MSmits: that's true, but in a game like oware, where you both make 100 choices, some may be different
DomiKo: I tried using your endgame stuff
Astrobytes: and nobody wants their top NN booked by Smits .... :D
struct: you are never safe from MSmit s
Astrobytes: was thinking of one in particular...
Aldoggen: there are ways to make Ais trip over themselves https://www.youtube.com/watch?v=u5wtoH0_KuA maybe adding random helps against that too?
MSmits: oh how did it go DomiKo
MSmits: it's not easy to implement
DomiKo: I added it for validation.
MSmits: oh that's cool
MSmits: if you do it locally, you can go way higher with time, 15-20 is possible
DomiKo: not really
MSmits: how so?
DomiKo: because there are a lot of different scores for the same position but with different turn limit
jacek: i tested it. one bot had the endgame and the other didnt. if there were like 6-7 seeds, it was winning more. but more seeds like over 10 led to more draws ;d
MSmits: yes thats why i said 15-20
MSmits: if you dont have the turn limit, you can go to 38 like i did :)
MSmits: it's nearly 100 GB but worth it :)
DomiKo: I tried validating positons with 1,2, 10, 20.. turn limit, and my model can solve around 70% of them
DomiKo: by solving I mean do the perfect move just by looking at the policy
MSmits: oh, that's good isnt it?
MSmits: did you include the turn in your input? That might not be good
DomiKo: I don't know that the problem :joy:
MSmits: robo never did this
MSmits: robo assumes infinite game length
jacek: neither do i
DomiKo: yeah i did
MSmits: if you assume infinite, it's much easier to generate a large endgame book
MSmits: 1 result per gamestate
struct: The secret is to add the turn as input 3 times
MSmits: huh?
DomiKo: or more than 1
struct: im joking MSmits
MSmits: oh, i can never tell struct :P
DomiKo: it's not a joke
DomiKo: it's reality
struct: Apparently im not MSmits
MSmits: see, even you can't tell struct
jacek: is this hexapawnzero reference?
struct: yes jacek
MSmits: After all these years of uttt, i think i just made my bot 5% better!
struct: o.o
Aldoggen: that's 5% better than nothing!
MSmits: made it solve a bit faster and changed my implementation of the free move penalty
struct: 5% is a lot
MSmits: yeah
jacek: 5% better winrate?
MSmits: https://imgur.com/a/wHqf4eG
MSmits: wr vs best bot
MSmits: 1000 games per dot
jacek: or it overfitted against that bot
MSmits: this is not really a parameter that can overfit i think
MSmits: it's about discouraging giving away free moves
MSmits: 0 means no discouragement
struct: so it prevents giving a free move to opponent?
struct: like a penalty if you give
MSmits: yeah, if it's 0 it doesnt
MSmits: right
jacek: i had that when i used simple mcts
MSmits: i had this before, but this one is implemented differently
Aldoggen: and you're certain there's no zugzwang-mechanic in tttu?
MSmits: yeah everyone has that i think, at the top
MSmits: hmm
struct: not me
struct: but im not at the top
jacek: thats why
MSmits: there's no zugzwang i think
Aldoggen: we'll see how it performs I guess
struct: are you sure?
struct: what about zugzwang with moves that wont make you lose?
MSmits: doubt you'll notice, i am below 4 nn's and a bunch of players that are nearly the same strength. 5% isnt enough to over come bad luck i think
jacek: well theres plenty of zugzwang if you forced in mini-board to play move beneficial for opponent
Aldoggen: that's the definition of zugzwang I guess
MSmits: yeah but as it relates to giving away a free move, you basically do the opposite of zugzwang
MSmits: if moving anywhere you want is bad, then you've lost the game
MSmits: so giving away a free move is objectively bad, you only do it when it gives you something really good, like an important board win
MSmits: or you prevent an opponent board win
MSmits: penalizing this, makes the search converge faster
MSmits: oh and i also put in pessimistic optimistic bounds
MSmits: i had something similar, but i put in the real algorithm
MSmits: this is where you dont just keep track of the solved result, but also the minimum expected and maximum expected game result. Kind of like ab-pruning
MSmits: i solve a little bit faster, so the 5% is a combination of that and the free move param
Aldoggen: what do those expected game results tell you?
MSmits: if it is [-1,0] for example, then you can have at best a draw and at worst a loss
MSmits: or if it is [0,1] then it's at worst a draw
MSmits: so it's like a partially solved state
MSmits: if a child has [0,1] then its parent as at most 0
MSmits: has at
Darleanow: someone else to help me with code optimisation ?
MSmits: this way, if you encounter a bunch of draws in your tree, you wont have so solve every state
Cultist: i'm stucked with mad pod racing
Aldoggen: so that helps you to prune some stuff?
MSmits: yeah
MSmits: like ab pruning in a minimax
Cultist: I didn't get what I have to do
Darleanow: just pm me if u do :)
Aldoggen: I'll go read up on it :)
MSmits: https://www.lamsade.dauphine.fr/~cazenave/papers/mcsolver.pdf
Astrobytes: aka "the paper with the most hated pseudocode on CG"
MSmits: no not that one
MSmits: this has the score boundds
Astrobytes: oh gotcha
MSmits: it's not the original mcts solver paper
MSmits: it references it though :)
Astrobytes: yeah I remember this one too
MSmits: tbh i dont really get the pseudo code here either. I used the pictures :0
Aldoggen: is that a paper you've bookmarked? or how did you find it?
jacek: he paid for it
MSmits: i googled it just now
MSmits: i know the title
jacek: Cultist is this the first wood league?
Astrobytes: pseudocode in this one is far better than solver paper
MSmits: yeah
MSmits: no weird recursion
MSmits: also, the original paper doesnt even allow draws
MSmits: this one allows any kind of score
Astrobytes: True.
Aldoggen: it looks like standard latex. I have fond memories of that
struct: Did you ever try monte carlo graph search MSmits?
jacek: tree is a graph, so yes [solved]
MSmits: what do you mean struct
struct: its similar to mcts but it handles transpositions
MSmits: Aldoggen the original mcts solver paper is still good for the idea of having a solver in mcts. Starting straight with the score bounds might be a bit hard
Astrobytes: ^
Astrobytes: its very clearly explained
jacek: with pseudocode
MSmits: lol, skip the damn pseudo code :P
jacek: https://dke.maastrichtuniversity.nl/m.winands/documents/uctloa.pdf
MSmits: yup
struct: this is what im talking about MSmits
struct: https://www.ml.informatik.tu-darmstadt.de/papers/czech2021icaps_mcgs.pdf
MSmits: can you give the general idea?
MSmits: wait, thats machine learning lol
Aldoggen: similar states get merged?
Aldoggen: and I like the papers, they're to the point, but clear
MSmits: oh mcts and transpositions
MSmits: that's a rabbit hole
MSmits: I've done more than one version of that
Aldoggen: is the idea that you're computing a state and going "wait a minute! I've seen that before!", after which you skip it?
MSmits: you can do that in minimax
MSmits: it becomes problematic in mcts
MSmits: because you gather statistics on visits and score
MSmits: you get a new child, that's not new
MSmits: so you have 1 child that has 0 vists and another with 100k
struct: maybe ill test minimax on bt
struct: Im gonna check how many repeated positions I get
struct: I bet its a lot
MSmits: in bt a lot yes
struct: If I take into account mirrored
MSmits: in uttt, pretty rare
MSmits: it's not really about the mirror struct
MSmits: it's about doing moves in different orders
MSmits: first move A then B, or first move B, then A
MSmits: same end result
MSmits: mirror is rare in the same game, as most states are very assymetric
jacek: yeah, my bt improved when i cached positions with evaled children
Aldoggen: if you have n moves for which the order doesn't matter, you can save about n! move evaluations or something
MSmits: yes
struct: o.o
struct: I never really did that
struct: only on green circle I think
jacek: dont you use TT in minimax struct?
Aldoggen: (amount of orders to sort n elements)
struct: never jacek
jacek: not even for move ordering?
MSmits: n! is not necessarily very big if you dont get much depth of course
struct: nope
jacek: oO
MSmits: depth 10 is only 5 of your moves
MSmits: so it's like 5!
struct: I dont really have any minmax bot
MSmits: yes, that is if you do a full search
struct: Only lines of actions is minmax
MSmits: i do this kind of hashing in yavalath
jacek: woah astro 4th
Aldoggen: but hey guys, you'll never believe it:
1 = 0!
MSmits: it doesnt help much at the beginning (branching 61), but it helps a ton near the end
struct: is there any term to describe this?
struct: like playing A B == B A
MSmits: they are transpositions
MSmits: which is why you use a TT
struct: so you just handle this by storing the gamestate in the table?
MSmits: you use a hashtable
Aldoggen: comparing is also hard
MSmits: for yavalath you'd use xorshift(p1) ^xorshift(p2)
GuillaumeMathe: Improved https://www.codingame.com/ide/puzzle/1d-spreadsheet solution with ES2020 nullish coalescing operator :)
MSmits: not necessarily Aldoggen, simple boardgames it's usually comparing 2 or 3 integers only
Aldoggen: ah true :) but I'm used to storing my game state as classes
struct: I see, thanks
MSmits: https://pastebin.com/EYuh6M7J
MSmits: for my yavalath opening book
MSmits: it's not very performant because it's unordered set, but it's simple
MSmits: I have a more performant implementation for the actual TT
MSmits: my TT is lossy, so i overwrite old states sometimes. Unordered set doesnt allow this
MSmits: and i dont want my book to be lossy :)
Westicles: oh my, look at the forum
MSmits: link it
struct: thanks MSmits
MSmits: np
Westicles: https://www.codingame.com/forum/t/this-is-why-i-cant-learn-to-code/19298/14
MSmits: the other implementation isnt secret either, but i dont want to spam it here and didnt feel like digging it up. If you need it let me know
Aldoggen: oh wow Westicles. I'll get some pop corn later. first this paper
struct: sure
MSmits: sigh, these people just don't understand there simply is a bar of entry that CG is not obligated to help you pass
MSmits: you need to do that elsewhere first
struct: yeah I dont think CG goal is to teach you the basics
struct: there are plenty of sites that do that
Aldoggen: there is too much stuff that we even don't remember we know
Aldoggen: like it's just assumed
struct: if I take into account mirrored from the start position at depth 4
struct: 87% of repeated positions
struct: o.o
struct: 232847 repeated 267675 total
MSmits: yep
Aldoggen: for chess that wouldn't fly
MSmits: no, chess is different
MSmits: people still use TT though, it's especially important late game
Aldoggen: https://imgur.com/a/j6NuL3t
MSmits: however it is totally possible to halve your simcount if you implement TT struct. It's often not worth it. Not many bots i have use TT
MSmits: and for mcts TT is much weaker than for minimax
struct: yeah I wont use TT for mcts
struct: for minimax and bt I think it should be worth
struct: to use TT
MSmits: whats that last term in the formula Aldoggen
Aldoggen: I'd guess progressive bias?
MSmits: yes struct, TT is almost standard with minimax
Aldoggen: haven't read the paragraph fully
MSmits: could be something like that yeah
MSmits: hey, how much do you know about mcts Aldoggen? Seems you know at least some?
jacek: progressive bias... that brings some memories
Aldoggen: I know some stuff by absorption
Aldoggen: I know MC is basically choosing things at random
MSmits: yeah, but you can make MC smarter than just random
MSmits: by heuristics
Aldoggen: so I had a reasonable guess for what mcts was once I knew what the abbreviations stood for
MSmits: but do you know the phases of mcts and what they do?
Aldoggen: I've just read the overview of it :)
struct: I dont think my mcts has any randomness to it
MSmits: ahh ok. If you want to try it, it's best to do it on a game where random rollouts till end of game works well
MSmits: this is true for UTTT and C4
jacek: then is it really mcts?
struct: dont think so jacek
struct: connect 4
MSmits: connect 4
Aldoggen: mm I might try that actually
MSmits: just take into account C4 has a small leaderboard and UTTT has a very large leaderboard
MSmits: if you want to feel a sense of accomplishment, UTTT is better
MSmits: C4 is full of pro's
Aldoggen: and the highest league is wood 1
MSmits: that too
Aldoggen: and you're nr 1 nice
MSmits: i have an opening book which is what makes me stick out
MSmits: my bot is as good as struct's and darkhorse's
MSmits: without the book
Aldoggen: I sense you're trying to steer me towards uttt. are you afraid I might pass you? ;)
MSmits: no no, please go ahead and do C4 :)
MSmits: I know, important thing is to have fun
struct: connect 4 sim should be easier
_Royale: MSmits: I don't know if someone mentionned it, for MCTS transpositions you can attach the visits to the edges instead of the nodes
MSmits: mcts can be a bit frustrating the first time. You need a frame work that is bug free. Finding bugs in your framework is not easy
Aldoggen: but do you need a sim for mcts?
struct: yes Aldoggen
MSmits: _Royale are edges separate objects then?
struct: Aldoggen I would try to mcts TTT first, the normal version
struct: its easier to denug
MSmits: Aldoggen you'll need a sim for minimax and mcts both, but mcts has a bit more to code around that, not a lot, but a bit
_Royale: MSmits: yes, you transpose the nodes, and each node as its own edges to children
MSmits: ahh ok
_Royale: MSmits: and the visits of a node is the sum of the visits of its edges
MSmits: that solves 1 problem
Aldoggen: oh, do you need a sim to make sure you're doing valid moves?
MSmits: but it comes with a performance penalty right?
struct: Aldoggen your sim should only give legal moves, but is more to check the current state of the game
MSmits: Aldoggen yes, all nodes of the tree correspond to new gamestates
_Royale: MSmits: yes, but I use it on most board games because the performance penalty become negligible with NN cost
MSmits: ahh yes i can see that
MSmits: a lot of fancy stuff becomes doable because performance is no longer an issue
MSmits: like weird ucb formulas
_Royale: it helps to reuse the solved nodes too
MSmits: yeah. The way I do it is i store the index to the first child and the number of children in a TT so two parents can have the same set of children, but this does give me the problem of weird visitcounts
_Royale: yes it's one "good" this with this NN cost, you can spend less time optimizing your simulator :)
MSmits: that too yeah
_Royale: MSmits: for a long time I had transpositions with that visits bug, as you said earlier hard to debug everything
MSmits: well it's not really a bug, it's a choice. You have to accept weird visit counts and maybe a biased search, or have a far greater performance penalty and use the unbiased method you describe
MSmits: for a normal mcts using millions of nodes i dont think having edge objects can work, but i can totally see it for NN's
_Royale: maybe for games with lots of transpositions?
MSmits: yeah, i would have to test it, it might not be as bad as i just said
MSmits: i mean you take the visits and wins off the original nodes, so they become smaller at least
MSmits: you have nodes, leading to edges, leading to nodes again
_Royale: yes
Aldoggen: you'd have to identify edges with each other as well
Darleanow: Hey _Royale , i've pm'd you :)
MSmits: the edges will come in sets
_Royale: edges can contain probabilities too if you have a policy network
jacek: :scream:
MSmits: so whats on the nodes _Royale?
MSmits: solved result i guess
MSmits: but also moves?
jacek: i just use transpositions as nncache
_Royale: moves are in the edges too here
MSmits: that should be very effective also jacek
DomiKo: custom hashmaps jacek?
MSmits: yeah that makes sense _Royale, i just wonder what is left on the nodes
jacek: just unordered_map
_Royale: nodes contain the state, its value and wether its solved or not
MSmits: hmm how do you get the value?
MSmits: if the visits and score are on the edges?
MSmits: you just update it every time the edges get updated?
_Royale: MSmits: you mean the backpropagation? yes it updates the edges and nodes
MSmits: also, i dont always store the state on the node. Sometimes it's just the move. I guess it is mandatory in this case
MSmits: makes sense, thanks for sharing _Royale
Darleanow: anybody had idea to optimize/do something better than bfs algo?
Aldoggen: bread first search mmm
MSmits: I find it hard to even imagine using bfs with that forest fire optim
MSmits: i mean i can imagine spreading the fire that way, but i wouldnt know how to pick squares to block with
Westicles: can you anneal it? haven't read it
MSmits: i suggested SA to Darleanow, so i hope so :P
MSmits: you can have an initial solution and then make small alterations
MSmits: i guess it can work
MSmits: he seems to have an initial solution so...
Westicles: It works for everything if you have the cores
MSmits: what are cores in this contest?
MSmits: context
Westicles: offline cpu
MSmits: ohh ok
MSmits: i thought you were throwing fancy SA lingo at me
_Royale: MSmits: no problem, if I remember correctly martinpapa69 does the same for MCTS transpositions
MSmits: also with NN
MSmits: good to know
Darleanow: i've looked a bti for anneal
_Royale: jacek: I think Robostac does that too? (nncache)
Darleanow: i'm just looking for more suggestions :)
Astrobytes: it's a graph theory problem, the firefighter problem, search it up
MSmits: Darleanow I am going to make some assumptions here, so i might be way off
MSmits: you build up some border around the fire right?
MSmits: it extends just far enough to beat it?
Astrobytes: That's an approach I would try yes
jacek: _Royale its easiest to implement, it just saves NN computations
MSmits: i imagine small alterations to this border
Darleanow: indeed
MSmits: and then simulation to see if its better
Darleanow: i'm computing all possible areas in 5 secs max
Darleanow: and chose the best based on it's score
MSmits: but you might have to do several smaller borders
Astrobytes: yes MSmits
Astrobytes: you might be better off sacrificing a larger area somewhere and saving a few more valuable area
Astrobytes: s
MSmits: yeah
Darleanow: its a randint from 1 to width+height/2
Astrobytes: very topcoder-ish optim this one
MSmits: so you'll have to define a solution in such a way that your SA algorithm can randomly come up with new ones
Darleanow: tried with width+height
jacek: ah well just wait for the solutions to be revealed :v
DomiKo: :upside_down:
MSmits: yeah i dont get that, it's an optim arena and everyone can see the code
MSmits: it's so weird
Astrobytes: no it won't be shared
MSmits: it says that it will
Astrobytes: confirmed by T
Astrobytes: check the date
MSmits: oh ok, good
Westicles: I gotta fix my PC and give it a try
youngG: can somebody recommend me a good laptop
youngG: to program
Astrobytes: one that works and has a keyboard. Possibly a screen too.
youngG: lol
struct: maybe not a chromebook
struct: or w/e its called
DomiKo: strong chromebooks are cool
MSmits: ugh
youngG: definitely not a chromebook
Aldoggen: maybe a touchpad if you're fancy
MSmits: chromebooks are my nemesis
Darleanow: yeah but like i want to get a good top :)
youngG: damn
Westicles: laptops die too easily
MSmits: I teach 1 class that uses chromebooks instead of windows PC's
DomiKo: I'm using chromebook at work ;(
struct: lol DomiKo
Aldoggen: youngG most of the responses here were sarcastic
MSmits: we were working on game design and all i could use for it was flowlabs, which is a poor substitute for everything else
DomiKo: pls no hate
MSmits: this: https://flowlab.io/
MSmits: it's at best... ok
MSmits: yes
MSmits: Gdevelop is much better
MSmits: https://gdevelop.io/
MSmits: but comes with install... so no chromebook
Sheeesh---: the website design is soo cool!
MSmits: which one?
Sheeesh---: gdevelop
MSmits: ah yes i think so too
MSmits: I might be using it next year with my other clases
MSmits: when i can use my own classroom that has windows PCs
MSmits: whats hype?
Aldoggen: yay happy because something good is going to happen
MSmits: oh ok yes
GuillaumeMathe: improved again best solution to https://www.codingame.com/ide/puzzle/1d-spreadsheet with ES2021 :)
GuillaumeMathe: http://chat.codingame.com/pastebin/250317a5-3b22-4fe0-ace8-64a537734e93
MSmits: paste bin links dont work, can use www.pastebin.com
MSmits: just dont share whole solutions
GuillaumeMathe: better ? https://pastebin.com/Jnza3wdR
MSmits: works
GuillaumeMathe: wanted to build a good example for JS beginners and people who want to learn newer Ecmascript
MSmits: oh
GuillaumeMathe: (this improves on the best current voted solution)
MSmits: I see
GuillaumeMathe: This puzzle is a very cool example on where to use that new "??=" operator ;)
MSmits: tbh i dont really know the puzzle
GuillaumeMathe: it's just about memoization
MSmits: oh, i have 100%
MSmits: i must have done it
MSmits: ohhh that one!!
GuillaumeMathe: JS can memoize in a function by closure, this is an example of how to do it in one instruction
jacek: was it really memoization?
jacek: if you dont remember it
MSmits: mine didnt seem like memoization anyway
GuillaumeMathe: well there's not much else to it ;)
MSmits: I see a bunch of loopy
MSmits: 96 lines of loopy ifs
GuillaumeMathe: thats a bit too much aint it ;)
MSmits: it worked
GuillaumeMathe: I like elegant functional code
MSmits: I like code that works just well enough so that I can use it and then never look at it again :P
MSmits: not always an option unfortunately
GuillaumeMathe: that's self inflicting pain in a real work environment !
GuillaumeMathe: trust me on that lol
Aldoggen: https://xkcd.com/1421/ MSmits
MSmits: pfft, real work, who does that
GuillaumeMathe: ah alright sorry mate
MSmits: funny Aldoggen :)
MSmits: GuillaumeMathe i am just kidding, i do have some style in my code, but i dont worry about these 1-time puzzles
Aldoggen: there's thousands of those comics
MSmits: yeah i have seen them before
MSmits: i resubmitted my utt btw, hope it will get at least 8 like before
MSmits: though it should be better than it was even if it doesnt, might need other people to submit, pushing it further
GuillaumeMathe: As I said I'm trying to bring better ES/JS solutions if that's relevant, to help people who are here to learn :)
MSmits: thats nice GuillaumeMathe
MSmits: some use JS yeag
MSmits: yeah
MSmits: I started here with C#, then switched to c++ performance and later to python for puzzles
MSmits: i like python over C# because less typing
MSmits: (typing as in hitting the keyboard)
Aldoggen: syntactic sugar and convenience functions and methods ftw
GuillaumeMathe: yeah that's what I like in more recent ES versions
Westicles: there are only 2 non-WIP puzzles that look worth approving
MSmits: I'm sorry you had to look at all of them to determine this Westicles
Aldoggen: good thing other people think alike, otherwise we'd be swamped with garbage
Aldoggen: I think I've approved one or two puzzles in 16 days
Westicles: I didn't look at the clashes, those are all probably fine
MSmits: thats one hell of an assumption
Aldoggen: do you remember lisa has ideas?
Aldoggen: artificial emotional intelligence?
Aldoggen: wait was that a clash?
Westicles: that wasn't the best
MSmits: Is that the one you got worked up over Westicles?
Westicles: I was whining about the tennis one more I think
MSmits: there was one about women and bodyweight
Westicles: oh, that one was great. javacoffee
Westicles: though it has a trivial O(1) solution
Westicles: but it set off the white knights riding to protect the ladies
Aldoggen: body weight is a girl's secret?
MSmits: Did they try to solve it using progressive bias?
Westicles: Just the usual --However does it really need to be gendered in this way? We all know that in the tech industry we struggle to attract diverse people...
MSmits: I know, I read that
MSmits: without trying to start a whole conversation about it and get the mods up in arms, I am a leftie, but some of this identity politics makes me sad also
Girard: :bento:
Aldoggen: could have been about truck drivers weighing their trucks while competition was watching
Aldoggen: I guess it wasn't necessary after all
MSmits: yeah I agree, you can have lots of themes, but people could stand to be a little less sensitive about some things and focus on real problems I think
Westicles: Yeah, I got a comment the kiss the girls would be better if it was about rats :rolling_eyes:
MSmits: rofl
Astrobytes: interesting
MSmits: well my submit is done. Got to the same rank basically. So I am convinced I didnt break anything
MSmits: it was still going up, so i guess it'd settle at 7 with a few more games
MSmits: no, it's at 9, but it's 0.08 below the 7th
Aldoggen: they're pretty close together then
MSmits: yeah
MSmits: I could rank higher, but it has no opening book
struct: my bot loses too much as p1
struct: it should not happen
MSmits: i might generate a new one, once i am done trying some more stuff
MSmits: struct at your rank it should win 70% as p1
MSmits: where karliso is at, it is around 90%
struct: i have no idea tbh
struct: I never tested my bot locally
MSmits: should be easy to do
MSmits: there's a nice trick to it
struct: yeah just not really interested in it
MSmits: you dont need a sim even
struct: whats the trick?
MSmits: just let your bots output "win" or "loss" as a solved result
struct: ah yes
MSmits: and your "arena" just believes them
struct: I do that
struct: for other games
struct: I just pass last played move
MSmits: yeah
struct: and I only output win not loss
struct: because I need to make sure the other bot finds the win
struct: Aldoggen yes you can even create a referee to handle this for brutaltester
MSmits: Aldoggen no, i think you misunderstand
struct: Yes its not trivial
struct: as it sounded
MSmits: we do this locally on our own computer
MSmits: we let bots fight eachother
Aldoggen: ah, if your bot thinks he wins, you shortcut to the next game?
MSmits: yes
MSmits: exactly
struct: he doesnt think
struct: he is sure
MSmits: he proves it
MSmits: this is how i just fitted that parameter
Aldoggen: what is the advantage, except speed gain?
MSmits: you dont need to code a whole sim in your arena
Aldoggen: struct spoke about not winning enough as p1
MSmits: oh that migth not even be true, he needs to test that first
Aldoggen: or is that about something else
MSmits: thats just how his bot performs
MSmits: he has a pretty strong uttt bot he thinks should be winning more as p1
MSmits: p1 has a major advantage in uttt
MSmits: probably if we could solve the game, it would be won by p1
YurkovAS: great win rate vs me and tomatoes :thumbsup:
MSmits: might just be luck YurkovAS, this version has 5% over my old one
MSmits: no opening book
MSmits: vingte uses one btw
MSmits: he's the only high ranked uttt with one atm afaik
MSmits: btw thanks again YurkovAS for helping me set up that brutaltester for the last contest. I would not have been in legend without i think
MSmits: the last effective thing i did was fitting params for my brute force bot
YurkovAS: you are welcome!
MSmits: I should get some sleep. GN
struct: gn
YurkovAS: gn
Astrobytes: gn
Aldoggen: okay, I think I found the O(1) solution to body weight is a girl's secret
Westicles: :tada:
eoigbwfkdop2ijenwfopii2jfackk2ef: SMELL MY FEET
NewCoder09: hey guyss
NewCoder09: dang i went down alot of ranks
NewCoder09: a lot*
struct: hi
eoigbwfkdop2ijenwfopii2jfackk2ef: who wants to be halal
eoigbwfkdop2ijenwfopii2jfackk2ef: ?
eoigbwfkdop2ijenwfopii2jfackk2ef: ?
eoigbwfkdop2ijenwfopii2jfackk2ef: ?
vvinter: hello! can someone help with the question about the code Royale game??
Darleanow: y
Darleanow: send me the link :)
PatrickMcGinnisII: chat DOA now?
PatrickMcGinnisII: Looks DOA
Ayza: vvinter, late answer but, what exactly are you not getting?
Ayza: the goal, strategy, or something else?
Darleanow: i've explained to him to goal
Darleanow: and some of the strategy
Darleanow: AYza
Inferno_dragon: oO
Inferno_dragon: you play that game? Darleanow
Darleanow: i wanted to start building a bot for it
Darleanow: but i'm focused on block the spreading fire atm
Darleanow: i'll prob start in around 7-8 hours