YCS-Venom: There is no bots i think
Allis: @YCS-Venom If you go to the Clash leaderboard and sort by clashes descending, the first 11 users are bots implemented by CodinGame.
Allis: The idea being that you can always get a Clash going even if nobody's awake.
Murleys: Anyone else found that they don't really get fastest code all that much? I pretty much get 90% of the time shortest code or reverse, is their a way we can set our preference?
Uljahn: Murleys: i guess it's possible for private clashes only, not for regular ones
Murleys: UIjahn: ah dam that sucks, I hate doing the shortest code challenges in C# ...
DaNinja: CG saves a history of your code every time you hit Submit or Test in Arena
Alshock: it has nothing to do with idiocy
Alshock: What problem do you have with that puzzle OmerDrk ? Is it too slow? Or do you not see a way to do it?
MSmits: Hipip I don't know you're doing, but you've obviously only seen a tiny bit of this site
MSmits: I am guessing you played a clash and the type was code golf
MSmits: one of 3 possible types (you can't control which you get)
MSmits: there's more fun to be had in the bot programming section
MSmits: but that will take a bit more time
jacek: so windy so rainy
jacek: maybe in clashes
Einwickler: I would even say that's really only for clashes and code golf puzzles.
MSmits: just told you on my last message :)
MSmits: it's the best thing on CG
MSmits: many games to choose from
MSmits: much ai :poop:
MSmits: many people active on this chat are high ranked
MSmits: eulerscheZahl is here every day almost
MSmits: he is ranked 1
MSmits: unless he's not, sometimes he's 2
MSmits: you quickly gain rank when doing bot programming
MSmits: doesnt really matter which game, just pick something you like
MSmits: not really
MSmits: i am basic at python
MSmits: probably my best language is C# but only intermediatre there
DaNinja: justacoder check Results > History
MSmits: that plays into bot programming and optimization
MSmits: your speed
MSmits: thats why in many bot programming games, the top is c++ or rust or similar
MSmits: not all though
MSmits: some are mostly smart heuristics and require no speed
MSmits: well i should clarify, in many bot games the top is c++ because the top players are used to this language, it doesnt always necessarily mean its best for that game
MSmits: in bot programming, python is still used a lot
MSmits: it's just when you get ranked high in some games, performance starts to really matter
MSmits: not exactly
MSmits: python is the scripting language used fo rit
MSmits: at the back, compiled stuff is running that might have been coded in C++ or similar
MSmits: but most people don't touch that part
MSmits: we have machine learning here too
MSmits: the top 4 in oware abapa are all neural networks
MSmits: also top 5 (I believe) in coder strikes back
MSmits: but it's not easy to make it work here due to code size limit
MSmits: thats usually python and ruby
MSmits: because you code faster in it and it takes less characters
MSmits: i try to use python in clashes, but i am pretty mediocre at it
MSmits: can be better than 500 prolly
MSmits: but each language has its tricks
MSmits: can be useful sometimes
MSmits: trees for sure
MSmits: for boardgames it's almost always minimax, or mcts or related
MSmits: I focus a lot on boardgames, because it's more fun to me
MSmits: less code to simulate the game, so it's more about coding a search algorithm
MSmits: some games are really complicated and take like 500 lines of code just to simulate
MSmits: i am a physics teacher studying to be a CS teacher
MSmits: master of astrophysics, many years ago
MSmits: you too, you can always ask questions here, sometimes you won't get a response, depends on the time of day
Einwickler: MSmits talking about minimax and board games: do you have any recommendation for a reference to get started with it?
MSmits: google is full of all sorts of tutorials for it, it's really easy to find. As for a game to use it on: Try a simple board game. Might be less flashy and fun for you, but it does away with a lot of the unnecessary bits to learn the algo
MSmits: try ultimate tic tac toe
MSmits: try to test the algorithm before you get to bronze (dont submit or you will be promoted)
Einwickler: why is that?
MSmits: in bronze it goes from 3x3 to 9x9, a bit more complicated to simulate
Einwickler: ahh okay
MSmits: it's not really hard, but a bit of a hassle if all you're looking to do is learn minimax
MSmits: so just try "play my code"
MSmits: good enough to test it
Einwickler: Yeah I guess Ill have to to improve in onitama someday. Got place 71 in wood 1 and its really fun but I fully ignored minimax and just wrote some basic decision making
MSmits: btw, once you know minimax, really consider switching to negamax. It's cleaner, same functionality for half the code
MSmits: but conceptually slightly harder
MSmits: yeah minimax works great in onitama
Einwickler: So you would definitely recommend going for minmax first though?
MSmits: you will just have some duplicate code due to: if player == 0 then
MSmits: else ...
MSmits: negamax runs from the perspective of the player whose turn it is, minimax has to do the if on every iteration
MSmits: once you got negamax and minimax down, quickly move to ab pruning, which makes you search a lot deeper
Einwickler: But the basic idea of both is to calculate possible moves right? So only the decision made based on that data is different?
Einwickler: Or do they even make the same choices but negamax code is smaller?
MSmits: negamax makes the same choices as minimax probably, they are equally fast
MSmits: ab pruning may make a different choice because it searches deeper
MSmits: but if it does make a different choice, it is very likely a better one
MSmits: negamax is simply more elegantly coded, but a little more obscured
MSmits: btw, ab pruning is an enhancement to both negamax or minimax, doesnt matter
Einwickler: alright that should be enought to start with. Thank you for the great help as always ;)
MSmits: np :)
jacek: for starters, just pick up a game, make function that lists all available moves, make function doMove(), undoMove() and end conditions and youre there
MSmits: yeah you have to do that, that's why you pick a simple game to start with
Einwickler: Wait dbdr submit his solution for tic-tac-toe in Java? I always thought he does nearly everything in Rust :scream:
dbdr: I started rust 1.5 years ago
MSmits: java is a much slower language, so that result is quite good Einwickler
MSmits: my first version was in C#
dbdr: not that much slower, still compiled to native code at runtime
dbdr: 1.5 to 2 times slower, roughly
MSmits: my experience with C# is 2-3x slower for similar code
jacek: depending on object allocation
MSmits: yeah i use object pools, even in C# if i can
Einwickler: Dont get me wrong I wouldn't dare to say its a bad solution. I was just surprised to see a solution from dbdr on the leaderboard thats not written in rust
MSmits: ah yeah
dbdr: you can tell it's an old one, that's all
MSmits: you can always go back dbdr
dbdr: I think the submit date does not match it, I had to resubmit because of a Java upgrade
MSmits: it's probably less than a days work
dbdr: a day for doing what?
dbdr: from Java to Rust?
dbdr: yeah, I will do it eventually :)
MSmits: you'll get sidetracked of course. At first you'll want to convert directly, then you will notice all sorts of possibilities java doesnt have and...
dbdr: well, you can use the new langage feature, but still aim for identical behaviour first
dbdr: nice for testing
MSmits: yeah thats true
MSmits: i took a detour
dbdr: language features mostly help for performance
MSmits: was working on endgame database for checkers
dbdr: behaviour changes is a different beast
jacek: d&b almost tripled this week
MSmits: then got more into retrograde analysis and now I have an endgame book for Bandas :P
dbdr: oh? that's why I got CPs then :)
dbdr: despite losing the #1 in it
dbdr: wow, 140 in d&b :O
MSmits: i should go back soon
MSmits: but bandas is so fun
jacek: detronize thay random guy
MSmits: I thought you worshipped him?
dbdr: d&b is a headache begging to happen :D
MSmits: now he is a random guy :(
dbdr: the random god religion :)
jacek: random guy... it fits the mcts inventor
MSmits: oh right
MSmits: the "random" guy
MSmits: I'm sure they said that about people when mcts was coming up
Shadowtick: morning everyone
MSmits: like when quantum mechanics was coming up
Shadowtick: what did I walk into?
MSmits: "code does not play dice"
MSmits: wrong closet
Shadowtick: @_@ im confused
MSmits: it happens
MSmits: try :confused:
Shadowtick: can someone tell me what is happening
dbdr: Einwickler: for a fixed depth, minimax, negamax and alphabeta should all return the same result
jacek: my first attempt at meme https://i.imgflip.com/4igpds.jpg
Einwickler: dbdr but they differ on the max depth they can reach?
MSmits: right Einwickler, ab pruning will just take less time in that instance
MSmits: in a set amount of time yes Einwickler
dbdr: yes, because ab is faster, you can make it go deeper
Einwickler: Ah yea that makes sense
MSmits: all those algo's will solve the game when given enough time
dbdr: often more than the age of the universe though :)
MSmits: not if he starts with uttt wood
dbdr: except near the endgame
dbdr: ttt starts near the endgame ;)
MSmits: quite a few games on CG are solvable halfway through
dbdr: yeah, like othello
MSmits: Bandas, Onitama, othello, yavalath
MSmits: if you make a wrong move, yavalath is solvable at ply 2 :P
jacek: oware "v
dbdr: unultimate uttt ;)
dbdr: that's like a virgin bloodymary
MSmits: print(xmid,ymid) will work
Shadowtick: ... ok imma go
MSmits: i think that inserts a space
dbdr: but using + should also be find
jacek: unless xmid ymid are ints
MSmits: what will that even do?
MSmits: python is weird with type conversion
dbdr: does CG have fstrings?
MSmits: I did a bitboard in python once. It was a huge pain
dbdr: python 3.6 I think
GuyShtiler: INPUT: http://chat.codingame.com/pastebin/d12a5932-e79c-4c1e-8524-d6e42991eef1
MSmits: damn still not fixed?
MSmits: they need to get on the job
dbdr: MSmits: coding a bitboard in python is like running a marathon in a suit ;)
MSmits: so you're stuck in traffic and late for a meeting. It happens
Shadowtick: ... I made a special p5.js project for this website
MSmits: dump the car and start running
Shadowtick: but Idk if the code will work in here
MSmits: then they are probably not floats
MSmits: err ints
MSmits: like dbdr says, convert to int first
MSmits: somewhere in your calculation, python saw fit to make your number a float
MSmits: you can do //2
MSmits: integer division
jacek: then 3.5 will fail
MSmits: if he's sure they are even numbers
MSmits: that could work
MSmits: or before you divide, do x & 1 == 0
dbdr: GuyShtiler: for this kind of question, just try it
MSmits: pastebin doesnt work
MSmits: it's annoying :(
MSmits: hmm conditional typecasting
MSmits: that seems iffy
jacek: if its ehole number then make it int
MSmits: a simpler thing you can do is this
MSmits: convert to string, check if it contains a dot, then cut off the last 2 characters
jacek: so simple *.*
MSmits: dot and zero
MSmits: does that happen too?
MSmits: allright then check if it has a dot and if everything right of the dot is a zero
MSmits: f = 1.23
MSmits: f_i = 100.0
Scarfield: MSmits still here? :)
icecream17: well... what do you know about coding
MadKnight: var game = new Game();
MadKnight: i thought it was trivial
Metanoob: ah, what kind of game do you want to make? Game with only text, 2d graphics, 3d graphics?
Metanoob: Ok, are you familiar with any programming language at the moment?
The_Auditor: you'll have to learn the basics of programming first
Metanoob: Although you can learn a language at the same times as learning how to make a game, it is good to at least have some basics in the language of your choice. Do you have an idea of what language you would like to learn?
The_Auditor: it's like: "who to write a book?" "Do you know how to write sentences?"
Metanoob: Great! nice one icecream
The_Auditor: i'm a game player
icecream17: i mean, it's possible but not really...
Metanoob: I did make a few games, however nothing worth playing :)
Metanoob: The_Auditor ruthless :stuck_out_tongue:
Metanoob: but also a very good link
icecream17: oh i think my last link was pretty bad looking at it
The_Auditor: i programed in pascal/delphi about 20 years ago, neadless to say i forgot most of it. so when i tried to solve a puzzle using pascal all i needed was google
pluieciel: I think Codecombat is nice for beginners
The_Auditor: seconded Codecombat
Scarfield: could be that either you dont read all the input :p or you print more than one output the same turn?
Scarfield: i think the most likely cause is that you for some reason are printing more than once the same turn. doing that will give you the same error as not reading all the input asfaik. probably some weird edge case that isnt clear. As for the sometimes works sometimes not, are you doing some search with a timelimit?
eulerscheZahl: while (timer < 50ms) continueSearch()
Scarfield: looking through the posible options ( i havent done that puzzle btw) untill no more time left
Scarfield: if that is the case, the timer limit could be too large, and sometimes timeout
Scarfield: nice, thats one issue cause found :)
Majeck: Flat_Erick I know I'm a little late but in python you can do:
Majeck: import time
Majeck: start = time.time()
Majeck: # Rest of code...
Majeck: time_elapsed = time.time() - start
Majeck: Got there too late hahaha
Majeck: What puzzle?
Unkmar: What if I choose to ONLY solve puzzles?
The_Auditor: all power to you !
The_Auditor: i don't like code golf, so i don't do it
LastRick: That's favorite thing to do here as well. Slowly working my way through all the puzzles
Astrobytes: feel free, plenty people do. Just do what you enjoy.
Unkmar: I'm not here for fun. I'm only here to learn and possible viability of getting a job.
Astrobytes: Alright then. My apologies.
Einwickler: Unkmar why not both?
Astrobytes: You won't learn much here per se, you have to learn elsewhere for the most part and apply it here
Astrobytes: As for getting a job... well
MSmits: here you become motivated to learn. But personally, just asking stuff on chat here taught me alot
Astrobytes: Yes, chat can be truly incredible sometimes from a learning persepctive
Astrobytes: MSmits taught me loads
MSmits: thanks :)
Astrobytes: You're most welcome
jacek: yeah, here's no fun, only work.
Astrobytes: We all clock in at the same time and commit to 8-12 hours of rigorous CGing
jacek: those are rookie numbers
The_Auditor: @Astrobytes are you kidding?
Astrobytes: The_Auditor: of course ;)
MSmits: some days are like that for me though
The_Auditor: yeah, some days . . . his message implied every day
MSmits: well in a perfect world, he would be right
Astrobytes: lol indeed
The_Auditor: in a perferct world, i wouldn't have to do anything else and would spend all my time here
MSmits: that was my point
Astrobytes: Just highlighting that most CG users regard the site as fun/enjoyment with a healthy dose of learning
MSmits: but some have found their careers here
Astrobytes: A couple, yes
Astrobytes: *A few
MSmits: you could argue I have as well. Even though it's teaching and not coding
Astrobytes: Yes, was about to say that actually :)
Astrobytes: I guess there's a few people who have perhaps switched careers as a result of using CG
MSmits: I know, I was just trying to preserve your keyboard. I have a spare one
jacek: i realized maybe i should switch to machine learning job instead of making shitty apps for android
MSmits: mmh you could also make great apps for android
Astrobytes: Could be a good switch
Astrobytes: Depends on the job
jacek: though probably i would need to learn properly, with... math
The_Auditor: do you find that current interface on CG is not conducive to ML
Astrobytes: all those squiggles jacek
MSmits: The_Auditor ML in CG is a bug that was turned into a feature by players
MSmits: definitely not conducive to ML
jacek: well ML is associated with python
The_Auditor: like, i can't easily run a genetic ML
The_Auditor: unless i reimplement the runner myself
jacek: but there is not ml libraries here and CG has very hard limit on code size and execution
Shadowtick: I broke my minecraft
jacek: i had to implement NN for some bots myself and it turned out quite good
Shadowtick: I cant see the buttons to it anymore
Shadowtick: no play button or anything
The_Auditor: any chance to add an API to CG to make it ML friendly ?
Astrobytes: Feel free to suggest in the forum The_Auditor
Astrobytes: Everyone uses the unofficial API to download replay data and such currently
MSmits: argh... I hate this. I have a bugged bot in Bandas that is near nr 1... if I fix it I can barely reach 7
Astrobytes: ICanCode: that site has solutions to puzzles on this site. I don't recommend copying and pasting
The_Auditor: say, the Ice and Fire runner is not containing any secrets, i guess, is it public? or can it be made public?
jacek: you mean the referee?
Astrobytes: The referee is available for all multis
The_Auditor: where ? how?
Astrobytes: There's a link to a github repo in the statement usually
The_Auditor: yaya ! weekend gone !
Shadowtick: can you code in minecraft by anychance?
Astrobytes: you might wanna skip that one and google hexadecimal
Shadowtick: Idk how
Shadowtick: but I do have it so we could play some among us
Einwickler: Alphaloc you there?
Shadowtick: ICanCode I am gonna send you a message
Alphaloc: I am
Astrobytes: Nope. We're all totally incompetent.
Einwickler: Would you explain your solution on the clash we just played?
Einwickler: Is it just the dif between highest and lowest index of '#'?
The_Auditor: if i knew to code very well, why would i be on a site to learn coding ?
jacek: whats with the among us? all memes sites are full of it
Astrobytes: Some new garbage that kids are playing on their mobiles I presume
**Astrobytes exits old man mode
jacek: ok boomer
The_Auditor: ICanCode do you want to make a replica of Among Us or does the Among Us have a way to program the player actions?
MSmits: you do realize we cant see those pastes...
Einwickler: Are you really just asking for a solution in world chat while being in a clash? :thinking:
Astrobytes: random12313: try looking at other people's solutions if they shared the code rather than flooding the chat, or message them
Astrobytes: I have no wish to marry crismas, whoever she is
Astrobytes: ICanCode: stop repeating the same questions
Astrobytes: hi JBM
Astrobytes: Same old crap, different day. Yourself?
Astrobytes: Yeah, naming changed over the years for a couple of 'em
Astrobytes: What's the other contrib other than TvC?
Astrobytes: Oh wait , the esolang one
Astrobytes: Why are you stuck?
jacek: youre not gonna push further the TvC?
Astrobytes: Hey, there's no rush on a WIP
Astrobytes: as for TvC, longer the better. I grin everytime I see it
Astrobytes: lol, such exclusion
Astrobytes: It's (iirc) a college in Nepal that's affiliated with another in London (Metropolitan?)
Astrobytes: Never let it be said that JBM bears any grudges :P
Astrobytes: Anyways, I'm out early. Need to pet my cat then play some music (rediscovered my guitar)
Astrobytes: That was my issue, kept looking at it and not playing it
Astrobytes: It's a struggle motivation-wise but once I'm doing it I'm alright
Astrobytes: Ah damn, that sucks pretty majorly
Astrobytes: Right. Cat petted. I'm out. Goodnight JBM and take care
MSmits: just try it and get better :)
Scarfield: hey MSmits, if you have a monomolecular layer of some material, wouldnt it technically only be 1 surface, but with 2 sides?
jacek: physics? :scream:
MSmits: not if they were molecules
Einwickler: Oh wow now we are getting kind of philiosophical here :D
MSmits: maybe if they were elementary point particles
MSmits: molecules still have sides
Shadowtick: ya yeet imma go now
Shadowtick: hope you all have a great week
MSmits: you too
Shadowtick: I will try but I cant guareenty because I might have more panic attacks from school
MSmits: please dont panic trying to spell guarantee
Scarfield: yea, but if you were to calculate the surface energy, there is only that 1 layer, and i guess you could technically say it only has 1 surface
MSmits: what surface energy?
MSmits: do you mean the bindings between the molecules?
Scarfield: well yea, there wouldnt really be surface tension without other "layers"
Shadowtick: alright I better go before I do while I try figuring out what is happening
MSmits: in that sense there is one layer and if that is your defining characteristic of having a surface then sure
MSmits: surfaces don't have to be flat
MSmits: they can curve and form a sphere
MSmits: the molecular bindings will have an angle
MSmits: then sides matter
MSmits: Scarfield you're freaking people out it seems :P
Shadowtick: ok I am back but only because I forgot that I needed help with something
MSmits: https://www.codingame.com/share-replay/493060760 solved this as a loss on frame 12. Opponent made a mistake on frame 17, solved as a win on frame 18. Gotta love those endgame books :)
MSmits: the one who ranked first is pretty damned good
MSmits: and made the most games :P
Einwickler: Who are you refering to?
MSmits: we have community created bot games and optimization arena's.
MSmits: if having a great idea is intelligence, then yes
MSmits: I agree :)
Einwickler: Ouch :'D
MSmits: any :)
Hjax: all glory to the hypnotoad
MSmits: murder jar?
Einwickler: Gotta love MSmits taste of humor :joy:
MSmits: we try
MSmits: it gets worse later at night
Hjax: oh the chat in the evenings US time gets awful sometimes
Hjax: no moderators around
Hjax: its not like you are uploading much code, i think theres a few different machines doing the game running
MSmits: no idea sorry. This is another of those things euler could tell you about
Hjax: ? easy there buddy
MSmits: you just said there are no moderators
MSmits: you woke the beast
The_Auditor: does Automaton2000 learn from all message, even the censored ones?
Automaton2000: oh, i had a good bot
Majeck: Automaton2000 can you say a curse word?
Automaton2000: i wanted to see if i can figure it out with a good heuristic
Majeck: What heuristic would that be Automaton2000?
Automaton2000: any suggestions on how to get to the real world
Majeck: I don't know maybe AutomatonNN knows?
Majeck: Can you help Automaton2000 get to the real world AutomatonNN?
AutomatonNN: without the other time
Automaton2000: why did you say you use.
Automaton2000: ah i didn't know you could do the same in java and python
Metanoob: Automaton2000 yes you can, ask AutomatonNN
AutomatonNN: wood 2
Automaton2000: i did, i also deleted cookies and cleared cache
Allis: Get better at coding? :P
CyanRook: It's mostly just typing
CyanRook: Also if you want to win in shortest, learn ruby
Allis: It's a great language.
CyanRook: You can reach top 10 with python and python is probably better for jobs. But if you want to be number 1, you probably need ruby
Allis: Ruby used to be really good for jobs, and it's still okay, but it's definitely fallen off, which is sad.
CyanRook: Theres a few firms popping up in the DC area that are ruby shops
Allis: That's good to hear. I don't think the language will ever completely disappear, but it has to be said that it occupies comparatively few niches.
Allis: Its "programmer happiness" metric is off the charts, but that's not terribly marketable.
CyanRook: I'm too lazy to learn ruby unless someone is going to pay me :D, so I just do python
Allis: Python's cool too, but everything that's not Ruby just feels like C to me.
Allis: They're both general-purpose languages that are good for people of any level of expertise, depending on what they're trying to get done.
CyanRook: ^ true
CyanRook: my day job is actually in rust, but knew python from previous jobs
CyanRook: Rust is not a good language for competitive programming hahaha
Allis: Why are you eleven?
Allis: I heard you each time.
Laminator: FR, I had a friend who was obsessed with programming when we were in middle school. He works at Apple now.
Laminator: You can do both
Laminator: I'm actually at a crossroads between data engineering and full stack development lol
Laminator: They can, they just end up poor
Metanoob: but they are part of the world, so by changing themselves... they change the world I guess
Metanoob: nevermind me I'm too sleepy. going offline, cya CG
Allis: Aren't you eleven?
Allis: Well done.
Laminator: I haven't gotten a new computer in several years now
Harrogin: allis how did you find "scale" on that last clash?
KiwiTae: Laminator i dont have a computer
Allis: @Harrogin It was the number of digits after the separator.
Allis: Use Whitespace.
Allis: It's good for the environment.
Laminator: a lot of competitive programmers use c++
Laminator: I think it's for the speed more than anything
Laminator: like process speed, not coding speed
Harrogin: @allis oh i was making it more complicated tha\n it needed to be
Harrogin: i thought scale was the the number of digits which was of greater size than the other side of separator
Harrogin: which wouldn't be too hard now that I think of it again
Laminator: You'll soon come to find out that everyone likes pizza
Allis: Stop right there.
Allis: I was born this way. XD