Marchete: (╯°□°）╯︵ ┻━┻
eulerscheZahl: (╯°□°）╯︵ ┻━┻
Marchete: Item* i = myVector;
Marchete: myVector.push_back( something);
Marchete: and now the pointer is no longer valid
Marchete: god bless f*cking C++
Allis: @Marchete That makes sense, though; growing a vector can cause a reallocation, which in turn might involve a move.
Marchete: I know it makes sense
Marchete: but in C# and similar is simpler
Marchete: also, in debug mode they should warn in some way
Marchete: the compiler should detect that something is wrong
Allis: According to https://clang.llvm.org/docs/analyzer/checkers.html#cplusplus-innerpointer-c, Clang's static analyzer can only detect invalidated pointers on std::string.
Allis: That indicates that they're aware of the issue and making it work for std::vector and other collections is a hard problem.
Marchete: well, almost a day wasted in this
Marchete: and Illedan_ dropped me in ktulu, not happy today
dbdr: Marchete: that invalid pointer is a typical example of what rust fixes in C++: https://youtu.be/lO1z-7cuRYI?t=782
Marchete: good bless smart compilers
Marchete: Rust sounds interesting, but I can't see a similar sintaxis to neither C++ or C#
Marchete: I code in c++ very similar to what I do in C# (and that's why I struggle with it), but Rust is like a new whole deal
dbdr: C# and C++ are also different, no
Marchete: but I code similarly
dbdr: yes, I see how that will lead to crashes in C++
Marchete: I mean, I do some dirty C++ that is fast, but looks like a lot to I do in C# :D
Marchete: C# is like "wow you are trying to pass a red light, I got you bro"
Marchete: and C++ is like "without brakes!!!! go brrrrrr!!!"
Marchete: I fixed my chain split, but now I need to see what is happening in border boxes
Marchete: in corners
dbdr: and https://i.redd.it/h8ewl01vtzc51.png
jacek: meh. c++ will work when you read some garbage from memory, at least for a while
jacek: so silent in here
jacek: i thought people would be more hyped
GoogleJeff: I'm totally hyped
jacek: yay silver
Thiesjoo: Nice jacek!
uvBoss: calm down dude
Simonka: *laughs in python*
jacek: the problem is you bring knife to a gun fight
Marchete: ahh Sokoban, how much I hate this game
eulerscheZahl: maybe i should have finished it before putting as WIP
eulerscheZahl: now that one use keeps commenting
Astrobytes: lol, you made Sokoban
eulerscheZahl: not finished yet
eulerscheZahl: just started this morning before playing soccer
Westicles: Ah, Sokoban. If you are looking for some with thousands of moves there are some good ones here http://sokoban-gild.com/records.cgi
eulerscheZahl: thousands of moves is a problem with the CG SDK
eulerscheZahl: except if i ask the user to issue multiple actions per turn
eulerscheZahl: and i think sokoban is better as a puzzle than optim anyways
eulerscheZahl: so it doesn't have to be too hard
Westicles: Sounds good. Incidentally, the guy behind that website claims to have the fast solver in the world, he links to it (c code) in the description
eulerscheZahl: that would make an optim pointless, wouldn't it? :D
Westicles: Yeah, for an optim I think it would have to be designing levels
eulerscheZahl: sokoban multiplayer: you get some initial board and can add walls to it
eulerscheZahl: then you solve the board of your opponent
eulerscheZahl: i'll show the door to myself. no need Marchete :D
Marchete: bender4 isn't already sokoban on steroids?
Marchete: it's not your fault
Marchete: I remember some old sokoban in CGA graphics
Marchete: and I hated it
Marchete: since then
Marchete: yeah this one
eulerscheZahl: i agree, bender and sokoban share some similarities
eulerscheZahl: and space maze
Marchete: I made this meme
Westicles: That video makes me nostalgic for Ultima IV
eulerscheZahl: damn you SDK
eulerscheZahl: BufferedGroup isn't working well with setScale
eulerscheZahl: https://prnt.sc/ugi3tl drawing an image larger than the player height (1080px) and scaling it down now there's a black bottom
Zenoscave: JBM you mad genius
Zenoscave: ALL GLORY TO EULER
Zenoscave: I knew what video would play but still I clicked it
Zenoscave: I had to be sure
eulerscheZahl: that's an old one, surprised you haven't seen it before :D
Zenoscave: I don't have enough time to check contributions these days
Zenoscave: html5 == video
Zenoscave: eulerscheZahl new optim?
Zenoscave: what's that mario-esque looking printscr
eulerscheZahl: puzzle, not optim
Zenoscave: ah interesting
Zenoscave: block pusher puzzle?
eulerscheZahl: you know sokoban, don't you?
Zenoscave: not by that name but I probably can guess the task
Zenoscave: no jacek
eulerscheZahl: now you lost me
Zenoscave: I see it now. How many levels are you porting/plan to port
eulerscheZahl: and i found a bug in the SDK
eulerscheZahl: will report it later
eulerscheZahl: codeforces has a different audience than codingame
eulerscheZahl: the unique thing here is the multiplayer section
eulerscheZahl: that's meant for a short break, nothing serious
eulerscheZahl: the normal puzzle section can be harder
eulerscheZahl: e.g. https://www.codingame.com/training/expert/space-maze
eulerscheZahl: yet if you want to practice the standard algos like you need them for ICPC, you're better placed at codeforces
eulerscheZahl: if you want interaction of your program with other programs, try one of these: https://www.codingame.com/multiplayer/bot-programming
SPDene: just switch to ruby and beat them
Hjax: part of the game is selecting the right tool for the job
Hjax: and your 3000 line template is definitely not it
SPDene: speed isn't important in reverse mode
Hjax: its clash, execution speed doesnt really matter
Hjax: if you want execution speed to matter, go play a search heavy multi
Hjax: well, obviously someone is going to use their time
Hjax: its a code golf puzzle
Hjax: finishing super fast is just a mistake
Hjax: it does in the other modes
SPDene: I'm not sure you understand the criteria for winningshortest. It's about the number of characters in your code. speed isn't important
Hjax: reverse and fastest care about how quickly you answer
Hjax: shortest cares about code size
Hjax: if possible
Astrobytes: I've seen a lot on CG but a 3000 line template for shortest CoC is a first :D
Hjax: lol agreed
eulerscheZahl: be careful about the 100k char limit
eulerscheZahl: are the others still playing?
eulerscheZahl: then you might still drop
Astrobytes: Gotta use the right tools for the job, and pay attention too ;)
Astrobytes: lesson learned!
eulerscheZahl: i don't think so
eulerscheZahl: usually Ruby is a bit shorter
eulerscheZahl: oh, then you can improve it
Hjax: you can do tricks like
Hjax: a(), a(), a()
Hjax: code golf often makes me wish "lambda" was a shorter word
eulerscheZahl: oh, it's 3 lines, not 1 lines with 3 numbers
eulerscheZahl: some users learned python or ruby just for golfing
eulerscheZahl: others learned C++ for the bot section
eulerscheZahl: nowadays i'm mostly doing contests and idling in the chat when there is no contest
Hjax: euler is frequently #1 on this site
Hjax: although it seems royale has passed him again
eulerscheZahl: click the ranking
Hjax: mostly bot programming and contests
eulerscheZahl: then you see the score for each category (you can further expand them)
eulerscheZahl: no. sometimes they take a bit to update
Astrobytes: only if there are too few human players
eulerscheZahl: the top few are bots (with 40k+ games)
eulerscheZahl: about the bots: https://www.codingame.com/blog/clash-of-code-time-has-come-for-clash/
Astrobytes: (I let you do that btw, not feeling fast today :P )
Hjax: most of them
Hjax: oh scroll
eulerscheZahl: somehow that's what I was expecting Astrobytes :D
Q12: How to limit the run time of program? like that the player would not be able to run a program that her run time is bigger than the limit, in contribution
eulerscheZahl: are you talking about SDK contributions or classic input-output based?
Q12: I don't know what is SDK I'm taking about an easy puzzle
eulerscheZahl: with any animations or alike?
eulerscheZahl: you have to take what CG offers you then
eulerscheZahl: which is 1s to produce some output
jacek: 3. take it or leave it
Q12: Thanks eulerscheZahl
eulerscheZahl: after that 1s the user program is terminated and it's counted as wrong answer
Q12: So I can just make the input bigger and it would do the same right?
Astrobytes: I guess if it's an efficiency thing you could make a larger test case of some arbitrary size that should be solvable in less than 1s
Q12: its like limit the run time
Astrobytes: you can always make a private clash and choose the mode + language
geppoz: hint: learn 2 languages, one for short, one for fast
geppoz: for me pytohn short, js fast
geppoz: fast to solve problems, not to execute
BitThief: python shortest, python or js for fast
codeing: what are you think about this code ?
codeing: look there.
eulerscheZahl: what's in that zip? just a code file?
eulerscheZahl: won't download it, too much effort
codeing: a java project in zip file.
codeing: this selection sort.
codeing: with* selection sort.
codeing: does this algo optimal ?
eulerscheZahl: regarding runtime? selection sort is never optimal
geppoz: ruby question:
geppoz: in IDE it seems gets strips the trailing LF
geppoz: in my environment seems not...
geppoz: *I mean the instruction "gets"
eulerscheZahl: C# answer: Console.ReadLine strips the LF
AntiSquid: why share a zip in chat though? you can upload to pastebin or github or whatever ...
eulerscheZahl: or even paste it here
eulerscheZahl: which is why i refused to open it
AntiSquid: might be multiple files
eulerscheZahl: let's just say i'm not in a mood to clear my download folder afterwards
AntiSquid: what if someone wants to play CTF on CG though? :P
codeing: i get it @AntiSquid
eulerscheZahl: quick question: is it me or do you get a board like this? https://prnt.sc/ugmmgj
eulerscheZahl: i'm utterly confused
eulerscheZahl: seemed fine in testing. when i saved it, i got that nonsense
eulerscheZahl: oh, I think I understand what's going on: there must be some caching in the testcases. I changed the input format. If my new parser tries to read the old files, it will be something like this
eulerscheZahl: does that count as an SDK bug?
AntiSquid: ever test
eulerscheZahl: it's sokoban
eulerscheZahl: you can play it here (and on many other websites) https://sokoban.info/
eulerscheZahl: thanks AntiSquid. I reported it on discord, will move it to github
AntiSquid: every * Q_Q
eulerscheZahl: the maps in the old format start with width height
eulerscheZahl: and the new parser assumes a single line and assumes that anything >= 6 is a pusher
eulerscheZahl: as width and height both are, you get 2 of them :D
eulerscheZahl: if you download and reupload my zip file, it should be working fine
Zenoscave: eulerscheZahl do you have your A*C highscores written somewhere?
Zenoscave: not the solutions just the scores
PatrickMcGinnisII: OMG, Garbage Balls everywhere
Hjax: 0.02 above the boss, nice
MadKnight: what game Hjax ?
itzblinkzy: @myNickName01 thanks for sharing your code im fairly new to this
myNickName01: i haven't played in months
Hjax: @MadKnight Code of Kutulu
Hjax: playing the unofficial contest
Hjax: im mid gold right now
blasterpoard: I'm looking at new kutulu legend games right now; people still don't spam light properly
Hjax: my bot is super bad right now, im surprised its gold
blasterpoard: you can get to gold while ignoring slashers
Hjax: i told my bot to try to avoid standing on their line of sight
Hjax: but that was it
Hjax: its not aware of their timers or states at all
blasterpoard: that's better than almost anyone in silver
Hjax: my scoring is awful, my bot walks into danger a lot
blasterpoard: what kind of danger?
blasterpoard: getting surrounded or missing unavoidable damage at depth 1-2?
Hjax: wanderers mostly
Hjax: it will see wanderers on both sides and not realize it can slip through
Hjax: sometimes it just stands still or turns around and walks into a wanderer :D
blasterpoard: voronoi turned out to be a good heuristic for avoiding getting boxed in
blasterpoard: and some sort of a simulation that is just a couple of turns deep is nice to have
Hjax: yeah i dont have any sort of sim
Hjax: i just have a trash heuristic that scores all legal moves
blasterpoard: I think depth 5 was good because of slasher phases
blasterpoard: *good enough
Hjax: and picks whatever optimizes its scoring function best
Hjax: but the scoring function isnt particularly good
blasterpoard: that can get far enough too; that's how my bot at rank 6 works
Hjax: i need some way better heuristics if i want this method to work without a search
Hjax: its hard to strike a balance of avoiding wanderers and being near other explorers
blasterpoard: aren't the other explorers avoiding wanderers too though?
Hjax: not really
blasterpoard: avoiding wanderers and staying with the others should be the same thing
Hjax: i die alone while everyone else eats wanderers
blasterpoard: you don't need to follow everyone, just someone
blasterpoard: yes, both your bot and blue bot play badly, but the correct way to play that map is to just go to the closest explorer
blasterpoard: and whenever it's "2v2", keep spamming light as much as possible
Hjax: i feel like light is less of a concern than how trash my movement is
blasterpoard: light is important
blasterpoard: I posted a reaply a while back
Hjax: i saw it
blasterpoard: simply make sure to go to whoever is closest in the early game, and if multiple people are equally distant from you, go to the one that's closer to your position 1 turn back
blasterpoard: that's the best you can do for first ~6 turns
Hjax: well that is better
blasterpoard: yes, that's how you should do it
blasterpoard: even if blue wasn't very cooperative
Hjax: my bot doesnt really know how to avoid slashers if they are near it
blasterpoard: just note that light lasts longer than 2 turns
blasterpoard: you need sim for that
Hjax: it didnt want to leave blue
Hjax: but blue didnt want to leave the slahers
blasterpoard: don't worry about that, bots higher up on the leaderboard will play along more
Hjax: what do you mean light lasts longer than 2 turns?
blasterpoard: you keep cancelling one light with another
Hjax: doesnt look like it
Hjax: i have light for 6 turns
Hjax: each light lasts for 2
blasterpoard: ok, then I must be misremembering
blasterpoard: it's plan that lasts 4
Hjax: i should probably only light if theres a wanderer thats path would be affected by it
blasterpoard: yes, and you used it too soon and took extra isolation dmg because of it
Hjax: theres no correct answer to that question
Hjax: make your bot better and it will win
Hjax: bot multis are by design very open ended
Hjax: you can look at the forums for ideas on different strategies you can use
Hjax: but theres no right answer
my massive fail
AnyaA: clash od code = i suck
Bassel: You just need to be fast
AnyaA: I can't even do white man!
Bassel: This task isn't that trivial
Bassel: Practice makes difference
AnyaA: i know
Bassel: Some weird tasks