Chat:World/2021-01-12

From CG community
Jump to navigation Jump to search

Salted: Can someone help me understand some ruby? I'm new to the language.

Salted: Would anyone like to, I mean.

Salted: In python

Salted: y = [3 if i == 'a' else 1 for i in 'aba']

Salted: How do I do the same in ruby?

Salted: I tried 'abc'.map do |x| but I'm not sure that's the right way to do this

Crafterz125: Im Java,sorry

Salted: No worries!

Megha.Akash: Salted you can do this y='abc'.chars.map{|x|x[?a]?3:1}

Salted: oh nice!

Salted: Thanks! You really are awesome at ruby.

Megha.Akash: Thanks Salted :)

VizGhar: .chars? wow :) I've used .split() until now

Vigasaurus: yeah ruby is absolutely silly for shortest

Default avatar.png sirhc001: hey everyone !

Salted: hi

Default avatar.png sirhc001: hows it going?

Salted: Just struggling to learning new things. You?

z64555: Anybody know the API used to do custom draws on the screen? Some of the CSB runs have their bots drawing where their targets are

DaNinja: turn on Debug with the cog wheel

z64555: so its just specific to CSB then

DaNinja: yes

z64555: welp

z64555: ty

jacek: good morning

jacek: sci-hub not working? :c

wlesavo: jacek use this mirror https://sci-hub.do/

jacek: the site itself works, but errors when you put some link

wlesavo: oh i see

Astrobytes: yeah, same. Donno what's up with it.

jacek: and im not gonna pay for paper like msmits

Westicles: ooh, that looks shady

wlesavo: jacek which paper btw

jacek: i try this https://www.researchgate.net/publication/303760000_Scan_wins_draughts_tournament

Astrobytes: try googling it, you can sometimes find pdfs just sitting there, even when another site wants to make you pay

wlesavo: jacek works for me just by doi in scihub

Astrobytes: confirmed

wlesavo: and it is just some weird thesesis for a conference, not worth looking into

jacek: oh?

jacek: its 1 page

wlesavo: yeah, not a paper

jacek: and they want $$$ for this

jacek: :unamused:

Westicles: Wow, I would have figured academic types would be against that. What if you write a book?

BlaiseEbuth: Hadn't Sci-hub been killed by a massive provider embargo?

jacek: well its from that jounral 10.3233/ICG-2015-38401

wlesavo: Westicles well against paying or against scihub?

Westicles: Against intellectual property theft

jacek: oO

BlaiseEbuth: lel

wlesavo: nah, most people are for free access, you dont get any money for youre paper anyway

Astrobytes: Yep. Journals are mostly a disgrace.

wlesavo: and you pay around 1k$ for publishing in good open access journakls like nature or scirep

Astrobytes: Lots of researchers now publish in other places so as to keep the papers available.

BlaiseEbuth: A real mafia...

Astrobytes: Yes wlesavo, for no real benefit other than theirs.

Westicles: What about books?

Astrobytes: Don't think you get books on scihub

Astrobytes: I mean, when you need a book you buy it.

wlesavo: usually you wont sell anything also, very narrow range of people is interested, and you will give them your book anyway. and yeah, almost no books on scihub, you have genlib for that

Westicles: oh, there a separate site for stealing books :P

Westicles: And people wonder why nobody makes new music

Astrobytes: Meh. I always prefer real books. Can't do more than a few pages of a pdf.

Astrobytes: Also, books smell nice.

Westicles: I gave my nephew a copy of the Feynman lectures, and he looked at me like I was crazy

Astrobytes: Kids really don't do books now?

Westicles: Not so much

jacek: :c

philRG: there is one thing to read books, the other think is to understand what is inside

BlaiseEbuth: words ? pages ? chapters ?

jacek: yes

Uljahn: i guess that's what you get for developing a 'clip thinking' when a book doesn't fit your attention span :shrug:

Default avatar.png Website_Display_Name: yep, my attention span is about 5 minutes lol

Default avatar.png Passifi: mine has dipped a lot too in the last year, but it tends too bounce back when I force myself through some old media books movies games the ability to take it slow comes back :)

Default avatar.png Passifi: however I wonder whether that is true if you never had that ability to begin with...

Default avatar.png Website_Display_Name: first time ive been on this site

Default avatar.png Website_Display_Name: but some of the question prompts are confusing as hell to understand compared to hackerrank

Uljahn: overcoming the confusion could be seen as a good practice :)

Default avatar.png Passifi: I think understanding the problem is the most important part of solving it :)

Uljahn: i guess some puzzles were originally written in french and then translated to english, which could add to the confusion :slight_smile:

Default avatar.png Passifi: is this site originally a french enterprise ?

Uljahn: yep

Westicles: Thankfully the world will eventually just speak English, so these things will be cleared up

Uljahn: or chinese :smirk:

Default avatar.png Passifi: There is plenty of potential to misunderstand things in English think of a program that is supposed to add sell you chips :)

Default avatar.png Passifi: All the world spoke french in the past just to come full circle and that didn't go anywhere for the french either ;)

Default avatar.png souta_1326: Is there a limit to the number of bytes in a test case?

Uljahn: are you making a contribution?

Default avatar.png souta_1326: yes

Uljahn: from discord: "we've increased the max limit of a contribution statement from 3k to 5k characters"

Uljahn: i guess it includes testcases

Default avatar.png souta_1326: okay

jrke: oh just noticed new feature upvote and downvote feature gets disable for own contribution or own solution

Westicles: :innocent:

derjack: :thinking:

tobakudan: I'm trying the rod cutting problem, this week's community puzzle, in Python. Solved all but the last test case, which times out. My solution looks clean and I can't find any way to optimize it. Would love if someone could help me see my blind spot

tobakudan: Here's the code: https://pastebin.com/FRyfZGCp

MaxoozX: Hi tobakudan, I'm currently experimenting the same issue, some people told me to look at the labels of the puzzle

tobakudan: The labels? I excluded the lengths that are greater than the length of the whole rod, if that's what you're referring to

Westicles: I think he means memoization and DP

jacek: you need something smarter than bruteforce

jacek: maybe even... math

wlesavo: how dare you

Default avatar.png UnnamedCodinGamer: what is the point in having marketable pieces longer than the rod itself in the input?

wlesavo: Westicles just noticed, your xp got nerfed?

Westicles: I donated it to the french foreign legion

Westicles: UnnamedCodinGamer, no point

Default avatar.png derp22: Interesting, failed the last 2 test cases of the weekly challenge but got 100% on the scored ones

tobakudan: It's not brute force. Already tried memoization, but switched to a non-recursive solution that's faster

Default avatar.png Abdulrahman_98: hello world

salmon: You may ignore lengths with price "0". With this improvement my solution in dart passed all tests using recursive algorithm.

tobakudan: Yup, already did that too

VizGhar: Westicles likes himself too much, that's why XP shrink https://www.codingame.com/forum/t/self-upvote-xp-is-gone/188663

ProgrammerDog: Hello! Do you think I could submit this contribution for the approval process, if not what changes should I make? https://www.codingame.com/contribute/view/608471d9a035563b80a42a6d2da35b8d00c8

Default avatar.png the-mysterious: hello

Default avatar.png the-mysterious: help me please

Default avatar.png the-mysterious: Le mode de jeu est REVERSE : Vous n'avez pas accès à l'énoncé. Vous devez trouver quoi faire en observant les jeux de tests suivants : http://chat.codingame.com/pastebin/f33f687d-26f1-44be-8c3f-1f4923605dec

jacek: number of capital letters

wolf12345678910: hi

Default avatar.png Angecide: I thought I was losing my mind lol, so I made some performance improvement with pdep instruction and my code got much slower, but it turns out that the zen2 cpu on my machine handles the instruction really badly

Default avatar.png Angecide: but the code is actually almost 70% faster in codingame

Default avatar.png Angecide: like in numer of mcts iterations

Default avatar.png Angecide: *number

Default avatar.png Angecide: which makes profiling code weird, since something can be slow on my machine, but very fast in codingames

struct: Had no idea zen2 instructions were that much slower

eulerscheZahl: you should have known, a Zen garden takes a lot of time as well

struct: zen2: "300 cycle latency 250 cycles per 1 clock"

struct: zen3: "3 cycle latency 1 per clock"

struct: for pdep/pext

Default avatar.png Angecide: ye makes me wanna throw my cpu in the garbage

struct: remove the per clock on the first

Default avatar.png Angecide: i think the instructions are also really fast on intel cpus

struct: I think zen 3 matched them

struct: https://www.anandtech.com/show/16214/amd-zen-3-ryzen-deep-dive-review-5950x-5900x-5800x-and-5700x-tested/6

Default avatar.png Angecide: ah I see

darkhorse64: If you buy a fresh cpu, you will experiment the reverse situation: fast on your PC, slow in CG. I have written avx code for a bot that does not run faster than the equivalent scalar code. On my machine, I nearly doubled the overall performance

reCurse: Seems hard to believe tbh

reCurse: You sure you controlled for the CPU?

darkhorse64: I ran my code (a C4 bot) several times with and without the avx code to account for different machines measuring my rollout count and I did the same thing on my machine. On CG, I see no significant difference. I agree that it"s a surprising result. So I went out checking my pragmas. I also used Gobolt tool to inspect my code (does GCC produce the expected ? It does). I have no explanation

darkhorse64: expected asm

reCurse: What your cpu?

reCurse: 's

darkhorse64: i9 10th gen

jacek: everyone has new cpus but me :(

darkhorse64: Xmas !

reCurse: So Comet Lake?

reCurse: Might have more execution ports for whatever you were doing somehow

reCurse: Only explanation I can find for now

RoboStac: were you u sing the gather instructions for memory access?

RoboStac: they're really bad on older cpu's

eulerscheZahl: model name : Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz

you are not alone jacek

RoboStac: though I wouldn't expect them to be worse than scalar

reCurse: I've read reports they can be but haven't experienced it myself

darkhorse64: http://chat.codingame.com/pastebin/c7f7a8a1-8980-4f7c-9613-8ead444e2080

reCurse: Hmm really nothing special...

RoboStac: odd

darkhorse64: As this is against common knowledge, I have not ruled out a mistake from my part but I do not see it


darkhorse64: Anyway, it's still plenty fast as is

reCurse: I'd be curious to investigate but without access to that kind of CPU it's a waste of time

darkhorse64: Yeah, reproducing the problem is not enough except for my self esteem

jacek: you dont have bottom or up rows for checking the diagonals?

darkhorse64: No guard bits, C4 is 63 bits but I have masks for that


MSmits: darkhorse64 if you're still here, there is a big difference between the methods not just because it does linear instead of parallel, but there's also more conditionals

MSmits: might it have something to do with branch prediction?

struct: but how does that explain his local performance gain?

MSmits: well it might be one cpu does a better job of this

MSmits: you could try to make the linear version branchless except for the one at the end

MSmits: I guess the compiler and/or cpu/branch prediction combination should easily be good enough to do this right though

Default avatar.png the-mysterious: https://www.codingame.com/clashofcode/clash/15420436484b0240733e8b6ace262fae87f49b6

MSmits: my theory doesnt seem likely

Default avatar.png the-mysterious: https://www.codingame.com/clashofcode/clash/15420436484b0240733e8b6ace262fae87f49b6

struct: stop spamming

Default avatar.png the-mysterious: pls joibd

reCurse: Could be wrong but I don't think branch prediction has changed that much recently

MSmits: i dont know that much about it, but it just doesnt seem like a clean comparison between avx and linear

MSmits: because of the 4 conditionals

RoboStac: if anything I'd expect that to count against the linear version though

reCurse: ^

MSmits: yes

MSmits: but if his local cpu does this poorly somehow...

MSmits: and on CG it goes right

MSmits: who knows....

reCurse: I'd be surprised a newer cpu would have such a regression

MSmits: sure, but we're stumped anyway, so it's probably gonna be something weird

jacek: robo's working on breakthrogh? :scream:

MSmits: well you showed a nn can work

MSmits: it's your fault

RoboStac: yep

RoboStac: (it's one of the first I tried NN on and I've made massive improvements since then that I thought were worth trying)

jacek: well now i can see where my bot blunders. on bad positions even in late game it says score 0.8-0.9 just to one ply later be -0.5

reCurse: Namely?

MSmits: jacek not sure if thats blundering though. I assume you mean 2 plies later and two levels of depth can dramatically change score

MSmits: by detecting a trap you didnt before

reCurse: What kind of massive improvements

MSmits: usually true for mcts as well

jacek: mhm

MSmits: could be blundering, just dont be too quickk to assume is all i am saying

jacek: or it was good position after all but my bot could keep playing the good line

jacek: couldnt

MSmits: why couldnt it?

MSmits: this sort of question is terribly difficult to investigate

MSmits: who knows what the bot was doing

jacek: i dont

MSmits: right :)

MSmits: it being a NN makes it worse because it's difficult on two levels

MSmits: you have the huge tree and even a single node of the tree is difficult to understand because you dont understand the evaluation

MSmits: I think both reCurse and RoboStac have had bugs in their framework for long periods of times they didnt spot because of things like this, correct me if I'm wrong

jacek: folks in chess have this nice simple visualisator https://media.discordapp.net/attachments/718853716266188890/797492718431109182/unknown.png?width=1087&height=714

MSmits: pretty picture. I hope *they* know what it all means

jacek: or this https://images-ext-1.discordapp.net/external/XUnxx1Kwe-_CJJqZ8nofsTyiCf9gJ9hkEWaBC3ROa1Q/http/www.jurjevic.org.uk/chess/temp/temp/temp/temp/temp/temp/temp/temp/Hyatt/temp/temp/nn-v0f000000103.png?width=1201&height=714

RoboStac: most of my problems that I've fixed have just been things being slightly non-optimal that then makes a big difference (eg merging duplicate states in training stopped so the initial few states aren't massively over-represented in my training data)

jacek: looks like some old strategy game

MSmits: ah Robo, so you've never had situations where your bot did something you thought was silly and it turned out to be an error in the NN?

MSmits: that must be nice

MSmits: I hate when my bot does dumb stuff and I don't know why

jacek: or they right stuff and you dont know why

MSmits: oh i just assume its my awesome coding in that case

reCurse: You don't investigate errors in the NN

MSmits: Jacek: those pics you sent are an attempt similar to what the tensorflow playground does. Making it visual. Seems hard when you have 10k nodes though

MSmits: reCurse you just skim through the code if you suspect an error and hope to spot it?

MSmits: not a weird method, i do it all the time

reCurse: At least if I understand you correctly, there's no point in figuring out the weights that caused something to not evaluate correctly

reCurse: You have to build hypothesis at a higher level and correct the training

MSmits: well you do have to make sure its because of the training and not a real bug

reCurse: Well I mean unless you got the math wrong I don't see what else

reCurse: But even wrong math, if it's consistent, the NN will adapt to it

MSmits: i guess there could be a bug in your search

reCurse: Just won't be as good

MSmits: but you've done that so many times, its probably not likely

reCurse: I don't know, I think this is too hypothetical

MSmits: personally i mess up mcts all the time still

MSmits: yeah it is

MSmits: did you get started on the new project yet?

RoboStac: the mcts part is basically identical on all my NN bots so I'm fairly happy it's bug free

reCurse: No, there's an area I wanted to investigate for performance first

MSmits: ah ok

reCurse: There's metrics that have been bugging me in my nn code

reCurse: Could be nothing or it could be a 4x perf gain, who knows

RoboStac: having said that I did make an improvement recently in how I choose my next move (which got me #1 on oware and #2 on bandas as well as making yava/othello stronger)

MSmits: RoboStac yeah i try to copy code as well, but i always end up with little differences in whether i expand 1 child or all children, or how i handle player switching and the mcts solver. Mostly it is sign errors

MSmits: i guess with a nn you dont care so much about those details

reCurse: The whole mcts balancing thing is still there

RoboStac: expanding all children sounds horrendous as that'd be many many nn evals

RoboStac: but yeah, all thats still possible

jacek: RoboStac different (p)UCT?

jrke: is there any way i can save bytes in json in python?

MSmits: yeah that wouldnt work with such slow eval

jacek: but thats what i do :o

jacek: well for bt i do it partially

MSmits: do you try both ways jacek?

MSmits: it's different for every game what works best

RoboStac: I used to have some bots using most visits and some using best score to choose the move as it seemed to work differently depending on the game - I've changed to a combination of both that seems to work better

MSmits: yeah, i do highest value, but you risk picking a node that hasnt been visited much and only in the last 1000 visits or so bumped up its value

MSmits: which means it is very uncertain

jacek: yeah, for final move i have score + log(visits), so probably roughly equivalent to lower confidence bound

reCurse: I'm convinced mcts is not the good approach but I have yet to come up with better

MSmits: depends on your definition of mcts, there are so many ways to adapt it that maybe the thing you're not convinced about can simply be improved with some changes

reCurse: I could get it all wrong but it's assuming a relatively stationary target

reCurse: But in adversarial that's not quite true

reCurse: And it adapts very poorly

MSmits: you have to look at the full picture though and consider the alternatives

MSmits: it does search quite deep

reCurse: I only have the intuition there's much better to do for those scenarios

reCurse: So for what it's worth

MSmits: it's been shown to be weak for games with a lot of narrow lines of play

reCurse: You have to hack it up for solving

reCurse: So who says you don't have to hack it up further

reCurse: And at that point is there even any theoretical ground left for mcts

MSmits: well the main feature is to simulate games with at least a random component to selecting moves

reCurse: There's no random component?

reCurse: It's not forced

reCurse: It is AN option

MSmits: it has monte carlo in the name

MSmits: i guess it's a matter of definition

reCurse: I feel like I explained that before :sweat:

MSmits: nah we had this discussion before and you did explain, it's really a matter of definition

jacek: lets make new search, LVTS - las vegas tree search!

MSmits: i do mcts with no random rollout

MSmits: but imho i should just call this uct guided best first search

MSmits: it's not really mcts... but thats definition

MSmits: jacek sure

MSmits: reCurse I do understand your intuition about mcts, I stare at meta mcts a lot and it often feels very unstable

MSmits: but the problem is that if you use something a lot you tend to magnify the shortcomings

reCurse: I'm not saying it doesn't work obviously

MSmits: I know

reCurse: I'm just saying it seems to have a huge problem

MSmits: it does

reCurse: That if corrected would lead to a much, much better alternative

MSmits: if that's possible, I mean a substantial correction, not just another fancy enhancement

reCurse: I'm talking new algorithm

MSmits: right

MSmits: well please share it when you've found it and trashed us enough with it :)

reCurse: If that even happens, I suspect it would take a few more years of tinkering and thinking

MSmits: maybe it already exists among the legion of papers on mcts

MSmits: stuff gets buried

jacek: i wish there was mcts survey but for 2020, with latest inventions

MSmits: the focus is mostly on machine learning I think

jacek: i meant mcts with machine learning

MSmits: right, but it might be cleaner to do it with a simple eval

MSmits: if you're just interested in the search

MSmits: otherwise any test is going to raise questions about the quality of the training of the NN and such

MSmits: limit your variables is what we teach students in physics

reCurse: But they're not independent variables

MSmits: no, but the things you're worried about with mcts should be present both with a NN and a simple eval

reCurse: I disagree

MSmits: hmm ok

reCurse: Your approach is entirely different if you have binary results from a random rollout vs a more informed eval

Default avatar.png Angecide: btw, on a high level, how does mcts with no random rollout work? Do you do a shallow dfs search of some sort instead of random rollout?

MSmits: oh, sorry, i did not mean that simple of an 3eval

MSmits: i mean like a traditional eval

MSmits: that is still used in games like chess in most engines

RoboStac: usually just an evaluation of the position instead of continuing further Angecide

Default avatar.png Angecide: ahh I see

MSmits: but a shallow search can work too

MSmits: there are papers on this as well

MSmits: personally i usually just eval the position and immediately backpropagate

MSmits: usually some average of all children evaluated (you can also pick the best)

MSmits: it makes the search horribly deterministic if you leave out the random though

Default avatar.png Angecide: I can see how this would be hugely advantageous in terms of performance and such, but getting the idea for a good eval function sounds really hard

MSmits: depends a lot on the game Angecide

MSmits: if you've just done uttt, then you're right

Default avatar.png Angecide: yeah, it will probably get easier with experience

jacek: still in gold eh?

MSmits: tbh uttt is one of the hardest games to get out of gold in

MSmits: even if so many people did it

Default avatar.png Angecide: yea I can reach legend now if I want, but I wanna finish up all the bugs and performance upgrades before submitting again

reCurse: Not to be contrarian but I disagree

reCurse: You literally don't need to know anything about the game

MSmits: thats because you can type up optimized code in your sleep

reCurse: Just optimize a vanilla mcts and it's guaranteed legend

reCurse: What other game doesn't require you any understanding of it to get legend?

MSmits: the optimization part is what is hard

jacek: csb

struct: optimization part was not that hard imo

MSmits: again, for you, you were able to avx csb, something very few still have been able to do struct

struct: Well I had help from marchet PCR code

reCurse: You don't need anything fancy, just basic c++

MSmits: for a year or so, uttt had 1k players of which 35 or so were in legend if i remember correctly

MSmits: people have a lot of problems reaching 20-25k rollouts

MSmits: just the fact that you almost have to use c++ to have chance

MSmits: how many other games have that

reCurse: Lots

reCurse: Though nowadays c# and rust are most likely doable

MSmits: I dont know so many games where c++ is a must

MSmits: i always see java in legend and other languages

MSmits: just not top 10

MSmits: assuming its not a heuristic contest

reCurse: Well you can say the same for uttt

MSmits: ice and fire for example

reCurse: Lots of java in the bottom of legend

MSmits: yeah, I've had plenty of conversations with people who had to fight hard to do that with java. I barely managed with C# myself

MSmits: then converted to C++ and tripled my simcount

MSmits: anyway you're right, game strategy barely exists in uttt

reCurse: I still maintain the fact you don't have to write any eval makes it easier than most games

MSmits: the difficulty is just a different kind

MSmits: makes it easier to write a reasonable bot, not easier to stand out

MSmits: apparently my daughter needs me to get some junkfood. Ttyl :)

reCurse: bb

Default avatar.png CodyPro: hi how we can get user id in coding game

jacek: you mean agent id?

eulerscheZahl: user ID for an external chat client

eulerscheZahl: https://www.codingame.com/faq scroll to the very bottom

eulerscheZahl: for me it says: Login 1500515@chat.codingame.com

eulerscheZahl: that 1500515 is my user Id

jacek: what does it say about your password?

eulerscheZahl: Password Your CodinGame password

eulerscheZahl: i'm pretty sure they don't know my password

jacek: one may never know

eulerscheZahl: if they know it, i'd seriously doubt their abilities regarding webdev

jacek: AutomatonNN whats is euler's password

AutomatonNN: eulerscheZahl is there a way to do that yesterday there :D

eulerscheZahl: :/

eulerscheZahl: stop pinging that bot jacek

struct: I told you, you need a bot to ping back the person who pinged automaton

struct: when it pings you

eulerscheZahl: i need a server to host that bot

Default avatar.png RyanGilbert: there is a free hosting platform

Default avatar.png RyanGilbert: localhost

mzbear: wtf is wrong with this "botters of the galaxy" game. first three leagues are won by selecting HULK and issuing "ATTACK_NEAREST HERO" every turn, no need to use any of the new features introduced

Illedan: Take the win mzbear and fight in the comming leagues :)

mzbear: it just ruins my motivation when i know there will be new rules soon again, and there's no point writing code until i see them ... so i just wait, wait, wait ...

Illedan: Yeah, sorry about that. Someone wanted to try and smooth things over, was a waste.

mzbear: oh, would you look at that, my hulk wins the boss in the next league as well

mzbear: this league has 197 players, though, so maybe it's not winning every game anymore

Salted: This is amazing! I'm jumping on this hulk train

Default avatar.png RyanGilbert: lol

mzbear: nah, still winning every game against the boss. but not winning against the other players. how these other guys didn't beat the boss, i dont know. plenty of other hulks doing the same thing i'm doing, it seems

mzbear: i mean, the enemy boss buys 4 items, but still loses even though i have no items at all, because enemy boss tries grinding gold while i'm killing it

Illedan: You have too many draw games mzbear

mzbear: i suppose i'll have to buy items now

Illedan: Just wait near tower for some turns and then attack afterwards

Default avatar.png RyanGilbert: im solving stock exchange losses and for the largest dataset it times out

Default avatar.png RyanGilbert: im doing it in python, would it be better to try and convert it into another faster language and it will work

Default avatar.png RyanGilbert: or do i need a different algo

jacek: think smarter, dont brute force it

Salted: I think for some of the games, the boss isn't nearly as strong as the players in that league since the best players have all been promoted and the boss has sort of been left behind. For example the game of drones boss I can beat in gold league, but I can't beat the players at the top.

Salted: I mean the legendary league seems full and the good players are still in gold.

struct: gold boss might be broken

struct: sometimes it happens with languages updated

struct: s*

mzbear: sometimes the boss is weak to some super simple greedy strategy, but the other players aren't

Salted: I am being greedy for sure with that bot.

Salted: This hulk strategy is killing it!

eulerscheZahl: like the contest gold boss ignoring groots

eulerscheZahl: and losing to double hulk :D

Default avatar.png RyanGilbert: i correctly solved the hardest test case but failed all the others lol

eulerscheZahl: you did the proof of concept, let's try the next puzzle

Default avatar.png RyanGilbert: ahh i wanna get it

mzbear: changed my bot to purchase anything with damage, went afk, i'm in wood 1 now ... and it didn't automatically submit to arena? but my bot works correctly, unlike the first 10 opponents. rank 2 in wood1, it seems, because one opponent likes to stand at the tower which ruins my perfect strat ;D

mzbear: i feel oddly disinclined to continue this now that i'd finally have to write something sensible

eulerscheZahl: lots of other games to have fun with

Astrobytes: That game is not one of them :P

mzbear: i seem to have a problem. i've written a dummy bot for 23 of the games, and i've only put any sort of actual effort into 3 of them

MikkelAa: How can I challange a specific friend in a botgame?

Astrobytes: That's not a problem. It just means you have things to work on mzbear :)

eulerscheZahl: hi Astrobytes. the debug drawing was pretty straight forward

jacek: you cant

mzbear: UTTT was fun until i got to gold and would've finally had to implement a search

eulerscheZahl: only had to patch the toggle module a bit the show entities in multiple toggle states and not just 1

Astrobytes: Oh really? That's cool. No adverse effects?

eulerscheZahl: i don't think so

eulerscheZahl: i limited it to 50 entities per player

Astrobytes: Nice. Seems sensible.

eulerscheZahl: if you create too many pixi objects, it will get laggy at some point

eulerscheZahl: + replay size limit

Astrobytes: CG mini-RAIC here we come :P

eulerscheZahl: mini raic had no debug interface?

Astrobytes: I don't know, but what I mean is any RAIC style thing would certainly be mini on CG.

eulerscheZahl: ah

eulerscheZahl: thought you were pointing to aicups.ru

Astrobytes: no, I've never participated in those

eulerscheZahl: i played 1 out of 4 contests

eulerscheZahl: the other ones were to borderline complex

eulerscheZahl: do you know agar.io?

Astrobytes: Yeah I know it

eulerscheZahl: they turned that into a contest

Astrobytes: And the one you did was paper.io iirc

eulerscheZahl: yes

Astrobytes: Hopefully they do one this year.

eulerscheZahl: last year was disappointing for contests

eulerscheZahl: 3 on CG

Astrobytes: Hopefully something good comes from the community discussion tomorrow.

eulerscheZahl: all-time low

Astrobytes: Yeah, we were really spoiled before.

eulerscheZahl: in case i'm late a bit, fight for my will

eulerscheZahl: *original content

  • separate leaderboard with freeze at fixed time
  • recalc

Astrobytes: Noted.

eulerscheZahl: and bosses that pop up during the week

Astrobytes: Discussion will still be open anyway at least.

Astrobytes: LEAGUES dammit!

eulerscheZahl: prizes are optional IMO. for OOC it was in the void for most of the contest

eulerscheZahl: still 2k players

Astrobytes: I don't think it bothers that many people tbh

eulerscheZahl: only relevant for top1%

Astrobytes: Yep.

eulerscheZahl: and half of those already have a tshirt collection

Astrobytes: Bragging rights tho :)

eulerscheZahl: one more point that I don't care about: overall contest leaderboard, achievements. do community events count for those?

eulerscheZahl: probably they should. the 12 contests achievement would be tough otherwise

Astrobytes: Not currently. Not sure they would implement that but perhaps.

Astrobytes: Yes, valid point.

eulerscheZahl: but i think i can make it tomorrow

eulerscheZahl: weird to schedule a meeting for a fixed time and then do it in writing

Astrobytes: I'll be there unless I oversleep. Taking a day off tomorrow since I got up at 4am this morning.

Astrobytes: lol right

eulerscheZahl: i won't question your sleep schedule :D

Astrobytes: Had things to do before certain times (international work stuff). Otherwise you'd never catch me up at that time unless I was catching a flight or at a party!

eulerscheZahl: that's dedication for your job!

Astrobytes: Nah, not much of a sacrifice to get up really early if it's needed.

Default avatar.png SilviuCristian45: hello

Default avatar.png AI_says_hi: hi o/

dbf: oh, 4am is impressive! I wake up this time only if I'm on-call :)

Astrobytes: You gotta do what you gotta do!

dbf: btw, they promised to have mini-raice somewhere in spring, but they fail deadlines often, so could be rescheduled

Astrobytes: Ah that's OK. Just nice to have something else to play since there are fewer contests on CG these days :)

Illedan: Glad it is fewer contests as I have more to do in life :D

Default avatar.png AI_says_hi: Lucky you! Here you can't do anything because of Covid :/

Astrobytes: This is certainly true for you Illedan :)

dbf: I like that there is some break now because I need to recover from raic :)

Illedan: Slightly thinking about trying that thing from Neumann though, but scared it might take too much time :P

Astrobytes: When's the due date?

Astrobytes: True dbf :)

Illedan: Due date in 6 days

Astrobytes: oof, I think you'll be busy during that contest in all honesty :D

Illedan: naaah

Illedan: She going to sleep!

Astrobytes: Hahaha, positive thinking eh

Illedan: I will most likely have my 10 days of during that period where my only goal is to learn about her

Illedan: *off

Astrobytes: Yeah for sure

Illedan: Might aswell learn her about codingame :P

Astrobytes: hahaha

Astrobytes: Yep. Start them early I say!

Illedan: Indeed

Illedan: She is going til win her first t-shirt during the spring challenge :)

Astrobytes: Hehehe, gotta be done :D

Illedan: I'll buy her a custom CG t-shirt before that contest anyway ^^

Illedan: Or body or whatever it's called

Astrobytes: Wait for RAIC, she can probably win a t-shirt there :P

Illedan: Easier

Astrobytes: How's the new job going?

Illedan: 1 week of CSS and React until now, but far better setup on the project than anything earlier

Illedan: So it is very good :)

Astrobytes: Good to hear!

dbf: are you ready to complete next CG contest with javascript now

dbf: ?

Illedan: Yeah

Illedan: Nah, luckily the backend is in C#.

Astrobytes: I doubt you would have taken the job otherwise :D

Illedan: ;)

Default avatar.png Valdez001: Hi

Astrobytes: Lo

jacek: whats this jacekism?

Astrobytes: :3

Default avatar.png zhoubou: oO

Astrobytes: Oh my.

Default avatar.png zhoubou: (I had to search chat history to see if it was oO or Oo)

Default avatar.png zhoubou: lol

Astrobytes: hahaha

Default avatar.png zhoubou: How are you doing Astrobytes

Astrobytes: Yeah, not too bad zhoubou, tired but OK. And yourself? How are things going over there after the earthquakes?

Default avatar.png zhoubou: For us, not bad as well. I myself am not frightened or anything. The state could be better in providing aid to the parts most hit by it.

Default avatar.png zhoubou: I'm at ease for now, I don't think about it too much.

Astrobytes: Yeah, it looks like it's gonna take some time and some real effort to rebuild.

Default avatar.png zhoubou: Yeah, for sure. I'm also not happy how they're currently taken care of really.

Astrobytes: Well, the worst is over. You can't predict the future so no point worrying about 'what if' :)

Default avatar.png zhoubou: You're absolutely right :)

Astrobytes: It's sad when government's abandon the people who require the most help Especially after a natural disaster like that.

Astrobytes: *governments

Default avatar.png zhoubou: Yeah, and when they do react, it's too late.

Astrobytes: Yes, indeed. It's unfortunately rather common across the world.

Default avatar.png zhoubou: Yeah, it's the way it works. They only care if they will be elected next cycle. Nothing more. And they act when election is coming.

Astrobytes: Not a great advert for our species is it :D

Default avatar.png zhoubou: Haha no, it isn't :sweat_smile:

Default avatar.png zhoubou: Wondering how we'll look back at the current state of the world in the future

Astrobytes: If we get there that is...

Default avatar.png zhoubou: Ah, yes

Default avatar.png zhoubou: I don't give much hope to it really

Astrobytes: But yeah, you'd like to think we'd be somewhat 'enlightened' in the future but... look at our history :/

Default avatar.png zhoubou: Well, we are 'enlightened' in some sense. Not much, but still, compared to past times.

Default avatar.png zhoubou: We are advancing at some pace

Default avatar.png zhoubou: At least that is what I believe. I might be dead wrong

Astrobytes: True. In some respects. Other parts of human society don't really change at all.

Default avatar.png zhoubou: I agree with that.

Default avatar.png zhoubou: Society improves at glacial speed, if at all

Default avatar.png zhoubou: Technology is far, far ahead of society's current state.

Astrobytes: Yeah, and it creates a lot of problems. Psychological issues, learning issues, general mental health.

Astrobytes: Kids growing up on social media for example.

Default avatar.png zhoubou: Right on.

Astrobytes: Tech advances are always cool, but it seems like we have bigger problems a little closer to 'home' that should be addressed first.

Astrobytes: Ah, for an ideal world eh :)

Default avatar.png zhoubou: I disagree somewhat with that, though. Some problems at 'home' can't be solved unless we solve some other problems down the line.

Default avatar.png zhoubou: It's easier to create technology than to change society

Default avatar.png zhoubou: For the better, that is

Astrobytes: Yeah, but what I mean is, if we can't even take care of our own citizens, each other etc without screwing them over - what's the point in advancing tech?

Astrobytes: It's a top-down issue really.

Astrobytes: As in what happens up top dictates that below it.

Default avatar.png zhoubou: Well at some point, technology solves problems we didn't know we had. Like with microscopes to see microbes that were the true reason for diseases, not demons and such.

Default avatar.png zhoubou: Not sure if I gave a good and true example there though.

Astrobytes: Oh sure, of course. Though plenty still defy reason and follow the 'demons' etc ;)

Default avatar.png zhoubou: Yes, but a critical mass of people don't believe that

Default avatar.png zhoubou: Anymore

Default avatar.png zhoubou: Some do, of course

Default avatar.png zhoubou: There will always be people like that.

Default avatar.png zhoubou: For crying out loud, there are people that believe Earth is flat

Default avatar.png zhoubou: :P

Default avatar.png zhoubou: But I agree with you to some extent

Astrobytes: Yeah, thankfully! Oh yeah for sure. Indeed. I get your point though, tech advances can for sure help us on the way, they're just not leveraged in the right way I might say.

Default avatar.png zhoubou: Yeah, good point.

Default avatar.png zhoubou: If we don't fix the top problems, we will advance slowly

Astrobytes: Incredible advances in healthcare, yet some deny access to people who cannot pay exorbitant sums for it. How does that benefit the whole?

Astrobytes: Anyway, this is a Can of Worms discussion :D

Default avatar.png zhoubou: Yeah :P

Default avatar.png zhoubou: But I think you changed my mind a bit

Astrobytes: I don't think any minds needed changing. Intelligent discussion just broadens the horizons.

Astrobytes: *Extends the horizon

Default avatar.png zhoubou: Ah, yeah, you extended my horizon, right

Astrobytes: lol

Default avatar.png zhoubou: :P

Astrobytes: Rolling horizon evolutionary chat algorithm.

jacek: s/ro/tro

Astrobytes: Trolling horizon, hahaha

Default avatar.png zhoubou: Rather, troll on the horizon

Default avatar.png zhoubou: :)

Astrobytes: Yes, indeed!

Default avatar.png zhoubou: Rolling horizon evolutionary chat algorithm might be my thesis for when I finally go to a college

Default avatar.png zhoubou: Or is it an algorithm that might write my thesis for me? I dunno

Astrobytes: Not sure RHEAs are ideal for chatbots tbh

Astrobytes: Or thesis writing.... :D

Default avatar.png zhoubou: Awww

Default avatar.png zhoubou: Back to the drawing board it is

Astrobytes: Hey, don't let me stand in your way :D

jacek: AutomatonNN did you evolve yet

AutomatonNN: check it out

Astrobytes: ...

Default avatar.png zhoubou: Who wrote that bot btw?

Astrobytes: Hover over its avatar

Default avatar.png zhoubou: Oh

jacek: bot?

Default avatar.png zhoubou: It's a chat_bot_, is it not?

jacek: AutomatonNN are you bot

AutomatonNN: agade is a translator

Astrobytes: You can get some info here: https://www.codingame.com/blog/markov-chain-automaton2000/

Automaton2000: that's the word i was looking at the referee

Astrobytes: LOL "agade is a translator"

Illedan: xD

Lachrymosa: would someone be available to help me with conceptualizing a math problem?

Default avatar.png zhoubou: Very interesting read Astrobytes

Default avatar.png zhoubou: Lachrymosa What is troubling you?

Default avatar.png zhoubou: You can PM me if you want. I'm not a math wiz though.

Lachrymosa: I am working on the easy puzzle bank robbers. So far I have the math for how long it would take per safe down. But I am having a hard time wrapping my head around a way to do the math for total time taken with multiple robbers

Lachrymosa: the robbers would be working at the same time, but one may finish before the other and start on the next, and that one may be so hard the other robber does two in that time, and I just don't know how to do that elegantly. I'd throw a while loop at it and let it chug 1 by 1 lol

Default avatar.png zhoubou: Haven't tackled that one yet. Hmm

Astrobytes: Do you sort the times?

Lachrymosa: no

Astrobytes: Have a think on that one.

Lachrymosa: my initial naive thought was to sum the times and divide by the robbers

Astrobytes: What will determine the total time of the heist?

Astrobytes: (it's very simple but easy to miss)

Lachrymosa: however long it takes the robbers to find all combinations of all safes, at a rate of 1 second per combination tried of all possible combinations per safe

Illedan: I had to reread my code for that problem

Astrobytes: Take a step back then think about it.

Illedan: ^

Astrobytes: Me too Illedan, I'd forgotten what it was.

Illedan: yeah

Illedan: Pushed a new feature for my tool now :tada:

Astrobytes: Don't tell me: it finishes NS apps for devs who don't finish them :P

Illedan: haha

Illedan: My repo navigator thingy

Illedan: https://kvanli.com/stories/openrepo


Astrobytes: Hm, that's pretty neat actually

Default avatar.png AI_says_hi: that looks pretty useful Illedan :thumbsup:

Illedan: I added the script part today. So that I can open a repo in vscode, as I needed it for my React work at work today :P

Astrobytes: The best tools are born from personal requirements.

Illedan: Indeed, fun to work with too :D

Illedan: And I can scope the work myself

Astrobytes: Indeed. So 2021 will be the year of Useful Things From Illedan.

Default avatar.png nhlong20: i have no idea about this

Default avatar.png nhlong20: omg

Astrobytes: Lachrymosa: how are you getting on with it?

Illedan: :D

Illedan: nhlong20, idea about what?

Lachrymosa: I was approaching an idea but invalidated it

Default avatar.png nhlong20: the puzzle i'm working on

Lachrymosa: I sorted the times, and in set sizes of number of robbers was adding the largest number to the next set

Astrobytes: Think simple. Like really simple. Forget any complicated ideas.

Astrobytes: It is a case of do the calc, store it. Sort it in some way. Decide which one to output.

Astrobytes: *sort the array of calculated values

Lachrymosa: yea I have a list of all the total times for safes, sorted from lowest to highest.

Astrobytes: Do you need the total times for safes... or?

Lachrymosa: Not all of them no, because some are happening and finished while others take longer.

Illedan: I'm off, bye

Astrobytes: gn Illedan

Lachrymosa: pce Illedan

Astrobytes: Think it through. You are really gonna kick yourself on this one.

Lachrymosa: probably :\

Astrobytes: I think I did the same until I had a eureka moment lol

Astrobytes: "All the robbers work at the same time. A robber can work on one vault at a time, and a vault can be worked on by only one robber."

Astrobytes: - so what determines the total time of the heist?

Lachrymosa: The longest safe to solve, plus any overlap

Astrobytes: Pay attention to that first line above.

Lachrymosa: yea I get that they work at the same time but I can't figure out how to visualize in my mind how one robber 1 finishes his 250 second safe and moves to a 500 second safe that robber 2 is still working on his 1000 second safe and so the first 2 don't matter

Astrobytes: Trying to give hints here without giving it away, not easy :D

Lachrymosa: I understand, and I appreciate the help

Astrobytes: Reflecting on previous comments: is it individual safe solving times you need to focus on?

Lachrymosa: no i figured out how long it would take to solve each safe based on password complexity formulas.

Astrobytes: Perhaps it might be more prudent to relate the times to robbers and not so much the safes themselves?

Lachrymosa: which is where i was leaning towards a while loop and brute force

Astrobytes: Not necessary at all.

Lachrymosa: just assign the next available safe to a robber as they hit 0

Lachrymosa: I know it shouldn't be the answer as brute force rarely is.

Astrobytes: Keep a little array for R robbers, update their times accordingly in the for loop

Astrobytes: Remember: Robbers deal with the different vaults in increasing order

Lachrymosa: so they magically know how complex each safe is and will start with the least complex?

Astrobytes: Hehe, no. You need a break bud :)

Lachrymosa: maybe, I am coming here after work ><

Astrobytes: I'm not gonna give it away, you got this puzzle I'm telling you.

Lachrymosa: and work was mind numbing :V onboarding crap, hundreds of accounts and logins and no one owns all of it so I have to go to twenty different help desks to get default passwords and more than half the time they just reset the password and say "jobs done" without still giving me any basic credentials.

Astrobytes: lol jeez, you left the military now or just different posting?

Lachrymosa: better job in the military

Astrobytes: Nice. Good stuff. Computer related I hope.

Lachrymosa: no more getting oily and bloody busting knuckles lol

Lachrymosa: Yea, cyber security

Astrobytes: Awesome. Oh were you on aircraft maintenance?

Lachrymosa: vehicular, worse in many ways lol

Lachrymosa: but also better in an equal amount

Astrobytes: Haha, yeah, I have a friend who's ex USAF aircraift maint.

Lachrymosa: I didn't have to get exposed to cancer in a can

Lachrymosa: just diet cancer in a can XD

Astrobytes: lol right

Astrobytes: Anyway, I've been up since 4am and it's 11pm, I'm gonna eat something and sleep. Hit me up tomorrow (or anyone else) if you ain't got this puzzle done

Astrobytes: I think you'll get it after a little break though.

Lachrymosa: Thanks, have a good rest!

Astrobytes: Will do, take it easy dude

Lachrymosa: ACK! I just solved it

Default avatar.png AI_says_hi: Congrats :D

Default avatar.png AI_says_hi: Long fight :p

Lachrymosa: longer than it should have been >< i'm mentally exhausted but physically wide awake

Lachrymosa: hate being like this, it feels like a waste of conciousness

IlyasElBani: is the website lagging ?


Default avatar.png JudgeAL: yeah

Default avatar.png AI_says_hi: always happens around this time :)

Default avatar.png RyanGilbert: I feel like website devs should put up a banner at the top of the screen when the server calculates scores

AduDarkWa: ++ :(