Chat:World/2021-06-02
MSmits: morning
Marchete: o/
alen23: laptop or pc
MSmits: dunno what o/ is, but hi there Marchete :)
Marchete: a guy waving
MSmits: :wave:
MSmits: mmh I had all easy puzzles solved 1,5 yrs ago
MSmits: now I have 55% =/
Marchete: I haven't looked puzzles since they mixed official with community ones
MSmits: oh then you're below 20% :P
MSmits: some puzzles are crap, but as long as there's the occasional gem, it's a nice timewaster on the train :)
Marchete: see this madness
Marchete: https://arxiv.org/pdf/2003.06212.pdf
Marchete: GA for hyperparameters for NN train
MSmits: yeah, i just got to that conclusion :)
MSmits: reading 1,5 page
MSmits: why is this madness?
MSmits: I knew they used GA for this
MSmits: should be right up your alley if you get to it
MSmits: but you should get something working with a poor choice of hyperparameters first
MSmits: can always optimize later
Marchete: train a trainer to train a bot
MSmits: oh yeah, the idea is weird
Marchete: you are too geek to see it as a complete insanity
MSmits: similar to meta meta mcts :P
Marchete: yeah
kovi: yeah, i was wondering why ga...why not an nn
Marchete: I was just thinking about meta MCTS
Marchete: your*
Marchete: lol kovi
MSmits: oh I think about it all the time, but why would you Marchete?
Marchete: a NN to get a better NN
MSmits: it's a little different though, meta mcts is just a tree with a subtree, that's not the same as hyperparameters. It's an extra layer, but different concept
Marchete: also these meta GA/MCTS needs some tuning...
kovi: back to reality - my impression is that we are not there yet. it is partly science, partly art
Marchete: hey that's a room for another meta!
MSmits: in nature, brains are evolved to fit the task. Small animals have smaller brains
Marchete: I wouldn't call NN "art"
MSmits: so GA is not a bad idea here
kovi: hyperparameter optimization
MSmits: evolution of the species is just hyperparamter optimization
Marchete: https://xkcd.com/1838/
kovi: :thumbsup:
Marchete: that's my point of view
MSmits: I am using this one
MSmits: for my talk
MSmits: doing a talk at my school about my research project for teaching AI to students
Marchete: it's funny because it's true
MSmits: yeah
Marchete: all these formal papers? stir the pile clockwise or ccw
Marchete: with tons of algebra and formulas
MSmits: it's funny that NN's are basically inspried by the brain and we understand them as well as we do the brain, which is to say quite poorly :)
MSmits: it's probably fundamental to the thing
MSmits: wasn't there research about sparsely connected NN's ?
MSmits: And NN's growing new connections?
MSmits: I think these were far more efficient, but probably even harder to get to work
Marchete: cut a brain in very thin slices
Marchete: replicate neurons and connections on a computer
Marchete: success
MSmits: lol
Marchete: I'm not joking
Marchete: I remember some scientists did with a worm
Marchete: and worked
jacek: oO
MSmits: wow really
Marchete: it was years ago
Marchete: I can't recall where I read it
Best-Coder12: I was using scratch.mit.edu before. My level isn't bad. but I don't fully understand here. Where can I learn coding in writing?
Marchete: maybe not a worm, but a small bug
MSmits: that puts a whole new spin on the fact that your computer can be infected with a worm
MSmits: Best-Coder12 you need to go do a python course
MSmits: probably
MSmits: this site is for players that know the basics in one language
MSmits: (or more)
MSmits: open worm project lol...
Best-Coder12: Do you know a site for beginners?
MSmits: someone will know, my suggestion would be subpar I think
MSmits: at my school we have our own teaching environment which is not open to the public
jacek: also, using NN to design NN isn't new https://peltarion.com/blog/data-science/nas-search
jacek: but using it more efficiently is
MSmits: maybe this?
MSmits: https://www.learnpython.org/
MSmits: this worm thing, they can copy it and make it work and they still dont know why it does :)
Chromicquanta: Hello, World!
MSmits: “And as they become more and more complex you start to have ethical questions, such as should you really turn off the computer.”
MSmits: hi Chromicquanta
MSmits: I know the answer to this
MSmits: you don't. Keep running the meta mcts. Moooaar visits!
jacek: w00t https://forum.codingame.com/t/community-puzzle-connect-4/189435/8?u=jacek1
MSmits: lol
MSmits: well steal is confusing :)
MSmits: very necessary in this game though
jacek: we don't understand neural network fully either, and they are still far from 'real' neurons. they are just matrixes and matrix operations. in other words, humans don't understand math
Best-Coder12: Actually, I'm in 6th grade. teacher stopped teaching because he got angry with other students
MSmits: sounds like a pro
jacek: do you want to learn python or other language?
MSmits: python is the common place to start these days, if you have no idea, start there, otherwise anything works
MSmits: well... dont start in c++ or other old languages
Best-Coder12: ı want learn phyton
MSmits: my train is arriving. ttyl. Look at https://www.learnpython.org/ Best-Coder12 or google for better places. There's no problem with doing multiple courses
MSmits: np
derjack: oO
sprkrd: top cause of death, that is
KiwiTae: MSmits you take the train everyday? hehe
cmmcmc: hi how can i learn to code
sprkrd: following tutorials and solving exercises
sprkrd: other than that: https://letmegooglethat.com/?q=how+can+i+learn+to+code
Xzoky174: never knew there was a website like that lol
cmmcmc: which kind of tutorials
KalamariKing: Lot of new folk here today, eh?
KalamariKing: cmmcmc just google whatever you wanna learn. Neural networks? Google it, TensorFlow will probably show up. Basic programming? Google it, plenty will show up; w3schools, codecademy, or hell python.org if you wanna learn python
Nerchio: or you can google youtube and watch stupid videos for a couple of hours, days or months
Nerchio: whatever floats your boat
Xzoky174: I personally don't prefer videos, but it's your opinion
codin_compuder: hi
codin_compuder: hi
codin_compuder: hi
codin_compuder: hi
codin_compuder: hi
codin_compuder: hi
sprkrd: codin_compuder cease this instant
sprkrd: no spamming
codin_compuder: http://chat.codingame.com/pastebin/565e6a42-8cf5-42de-b783-14c55be61b0c
codin_compuder: thats what i see
codin_compuder: also how do you get colerd text
sprkrd: you get ping'ed when someone writes your full nickname
sprkrd: like this codin_compuder
sprkrd: that makes the text red, also
codin_compuder: sprkrd
codin_compuder: sprkrd
codin_compuder: ???
sprkrd: yeah, it works
codin_compuder: im saying sprkrd
sprkrd: only I see the red text
codin_compuder: it dosnt workkkkk
codin_compuder: oh
codin_compuder: codin_compuder
codin_compuder: v
codin_compuder: um
codin_compuder: nope
sprkrd: doesn't work for yourself
codin_compuder: ok
codin_compuder: can you send me a freind request?
sprkrd: no such thing, I believe. You can follow other people tho
codin_compuder: there is theres a big button on home that says freinds
codin_compuder: so there should be codin_compuder
codin_compuder: lol
codin_compuder: https://www.codingame.com/ide/puzzle/tower-dereference press play on this and everything is weird
**codin_compuder lol
**codin_compuder Xzoky174 hi
**codin_compuder slaps around a bit with a large fishbot
codin_compuder: (╯°□°)╯︵ ┻━┻
**codin_compuder slaps around a bit with a large fishbot
**codin_compuder slaps around a bit with a large fishbot
codin_compuder: (╯°□°)╯︵ ┻━┻
codin_compuder: slash plus slap =
**codin_compuder slaps around a bit with a large fishbot
codin_compuder: slash plus flip=
codin_compuder: (╯°□°)╯︵ ┻━┻
Neilislive: how to learn coding i know nothing about coding
codin_compuder: do the tutoril bruh
codin_compuder: and if you now nothing start with scratch
codin_compuder: search it up
AntiSquid: ease up the spam or kick/ban
jrke: damn dbdr 1st
StevensGino: on which game jrke?
jrke: on CG
jrke: not on any multi
jrke: overall rank
jrke: https://www.codingame.com/leaderboards/general/global
StevensGino: ah, ok
StevensGino: a very long way before I become a grand master
codin_computer: ep
**codin_computer yeah
**codin_computer /+ flip =
codin_computer: (╯°□°)╯︵ ┻━┻
Nerchio: B
**codin_computer / + me =
codin_computer: /me
Nerchio: A
**codin_computer /+ slap =
**codin_computer slaps around a bit with a large fishbot
Nerchio: N
codin_computer: Nerchio
codin_computer: Nerchio i will b a n you
codin_computer: cause you said that to me
Nerchio: :fearful:
codin_computer: lol just kidding
**codin_computer or am i
codin_computer: (╯°□°)╯︵ ┻━┻
codin_computer: :laughing:
MSmits: AntiSquid
jrke: he needs squid-theray
MSmits: therapy?
MSmits: squid rays?
struct: hi
MSmits: hi struct
struct: had so many bugs on mcts
struct: took me a while to code it this time
MSmits: what did?
MSmits: uttt?
struct: It will be used in uttt yes
MSmits: ah ok
struct: But I just did it for ttt
struct: its easier to debug
struct: I can just reuse it anyways
MSmits: definitely
struct: Now I need to try and add solver
MSmits: yeah, it's not super difficult
struct: Before I was doing rollout
struct: and always returning 1
struct: if a player won
MSmits: sure
struct: not a good idea :D
struct: I need to return 1 or -1
MSmits: ah yes
struct: based on the player
MSmits: btw, it's easier to backpropagate from first to last move
MSmits: which is actually forward propagate i guess
struct: easier?
MSmits: yeah, because the starting sign is then the same
MSmits: every time
MSmits: you need to flip signs when backpropagating and depending on who was last to move its a +1 or -1
MSmits: if you start at the beginning the sign is always the same
struct: ah I see
MSmits: i keep my selected nodes in an array
MSmits: and just start from the first
struct: yeah I do that too
Marchete: damn python, is slow af
struct: I also had a bug where I used Node& node = nodes[N]
struct: instead of Node* node = &nodes[N]
MSmits: depends on what you do with it Marchete, but generally yes :P
Marchete: pretty much everything
struct: then if i did node = other node at the first example
Marchete: like reading and processing files
struct: it would chance the node values
Marchete: I'm trying to average samples, but is so slow
MSmits: both of those can change node values
MSmits: depending on how you use the reference or pointer
MSmits: why average Marchete?
MSmits: also is this with numpy or without?
Marchete: input -> sum(policy)/N sum(value)/N
Marchete: it just dies
Marchete: like 5 min per file
MSmits: this is without numpy?
MSmits: also how many items
Marchete: as I'm using a dict, yes
MSmits: eh dict is always gonna be slow
MSmits: even in other languages
Marchete: probably I'll need to get some numpy magic
MSmits: it's hash based
Marchete: yeah, I'm sure that C++ also will take 5 min per 40MB file
MSmits: c++ will also be very slow, probably not 5 min
MSmits: dictionary lookups are horrible
Marchete: unordered_map?
MSmits: it's equivalent to unordered map.
MSmits: yues
MSmits: I replaced my unordered map by an index function that used 12 array lookups and many operations and it was still faster
Marchete: I don't know how to average in numpy
MSmits: (in my endgame book generator)
Marchete: like input , average_policy, average_value
MSmits: https://numpy.org/doc/stable/reference/generated/numpy.average.html
Wontonimo: np.mean isn't it for averaging?
Marchete: I have no idea
MSmits: should not be hard, try the functions they provide with some unit tests
MSmits: i am no numpy guru, but i wouldnt worry about something as basic as sum or average :)
derjack: https://math-fail.com/wp-content/uploads/Math-Teacher-Insult-600x445.jpg
MSmits: I think when they made jacek moderator, they accidentally told him the job description was to always provide the correct meme to go with conversations
derjack: when did they made jacek moderator
MSmits: didnt they?
Wontonimo: i like that joke
MSmits: it's good
Wontonimo: "it's easier to backpropagate from first to last move" - this would have saved me quite a lot of debugging but would also require me to create a new forward pass datastructure
MSmits: why
Wontonimo: i have to admit that i've made the error of passing the wrong data
Wontonimo: with the wrong sign, like you said
MSmits: why use any data structure besides an array of node pointers?
Wontonimo: that's it. not more than that
MSmits: ah ok, saves you from having parent references in the node and all that
MSmits: pointers are huge
Wontonimo: right. that's a good idea
MSmits: i can fit an entire oware or onitama game state in 1 pointer :P
Wontonimo: +100
MSmits: well with oware it also needs the score separately, but the point stands :)
Wontonimo: and i can still reverse the list, as the "mcts-solver" is trivial when going in reverse
Wontonimo: well, not "trivial" but certainly easier
MSmits: why include the solver in the discussion? My solver doesnt use this list
MSmits: should it? I never thought about that
MSmits: wait no
MSmits: it does use the list
MSmits: in reverse even
MSmits: i was confused for a sec
Wontonimo: oh good, i thought i was missing something important about the solver
MSmits: no, you use the same list, if it's a won node, parent is lost, if it's lost or draw, you check all siblings
MSmits: if one of them is unfinished, you break out, otherwise you take the best result and negate for parent
MSmits: it's reverse minimax
MSmits: more or less
Wontonimo: i have a backprop function for non-solver, and a backpropInfinity which does what it sounds like until it finds the case you are talking about then just calls backprop to finish the job
MSmits: i dont like the infinity thing. Thats how they do it in the solver paper
derjack: reverse minimax? like maximin?
MSmits: but you need a separate thing for draws
MSmits: and if you use a separate thing, you may as well just have a flag for everything
Wontonimo: hmm, maybe I'm missing that. I should take another look
MSmits: i use -1, 0, 1, 2 for loss, draw, win, unfinished
MSmits: jacek uses a flag for unfinished
MSmits: and sets value to 0 for draws i think]
Wontonimo: backpropInfinity is only called if tree expansion is at a terminal board configuration, otherwise just backprop
MSmits: yeah thats how the paper does it
MSmits: did you use that pseudo code?
Wontonimo: unfinished?
MSmits: unfinished game
MSmits: not solved
MSmits: or finished = solved
MSmits: poor choice of words prolly
derjack: my node has bool if its solved ~
MSmits: yeah thats what i meant
MSmits: and it has +inf and -inf and 0 for value right?
Wontonimo: gotcha. no, i didn't use the pseudo code of the paper. read it, thought about it, left it for a day, drew it out from memory so that I understood it, coded it my own way
MSmits: it's equivalent to what i do, just the normal uct with an extra flag needed for solving
derjack: yes, but for jacekmax its +inf-rounds and -inf+rounds
MSmits: to win sooner
Wontonimo: that's my usual MO
MSmits: and lose later
derjack: MO?
MSmits: Wontonimo i tried to use the paper, it made my head hurt even though i sort of got it. Then coded it completely differently
Wontonimo: method of operation : read paper, sleep on it, try to implement it from memory on another day to test understanding
MSmits: wasnt it recursive also?
MSmits: I just while looped it
MSmits: i try not to use recursion when a simple while loop suffices
Wontonimo: the only loop i have that is extra from just backprop is to look at the children
MSmits: yeah same
MSmits: i meant the pseudo code
Wontonimo: no recursion! that's crazytown
MSmits: i think its recursive
MSmits: anyways, train arriving, ttyl :)
Wontonimo: i made a point to not look at the pseudo code in that paper
Wontonimo: ttyl
MSmits: btw when i say train arriving, i mean i am in it and getting off of it
Wontonimo: derjack , just realized I wasn't clear : MO = method of operation
Uljahn: modus operandi
Wontonimo: and i don't actually use infinity. It's 1e10 or something like that.
Wontonimo: oh, getting all latin and fancy. yes, indeed you are correct Uljahn
derjack: oh my
Wontonimo: oh my?
Uljahn: o.m.
derjack: ohai
den_lakeev: guys, can i train model with Regression without transoforming object columns to float ones?
Wontonimo: yes
viwlife: Hi
MSmits: what a question den_lakeev
AllYourTrees: for UTTT, is there a good way to choose a square when you have access to the whole board?
AllYourTrees: good way as in simple rule based
struct: make the move that forces the opponent to play on that board
AllYourTrees: interesting, ty
reCurse: Not sure anyone knows why, but if you leave vanilla MCTS forever on those positions it tends to favor that move
AllYourTrees: reCurse how much time did you spend tuning hyperparameters on your NN + MCTS implementation?
reCurse: shrug
MSmits: wait AllYourTrees, did you mean access to all empty squares of the full 81 board?
AllYourTrees: MSmits i just meant when you get a free play
AllYourTrees: so i guess that includes first move?
MSmits: yes they misunderstood you
MSmits: a free move is just normal mcts, with a lot of options
MSmits: often it's a good idea to win a miniboard with the free move
MSmits: but not always
AllYourTrees: yeah i'm trying to figure out how to make the number of actions max 9 instead of 81, but i can't think of how to get free play to only have 9 choices
reCurse: At this point I'm just glad I'm reading chess stuff so my chance of relapse is minimal
MSmits: AllYourTrees can you explain why it's important to you to have max 9 options?
reCurse: MCTS node allocation optimization I would bet
MSmits: is this because you are storing moves in a fixed size array on your node?
MSmits: yes
MSmits: thats my assumption
reCurse: You can always select board first then move
reCurse: Both fit in 9
reCurse: Not that I recommend the approach
reCurse: Just an idea
MSmits: yeah, that works... i agree there are better ways
AllYourTrees: yeah and also i've been trying to do some NN stuff and i think having a policy with only 9 outputs that get used always is better than 81 outputs that only 1/9th of them get used every turn
MSmits: hmm
reCurse: My intuition would tend to disagree with that
reCurse: Useless comment sorry
reCurse: I wouldn't know how to explain it
AllYourTrees: haha no worries
reCurse: And I get sick of my own rambling trying to
AllYourTrees: maybe because the way the 9 smaller ones are layed out matters?
AllYourTrees: like doing center square in center vs top left will probably be different?
MSmits: yeah will be different
reCurse: It will have to differentiate the context anyway
reCurse: So neuralpower will be lost
MSmits: but this question is really hard to answer without knowing your input structure and the rest of your network
MSmits: i think
AllYourTrees: fair
MSmits: a similar question is whether to use one-hot for input, or multiple possible values per input
darkhorse64: Actually, it's because one hot encoding leads to faster inference engine. It looks also more suitable for training
AllYourTrees: so far i have one hot with a couple of planes
MSmits: planes?
AllYourTrees: 1 plane = 9x9
AllYourTrees: so input is 5x9x9
MSmits: I see
MSmits: did you make a nn for CG before AllYourTrees?
AllYourTrees: nope this is all local still
reCurse: One-hot is better if there is discontinuity in your value
MSmits: because from what i hear uttt is not the easiest place to start if you want to reach a high rank
AllYourTrees: well i work with NNs at work
AllYourTrees: yeah maybe i should switch to the connect 4... it seems like it is struggling on UTTT so far
MSmits: reCurse like oware? It may not seem to have a discontinuity, but it has special values like having 0, 1 or 2 seeds, or being able to go round with 12+
MSmits: robo and jacek both use one hot
reCurse: I suspect there might be a discontinuity provoked by the number of affected squares
MSmits: right
kovi: discontinuity comes from constant cg forum interrupts
doritosxxx: Hello. Is it possible to copy permalink to my clash of code leaderboard position?
reCurse: Forums are alive?
kovi: my mistake, chat
MSmits: oh yeah, it interrupts a lot
reCurse: Ah, yes true
MSmits: hey, I'll be around 60-70% CS teacher next year, from only 4 hrs a week this year
struct: Dont think so doritosxxx
reCurse: Random thought MSmits
reCurse: I often get annoyed at the same basic questions repeatedly asked in chat
MSmits: yup
reCurse: But as a teacher are you immune to that? Is that a requirement for the job?
MSmits: hmm
doritosxxx: that's a pity :(
doritosxxx: thank you
MSmits: if my mood is bad and I am annoyed with the particular students in that class, it might be annoying yes. If they're a good class and ask in good faith it's fine
MSmits: patience is a requirement anyways
AllYourTrees: how long have you been a teacher for MSmits?
MSmits: the misconception about teaching is that it's the same every year, but much is different. I prefer if it was more the same actually
struct: just make those students play botg
MSmits: AllYourTrees 15 years
reCurse: Isn't the material mostly the same, and the beginners questions too? How is it different?
AllYourTrees: wow nice! did you always know you wanted to be a teacher? how did you end up teaching?
reCurse: I guess I do have that misconception, just wondering why
MSmits: if I always teach 5th year physics of one particular level then yes
MSmits: and even then the curriculum does change
MSmits: but I get different age ranges
MSmits: and thats physics
MSmits: CS changes way more rapidly
reCurse: Ok so you mix it up on purpose. I remember teachers mostly always giving the same kind of classes for years.
reCurse: Well some of them anyway
MSmits: well that's actually nice sometims, because it saves a lot of time
MSmits: i can use the powerpoint from last year
MSmits: oh and another thing. If you only explain something once or twice a year, it takes a loooong time before it gets repetitive
MSmits: because a year is a long cycle
reCurse: brb
MSmits: there's also always new colleagues, new ideas for how to teach. Project-based education. The school is always changing
MSmits: Older colleagues have trouble keeping up. They dont have trouble getting bored.
MSmits: hi ge_pet
MSmits: for me personally. I enjoy teaching most when I get to explain very complicated stuff. I don't enjoy teaching the basics as much.
kovi: interesting msmits, thx for sharing
MSmits: np, teaching is very different experience depending on the subject you teach also
MSmits: CS and physics are different, but teaching French is even more different
jacek: seems chat history has been hacked
struct: o.o
jacek: the wiki(?)
KalamariKing: jacek wdym hacked
jacek: https://cg.spdns.eu/wiki/Main_Page
KalamariKing: what is that supposed to be
KalamariKing: codingame wiki?
jacek: eeyup
jacek: and link to chat history
reCurse: Where everything you said here is graciously kept forever to be used against you in a future court of law
KalamariKing: wait fr? including dms?
KalamariKing: you can't leave me hanging here
reCurse: Part of me wants to say "including DMs" to watch the reaction
KalamariKing: So that's a no, ok I needed the chat history, someone was being... rude... and I needed proof for a mod
KalamariKing: Shame
jacek: im never rude, i just say what it is
KalamariKing: No, no, it wasn't you
KalamariKing: Someone in dms
jacek: phew
KalamariKing: Wow this page is slow
KalamariKing: Makes exploring hard :/
KalamariKing: How long has this page been nonsense
jacek: since they switched to php :v
KalamariKing: Do they know how the php is getting poisoned
KalamariKing: conflicting intermediate edits?
Jelafo: Hi everyone, can anyone tell me whether there are draws in UTTT (i.e. is this considered a draw: https://www.codingame.com/replay/561557950) ?
Jelafo: The game statement does not seem to cover that case
KalamariKing: first off uttt looks amazing
KalamariKing: second off lemme read the rules
struct: yes this is a draw
struct: you have the same number of miniboards as the opponent
cw477: woohoo im getting them interviews linedup
cw477: feelsgoodman
KalamariKing: Why would it be beneficial to play a different tile when a win is available
struct: a miniboard win?
KalamariKing: Yeah
struct: or a complete win?
KalamariKing: A miniboard win
struct: because it can help opponent
Jelafo: Okay thanks, i would have expected it to be a draw as well. If i look at the game in "last games" it shows as a win for the first plaer though... At least it looks like ti to me.
struct: its a win if you have more miniboards won
KalamariKing: Jelafo check if both players are 1st, even though only one is 'highlighted'
Jelafo: Ah, you are right,! Great, thanks!
Jelafo: I did only look at the highlighting
MSmits: KalamariKing often when you win a board, it's gives the opponent an advantage. MCTS bots do smart stuff. If your bot can win with a certain square, the opponent will tend to make the board that this sends him to, is a good board for him to play on
MSmits: so often you're trading wins
MSmits: or postponing winning a board, because the alternative is better
MSmits: however, it does seem to help a bit if you favor winning mini-boards in the random rollout
MSmits: but the gain is marginal
Butanium: having hard time debugging my power 4 MCTS
Butanium: it's soooo frustrating
MSmits: power 4?
Butanium: *connect 4
MSmits: o
MSmits: mcts is hard to debug
MSmits: i think it's mostly hard because you code a lot at once and then hope it works. Not much room for unit testing
Butanium: yup
Butanium: at least I know which parts break
Butanium: but not why
MSmits: which language?
Butanium: https://pastebin.com/kFphJAxG
Butanium: ocaml
Butanium: at least I have this debug things
MSmits: ahh ok
Butanium: And at turn it tries to replace
Butanium: ;-;
MSmits: i have no idea what ocaml is
Butanium: *turn 2
Butanium: functionnal language which also has an imperative part
MSmits: oh, sounds cool
Butanium: yup !
darkhorse64: sloow too
MSmits: well yeah, it's gonna be slow
Butanium: is 63 000 playouts bad?
MSmits: if you want to be fast, I guess c, c++ and rust are your only options?
MSmits: in how much time Butanium?
Butanium: 90 ms
MSmits: what is a playout exactly?
MSmits: how do you define it
Butanium: random simulation until endgame
Butanium: when I create a new node
MSmits: hmm, how many simulations do you do after you expand once
MSmits: just 1?
Butanium: only one
Butanium: yes
MSmits: then that's actually quite good
Butanium: nice !
MSmits: surprises me
darkhorse64: ^
Butanium: Now I just have to make it works after turn 1
Butanium: x)
MSmits: I think most players with c++ dont get much higher than that
MSmits: the top players do get 2x that
Butanium: I don't store any arrays for state
Butanium: just action
MSmits: yeah thats fine
Butanium: and I undo them will retropropagation
Butanium: *while
MSmits: oh, you can do that, but if you go 10 deep, a simple copy from the root state is faster
MSmits: faster than 10 undo's
MSmits: I memcpy it
Butanium: I see
MSmits: in minimax you go 1 step back
Butanium: I may try to change that because my error comes from my undo function x)
MSmits: in mcts, you go all the way back to root
jacek: suddenly this puzzle of the week becomes popular
geppoz: uhm, in connect4 a state can be in 128bits, 2 longs, copying should be faster that any aritm/logic operation
PatrickMcGinnisII: oh its connect4
MSmits: ohh wait... I think i got confused Butanium, i said 67000 is not bad, but thats for uttt
MSmits: it's a bit worse for connect4 i think
PatrickMcGinnisII: i been working on clobber, similar setup
MSmits: but still not bad for an obscure (to me) fp/imp language
MSmits: clobber is cool, but it's hard to get a handle on with mcts. It seems the first few moves are very random
PatrickMcGinnisII: php can do depth1 90k nodes ... most can, add all the move finders,etc. and his nodecnt is gonna be 10% of that
MSmits: some comparisons between ocaml and c++. Dunno how much it is worth: https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/ocaml-gpp.html
PatrickMcGinnisII: MSmits yes, i use depth 2 minmax until i get to last 4 tokens, then full sim to the endgame and its still too slow and I lose
MSmits: oh, you might be better off just using if else
jacek: clobber is kinda all or nothing
MSmits: yeah it's a bit like D&B
Butanium: I think rust compiler MSmits was initially wrote in ocaml
MSmits: ohh, rust is comparable to c++
aCat: this cat want to learn rust!
aCat: (I tell this myself after every contest)
aCat: but finally I started reading books ;p
MSmits: ocaml seems mostly faster than java
MSmits: wait no
MSmits: for some kinds of programs it is
MSmits: aCat well i guess since CG bench is no longer a thing, more rust doesnt hurt :)
aCat: what connection between rust nd benchmark you see?
jrke: i haven't tried bench till now
jrke: any link?
aCat: https://github.com/s-vivien/CGBenchmark
MSmits: aCat rust is different in IDE
MSmits: so it times out
reCurse: Not true since I forced their hand :P
MSmits: apparently
aCat: yeah
MSmits: what'd you do reCurse?
aCat: I was pretty sure it's release everywhere
jacek: banned rust? :heart:
reCurse: Abused debug mode to highlight the issue during FC20
aCat: ^^'
MSmits: oh
reCurse: Sometimes it's the only way to get things fixed
MSmits: yeah
MSmits: but you dont even use rust :P
reCurse: Yeah, you can use rust to send some information about debug state to your c++ bot
reCurse: Stuff like that
MSmits: oh, you went into fancy mode for this
reCurse: Then maybe you decide to only use 1ms to simulate debug mode
reCurse: All hypothetical
MSmits: good job
jrke: jeez finally pytorch got installed in my laptop after 2 days of hard work
jrke: :rolling_eyes:
aCat: everyone after nns now :(
geppoz: :D
Nerchio: not me
Nerchio: yet.
geppoz: at least we learning something ;)
aCat: hi ;]
jacek: oO
reCurse: Sorry? :P
aCat: :P
aCat: I will hve to myself one day
aCat: but I still not like them too much
aCat: I mean always prefer evo because I can code everything myself no need to use some huge fancy framerowks
aCat: with 1000 magic options
jacek: you can code NNs yourself ~
reCurse: I coded everything myself for NNs for over a year before that
Akshat01: can anyone tell me how can we see previous question we have attempted in clash of code
reCurse: Then I just leverage framework when I felt comfortable enough with training concepts
aCat: good way recurse
aCat: long and hard ;p
MSmits: i tried recurses way for a week
MSmits: got something working, then moved to framework :P
MSmits: no patience for coding my own libraries for the complex stuff
reCurse: Maybe you just groked backpropagation much faster than I did
reCurse: Also not over a year of coding, clarifying :P
MSmits: well i assume you also coded convolution and such yourself
reCurse: Yes
jacek: and yet you were saying there were errors in my method :unamused:
MSmits: see thats all the stuff i skipped :)
reCurse: Thanks for reminding my failings
MSmits: jacek does this
Butanium: can I timeout due to out of memory?
MSmits: though, he hasnt reminded me over a week about that time i paid for a paper
jacek: like i do for paying for paper
jacek: ahh
MSmits: :P
jacek: Butanium yes
Butanium: First player (Butanium): Timeout!
jacek: timeout could be crash
Butanium: will I have something else than that if that's the case?
jacek: MSmits dont worry, you were young, inexperienced
MSmits: true
MSmits: and they needed the money?
MSmits: Butanium just try to measure time at various places in your bot, maybe you're measuring wrong or something
Butanium: No I think it's memory
MSmits: how much are you using
MSmits: you get around 8--
MSmits: 800
Butanium: By setting the time limit at 1 ms I do 11 turns
Butanium: otherwise 2
MSmits: i am not sure how the number of turns depends on the time you said
Butanium: I'm creating less node
MSmits: oh you mean you crash after 11
Butanium: so less memory
Butanium: yes
MSmits: ahhh
Butanium: I tried to keep the tree between turns
MSmits: so, do you use object pools?
Butanium: in ocaml that's a recursive type
PatrickMcGinnisII: connect 4 data that's interesting https://towardsdatascience.com/creating-the-perfect-connect-four-ai-bot-c165115557b0
MSmits: no, i meant object pools as in giant arrays of reusable nodes
Butanium: no
MSmits: it usually makes the bot faster if you do
MSmits: so that you dont get the garbage collector doing a lot of work for you
Anonyman: hi, i'm having an issue defining a class in here (i'm coding in python), the program outputs "invalid syntax at Answer.py not in a function on line 10" (10 is the line number of the __init__ of my class)
Butanium: pastebin.com
MSmits: I have a 25 million sized node array or something and when i need an index to a different node, i use the array index
Butanium: paste your code here
Butanium: oh I see MSmits
MSmits: when you get to the end of the pool
MSmits: you go back to beginning
Anonyman: I paste my code here ?
MSmits: you either reset the tree, or risk overwriting nodes still in use
Butanium: at pastebin.com Anonyman
MSmits: you can paste here and it will autopastebin, if it works, sometimes it doesnt
MSmits: what i do, almost always, is check whether i have X nodes left in the pool at the beginning of a turn, if it's less than X, i throw away the tree
MSmits: some games you never need to reset
MSmits: some games you need to reset more than once
Anonyman: https://pastebin.com/e6vqTdFt
MSmits: but no memory issues
PatrickMcGinnisII: AntiSquid I'm not a PY guy, but i think your missing an import
PatrickMcGinnisII: sry AntiSquid
PatrickMcGinnisII: i meant Anonyman
RoboStac: types go before the value (eg pos:int = 0)
Anonyman: thanks for your help PatrickMcGinnisll but i'm not sure about that, because i don't use anything other than sys
PatrickMcGinnisII: ah sys handles stderr, ok
PatrickMcGinnisII: see i leaned something
PatrickMcGinnisII: RoboStac got u back
jacek: Anonyman def __init__(self, name: str, pos: int=0, turns: int=0, prison: bool=False):
Anonyman: i wouldn't have found this stupid mistake
Anonyman: in french we don't say thank you but "grosse bises sur tes fesses" and it's bioutifoule
reCurse: o.0
jacek: BlaiseEbuth is that true?
Butanium: lol
Butanium: that's a *hot* thanks
mariushx: hello; does anybody know the theme used in the ide ?
jacek: dark :v
mariushx: it is a visual studio modified dark theme
struct: it is visual studio dark
struct: https://microsoft.github.io/monaco-editor/
BlaiseEbuth: Hmm?
jacek: mHm
mariushx: on vscode it might be; i was asking for visual studio IDE; i didn't mention, i know
mariushx: i will probably edit the dark theme; thanks
struct: my visual studio theme looks the same as the one on cg ide
Manchi_o6o7: what is the best C IDE
jacek: notepad.exe
olaf_surgut: Hi
jacek: ohai
olaf_surgut: someone know if in CvZ shooter teleport to the the target or he is moving with some velocity?
olaf_surgut: i want to know because it affects simulation a lot
jacek: it moves up to 1000 units per turn
olaf_surgut: shooter is "sliding" or teleporting?
Scarfield: teleporting
Scarfield: instant movement for all entities to target pos, or nearest pos within their range
olaf_surgut: lol, i was calculating shortest distance between two moving objects, and looking for bug. visualization really confused me but i love this game
MSmits: olaf_surgut cool... this method is how CG calculates passing a checkpoint btw
MSmits: so if you get there, you could use this if you want
MSmits: except checkpoint doesnt move, but... you get the idea
Sandoramix: hey guys i've got a problem with "Lumen" excercice. When i submit the code, it says that one test is failed because it might be hardcoded. So what does it means by hardcoded? :P
MSmits: (in coders strikes back, sry)
MSmits: it means you knew the answer
MSmits: and just gave it
MSmits: without using code to solve the problem
Sandoramix: oh
Sandoramix: strange
MSmits: its a possibility, it's not accusing you
Sandoramix: i think i didn't do that tho : |
Scarfield: puzzles can detect that :o
MSmits: but this is also what would happen if you hardcoded the testcases
MSmits: your solution is not generalized enough to deal with all cases
Sandoramix: actually it is, so i'm a little disappointed
MSmits: let me look at my lumen solution sec, this was one of my python practice puzzles
Sandoramix: yeah i used python too
jacek: no timeouts?
Sandoramix: no
Sandoramix: firstly i thought it was beacause of use of classes, so i removed them, but it still gives me the fail
MSmits: eh not sure if i can help you. I have no idea what i did. Solution is 30 lines and part of it is:
MSmits: for i in range(n): http://chat.codingame.com/pastebin/e5d7919a-d213-4149-810f-244c63002ec9
MSmits: sooo... i dont know what i did :P
KiwiTae: so many loops
MSmits: want me to send it to you Sandoramix?
Scarfield: recursive nesting
Scarfield: (╯°□°)╯︵ ┻━┻
KiwiTae: MSmits looks like i did the same ><
Sandoramix: yeah, if you tell me how to :)
jacek: nestfield
Sandoramix: can i just copy paste it here?
MSmits: sec
Scarfield: made a quick and dirty connect 4 yesterday. thought i would improve it today, and somewhere i hid a bug i cannot find :'(
MSmits: i would not share a hard puzzle solution, but you say you solved it
except for a small thing and this a really easy puzzle, so i will pm my solution
Scarfield: :scream:
MSmits: i remember thinking how easy it was when i solved it :P
Scarfield: UTTT is not a hard puzzle either :innocent:
MSmits: Sandoramix i cant pm you for some reason
MSmits: do i need to follow him?
KiwiTae: smth like that
MSmits: aww fine
Scarfield: to pm you need to follow each other
MSmits: really?
MSmits: wiw
jacek: no
Scarfield: no?
MSmits: people spam me though
jacek: click on chat
MSmits: and i dont follow them
Scarfield: im noob then
jacek: click on nick avatar on chat
MSmits: oh i was clicking on profile pic
MSmits: but you need to click the name
Scarfield: you forgot to click my name and paste UTTT solution :p
jacek: http://chat.codingame.com/pastebin/7b84bbaf-a083-4792-8314-053370d61671
jacek: oops, it meant to be pm
Scarfield: xD
jacek: ah well enjoy your legend
mariushx: what you call that ? chinese programming ?
Scarfield: C朞
Scarfield: its a way to compress code, since there is a 100k char limit on code size in CG
KiwiTae: anyway to encode bytes in utf32?
jacek: dunno but they would count more than 1 char
KiwiTae: :(
mariushx: what would be the use for that ?
KiwiTae: more weights
KiwiTae: ><
jacek: bigger NN in code
densch: hey, has someone here done the beach volleyball thing before?
Westicles: densch, yes
densch: I am wondering about which way to solve this is intended. like I could go ahead and plg in every possible beachx value into a time function and looks for which one the time is the snmallest. and be a physics geek, do some derivative stuff and find a formula for the perfect beach x. and jsut make it a one liner.
but guess I'll go the part where I cycle thorugh every possible x , looking for the perfect one :Ö-)
Westicles: One guy solved it in O(1) by deriving the formula, but most just do binary search.
densch: I'll just try through every possible x value, using the perfect formula would feel too cheap :-)
geppoz: yes I did
geppoz: it is a 4° equation
Westicles: and there's the one guy :)
densch: But I wanna be the Guy! :'O
geppoz: equ4thGrade(1,0,-(X*X/2+(hL-kW)/d),(hL+kW)*X/d,(X*X/4-(hL-kW)/d)*X*X/4)
geppoz: that are the coefficient of the equation
geppoz: *5 coefficients
densch: wow, that looks ugly :-)
densch: huh, it timed out for the forth test case :-D
Westicles: yeah, that's where the binary search comes in
densch: hm, what was binary search again? :-)
jacek: oO
densch: but I gotta rethink my concept now. currently I jsut go through the different x values by a simple for loop
MSmits: keep a maximum and minimum value of where the target can be and choose the middle
MSmits: thats all it is
MSmits: if it's 2D, keep them for both x and y
MSmits: jump to the middle for either
Smelty: interesting
MSmits: i heard binary search and just assumed batman
MSmits: might be way off here
jacek: batary search?
MSmits: sure why not
MSmits: buttery search
jacek: https://i.kym-cdn.com/photos/images/newsfeed/001/330/767/ce8.jpg
MSmits: :)
Smelty: battery search
densch: but what then if I have the middle? kick the one of the 3 x values (left one , middle, right one) where the corresponding time is the biggest?
jacek: top10 in search race :tada:
aCat: :+1:
darkhorse64: GA/SA ?
darkhorse64: I am quite bored to tweak magic numbers
jacek: GA
jacek: i tweaked my 'eval' and it did gave me boost
darkhorse64: #15 now but I am stuck. My eval is the most simple you can imagine ("progress along the path"). May be it's not smart enough
Manchi_o6o7: Guys, need some Python help. I want to plot a real time graph, where I know the x coordinate of the graph, but my y coordinate should the intensity of the pixel where I hover with my mouse. Hope you understand my question.
Manchi_o6o7: For example, if the color is (255,255,255) then the y coordinate should be bigger
AntiSquid: matplotlib
AntiSquid: just googled: http://chat.codingame.com/pastebin/c56f4aed-6d47-47af-a0f5-aa222936e9db
AntiSquid: seaborn and bokeh are quite interesting in regards to coloring ...
AntiSquid: but where do you use any of that on CG Manchi_o6o7 ? :D
mapapin: Hi, at what time do CG points update?
Astrobytes: 1 or 2am French time I believe
mapapin: Thx :)
cw477: sup mah bros
densch: this site sure is fun. jsut solved the sudoku puzzle, quite enjoyable stuff :-)
Rachelonline: :grin:
Lucky30_: any chance this contribution can get unapproved? https://www.codingame.com/contribute/view/66414125796ffc08c12554035c911bf50d4d you can win with a 4 characters code
Lucky30_: thx in advance
Lucky30_: the clash result with a 4char code: https://www.codingame.com/clashofcode/clash/report/17909043f2a6c92833622ad375f195ebce96194
Lucky30_: good night
Dazzle_me: because why not?
JimmyJams: dude, what is codingame's website ok?
Dazzle_me: you have to brave to send 0% test solution to get 100% validators
JimmyJams: I have at least 100 errors in my console from the site
PatrickMcGinnisII: JimmyJams yup, I've told people ... it's not exactly w3c compliant
Dazzle_me: :P
Dazzle_me: a lot of things could be improved but seems like nobody cares
PatrickMcGinnisII: They've added a bunch of stuff since I started on here ... there's a bunch of open css holes, but I guess they are a pain in the butt to close with all the json/js running rampant
PatrickMcGinnisII: *shrug*
PatrickMcGinnisII: visit the forum and drop solutions
JimmyJams: there 750 errors in my chrome console lol, I wouldn't even know where to begin
PatrickMcGinnisII: half of them are probably 'bad image so and so : ' errors
PatrickMcGinnisII: see if you can do a sidechannel vid card hack thru chat ... i think it's possible
PatrickMcGinnisII: i don't use chrome
JimmyJams: there's no way to seek out specific kinds of clashes like a reverse clash right?
Smelty: unless you do private clashes, no
GeorgCantor: Hi, everyone. Bored biomed teacher here looking for something interesting and came upon this site... trying to figure it all out!
PatrickMcGinnisII: Welcome fellow USA
PatrickMcGinnisII: North East South West?
**PatrickMcGinnisII is a Fla boy
PatrickMcGinnisII: well it's 10:21pm here. Gotta hit the bed. Pick a puzzle and glhf
GeorgCantor: K. Only 9:22 where I am. Thanks!
PatrickMcGinnisII: or compete
PatrickMcGinnisII: heh
GeorgCantor: Heh. Gotta figure out what I'm doing first.
JimmyJams: join reverse clash if you're looking for one: https://www.codingame.com/clashofcode/clash/1791030372b9d038d67f1fa571a416a87e7e068
1rre: Oof I stayed up late Unfortunately my C memory management is just as bad as it was
1rre: does anyone have experience with a program hanging on calloc? I searched around but all I can find is something from 2004 which I don't think applies in my case
PatrickMcGinnisII: post code 1rre
1rre: I mean there's a lot of code & it's a bit janky, but this is where the issue is:
1rre: http://chat.codingame.com/pastebin/8640e3db-ba15-43d0-815f-ad828b756e6d
nuggetbucket54: jimmy neutron has such a nice haircut
nuggetbucket54: it's like donkey kong's
1rre: I've gone through & made sure there's no memory leaks, but the issue is only when there's a lot of calls to that function - it could just be timing out but I'd be fairly surprised given it's C
nuggetbucket54: okay but jimmy neutron is hot
PatrickMcGinnisII: sometimes calloc only has a small buffer
PatrickMcGinnisII: depends on compiler options
PatrickMcGinnisII: put a free(dest->items); before it and rretest
1rre: Weirdly maybe the issue isn't the calloc even though it hangs there, it still hangs even if I assign a 8 item array in the struct instead of a pointer
1rre: I get double free - I initially thought it was because dest->items could be uninitialised but even if I set that to 0 for new items & free it for old ones it's the same
PatrickMcGinnisII: while(*c++);
PatrickMcGinnisII: infinite loop
1rre: yes are you dissing my c
1rre: it's classic C - the pointer is incremented after the value is taken so it's basically a "foreach char in a string" thing
1rre: I know it's pretty janky though
1rre: I've been doing too much code golf haha
PatrickMcGinnisII: it's an infinite loop
1rre: I think I'm gonna go to bed now though
1rre: Or actually after being so confident
1rre: I think in my tiredness I got it mixed up with something else oops
1rre: oh no I just forgot to set the fprintf to stderr
PatrickMcGinnisII: You should just split the string into an array, then do what you have to
PatrickMcGinnisII: ok, glhf, i super tired too
1rre: Yeah it's not an infinite loop it's cool
1rre: if I do: while(*c++) {fprintf(stderr,"%c",*c);} I get: ISH�HOPPED_STRAWBERRIES�CE_CREAM�allocated ISH�CE_CREAM�LUEBERRIES�allocated ISH�CE_CREAM�LUEBERRIES�HOPPED_STRAWBERRIES
1rre: it's mangled I know but that's because it's not meant to be read
PatrickMcGinnisII: so it goes until a 0 is reached
PatrickMcGinnisII: i get it
PatrickMcGinnisII: well at first i thought you had a variable scope issue with dest
1rre: idk seems unlikely, I think I really need some sleep for more important things though aha
PatrickMcGinnisII: can count=0?
PatrickMcGinnisII: find a better way to split the string
PatrickMcGinnisII: gl, i'm out