Chat:World/2020-05-05
cegprakash: https://www.twitch.tv/cegprakash
cegprakash: going live now
LelouchVC2: C++ for the win in shortest mode
AaronHe7: python is better sometimes
CyberLemonade: hihi MadKnight
MadKnight: hey CyberLemonade
LelouchVC2: Sometimes huh xD
mark7: Hello
thibpat: hello :wave: I'm going live for more Twixt-PP, focusing on stopping these damn timeouts today! https://www.twitch.tv/thibpat
LelouchVC2: https://www.codingame.com/clashofcode/clash/report/121024142d6011ed1bd64e254b3fb0f39b13041
LelouchVC2: I'm so dead
LelouchVC2: It's like they took double the time just to get 80 less characters and beat me :((
cegprakash: I've joined thibpat
MadKnight: or bash
ThePythonian: Yeah, I never really liked it that much, because it really just encourages spaghetti code
occanowey: all of coc encourages spaghetti code
cegprakash: hi MadKnight
cegprakash: hi all..
cegprakash: I'm planning to stream bot-programming (random challenge) with a starter (boilerplate) code in CPP. If you're interested flip a table
WINWINWIN: Hi, anyone know if you can overload a constructor in python?
Uljahn: you mean def __init__(self) and def __new__(self) ?
WINWINWIN: Something like that
WINWINWIN: def __init__(self, args1): ...
WINWINWIN: def __init__(self, args2): ...
WINWINWIN: So that I can have a different set of parameters to initialize an object
Uljahn: "You can't have two methods with the same name in Python -- and you don't need to."
Uljahn: https://stackoverflow.com/questions/10202938/how-do-i-use-method-overloading-in-python
WINWINWIN: So I cant overload init?
WINWINWIN: do I use __new__ then?
Uljahn: :upside_down:
LoGos: well you can "overload" by using named arguments
LoGos: or by using *args
JohnCM: **kwargs if you want to overload arbitrary arguments, and they will be stored in a dictionary.
- args if you want to overload arguments in a predetermined structure, they will be stored in a set
JohnCM: https://realpython.com/python-kwargs-and-args/
LoGos: for example: https://ideone.com/Wcalyp
LoGos: and don't use __new__
LoGos: and delete
LoGos: unless you know what you are doing.
Uljahn: ^
LoGos: In my class I have seen people delete'ing all used variables
LoGos: to save memory
LoGos: as it was c++
LoGos: del* not delete
Uljahn: ah, those cargo cultists :relieved:
LoGos: Uljahn could you explain to me something about GA? I'm practicing it on Mars Lander
Uljahn: ye, go pm
c0cainee: is it just me, or the timer ain't working?
Uljahn: mine says next contest in 2 days 4 hours
c0cainee: Clash of Code - Fastest mode
00MN 00SC
MSmits: it's the correct time
c0cainee: it's stuck
MSmits: oh the clash timer
c0cainee: I meant there lol
Illedan: MSmits, did you ever look into giving scores to smitsimax nodes based on the other nodes confidence?
IAmNoob: the contest is in 2 days and 3,5 hrs
inoryy: keep us posted
Astrobytes: :smirk:
Illedan: (╯°□°)╯︵ ┻━┻
darkhorse64: I am playing with Mars Lander optim. I have reached 2300 with a GA and I wonder if I can get better without hardcoding
IAmNoob: i dont think so
BeardedWhale: darkhorse64 2300 fuel left?
BeardedWhale: I have 2089 without hardcoding
BeardedWhale: With just heuristics
IAmNoob: do you guys know a good method to make level
darkhorse64: 2313 fuel left over the 5 tests
BeardedWhale: That can definitely be improved without any hardcoding
eulerscheZahl: https://forum.codingame.com/t/languages-update/1574/148
bets if C# is broken for the contest will be accepted now
IAmNoob: why?
IAmNoob: why would it be brokn
IAmNoob: broken
AntiSquid: there's a notification on the compete button
inoryy: eulerscheZahl will break it
eulerscheZahl: CG plans to do an update directly before the contest
eulerscheZahl: i'm scared
Illedan: :scream:
IAmNoob: :grimacing:
AntiSquid: all code in VB.net since that will be only one left working :D
eulerscheZahl: test with D but don't touch my C#
AntiSquid: ah good point, all will be using D then :D
Illedan: I'll use Rush
Illedan: *rust
IAmNoob: i c++
AntiSquid: if they still work lol
HotDidgeridoo_4aea: anyone code with GO?
AntiSquid: you got to minimax the prediction, test will screw up best languages first :p
IAmNoob: piece of S***, i was working on a problem and the site stopped
AntiSquid: you should be mad about it and complain
IAmNoob: :)
wlesavo: it would be fun if battle for first in C# will be held in wood 2
eulerscheZahl: no one accepts your contributions anyway IAmNoob
IAmNoob: yeah
IAmNoob: but i try
IAmNoob: and its fun
IAmNoob: and i help
IAmNoob: in a way
eulerscheZahl: upvote stats: -15, -7, -4, -11, 0, -5
IAmNoob: yes, yes, yes ,yes
IAmNoob: but it's better and better
AntiSquid: what's going on with BOGOL :/
eulerscheZahl: work in progress
AntiSquid: i can see that
AntiSquid: but have you seen the guy online recently?
eulerscheZahl: no
eulerscheZahl: but i haven't seen him before the puzzle popped up
eulerscheZahl: so that means nothing
AntiSquid: he is from your country, you have to find him and bring him back
AntiSquid: save the puzzle, save the world
IAmNoob: how can i make better contributions?
AntiSquid: learn from the other one
AntiSquid: s
AntiSquid: !!
MayankBudhiraja: how to become better at coding?
ashelkov: learn from the other one
Jasperr: s
Jasperr: !!
wlesavo: wow, i thought chat is only available from lvl 3
Illedan: Just client side stuff
reCurse: "only"
reCurse: Isn't it pretty much "solve onboarding" and another puzzle?
Illedan: Should be from 40 and up only
eulerscheZahl: enough to block most users. it's easier to solve 1 puzzle than to connect with an external client
darkhorse64: 7 more "level up"s only and I can talk ?
eulerscheZahl: but Illedan can use the chat for a few weeks already
Illedan: :tada:
eulerscheZahl: btw where's the 2500XP for OOC? :D
Illedan: That's true
reCurse: The XP is a lie
Illedan: !
eulerscheZahl: Magu s got the reward twice (MM, A*C)
Illedan: Asking thibaud now
eulerscheZahl: i wouldn't have bothered :D
Illedan: More important than SC
eulerscheZahl: starcraft?
Illedan: spring contest
Illedan: What else are we going to call it?
reCurse: PAC?
eulerscheZahl: +1 for PAC
reCurse: At least that's what marketing keeps telling m e
Illedan: PAC it is
eulerscheZahl: 2 days till the contest. i bet he's furiously writing the statement
reCurse: No that's tomorrow
reCurse: err
reCurse: Thursday morning
eulerscheZahl: and Fr on thursday?
Illedan: *friday
Illedan: And prizes in 2 weeks
reCurse: Prizes already announced
eulerscheZahl: contest starts on thursday
reCurse: It's gamer RGB hardware
eulerscheZahl: spoiler: no tshirts
Illedan: Oh, I need that screen
reCurse: You get FPS increases the more RGB flashing
eulerscheZahl: that image you just shared on the forum reCurse... congrats, you have a fan
reCurse: *a* fan?
eulerscheZahl: a troll
reCurse: More like part of my fan club
reCurse: I get that at least once every week
reCurse: Since god knows when
Illedan: Didn't remove it by script yet?
reCurse: The notification yes
reCurse: But it's still in the bar
Illedan: Or is this the real reason for you having your offline setup? :P
reCurse: As if I needed more reasons
Illedan: True
reCurse: I even did a beautiful ooc viewer I barely used
reCurse: That's how cheap it is
eulerscheZahl: within the last 2 months i only got 7 CoC invites by 4 unique users :tada:
eulerscheZahl: your fan is my fan too
reCurse: Well I changed my tagline, inspired by yours
reCurse: Maybe it works now
eulerscheZahl: :D
Illedan: xD
Illedan: Got a screenshot of your beautiful ooc viewer?
reCurse: You like colored quads?
Jasperr: ooc?
Illedan: Anything is better than looking at my messy FB code trying to figure out why this idiot doesn't want to pick up the snaffles anymore
reCurse: Oh right FB
reCurse: Have to get back to that..
reCurse: zzz
eulerscheZahl: ooc = ocean of code @Jasperr
Jasperr: ty <3
Eysp: I invited a new friend today, but he does not have a chat pane on the side. Any ideas why?
Nanosplitter: Tell him to click the little arrow on the bottom right
Eysp: He says there is no bar there at all
Astrobytes: He needs to do a few puzzles and level up past level 3
Eysp: I'm trying to get him to send a screenshot
Eysp: oh, no chat until level 3?
Astrobytes: Yeah
Eysp: That makes a lot of sense then
Eysp: Awesome, thanks
Astrobytes: Think just one or 2 puzzles should do the trick
Eysp: Yeah he is 2 already just from the tutorial and stuff
Astrobytes: Cool beans
Eysp: Thanks
Astrobytes: No probs
IjustKilledutoo: hello
AntiSquid: how's it going lovely people?
Astrobytes: Badly. You?
AntiSquid: sleepy
cegprakash: eulerscheZahl u are rank 11 right now
MohatuINfLamES: is there something called coding block
cegprakash: you'll become a red coder?
eulerscheZahl: rank 11 where?
cegprakash: topcoder marathon match
cegprakash: https://apps.topcoder.com/forums/?module=Thread&threadID=955289&start=0&mc=6#2407330
eulerscheZahl: oh, not finished yet
eulerscheZahl: was 16th before and one player passed me in the recalc already
eulerscheZahl: so i guess 17th
eulerscheZahl: screwed up at 2 points in my code
MSmits: out of how many eulerscheZahl
eulerscheZahl: 1. didn't use pythagorean distance
eulerscheZahl: got from 16.9k to 15.5k on seed 2 with just that one change
cegprakash: what :O phythagorean distance is better?
eulerscheZahl: about of 80 MSmits
eulerscheZahl: yes, such a simple change :/
MSmits: ahh ok, hard to say if that's good or not... not sure what kind of players compete
MSmits: if they're all topcoders, you did great
cegprakash: if u score based onn phythagorean distancne how will u choose the grid size? do u have restrictionns like only 2 or 3?
eulerscheZahl: and screwed up my beamsearch. tried a scoring function that was actually more expensive than expanding more childs
eulerscheZahl: mostly 2x2 and 3x3
eulerscheZahl: for larger boards i do a modification though
eulerscheZahl: try to get the corner tiles somewhere inside and then make a large rotation to get them to the corner
cegprakash: so u never care about the actual penalty?
eulerscheZahl: i do
eulerscheZahl: but i have a weighted scoring
eulerscheZahl: let me explain a bit more...
eulerscheZahl: i take a number (let's say starting with 1)
eulerscheZahl: and check where i have to move it
eulerscheZahl: so i greedily apply rotations to get it in place
eulerscheZahl: but there are multiple options that get the number closer to the target
cegprakash: yes
cegprakash: that's right
eulerscheZahl: so i can choose the one fitting best with other numbers that i have to move as well
cegprakash: mm
cegprakash: heuristics
eulerscheZahl: pythagorean distance makes me move diagonally
eulerscheZahl: so i have more options for later rotations
cegprakash: interesting
cegprakash: yes
eulerscheZahl: and when scoring the other numbers that i rotate, i also check when i plan to fix those
cegprakash: so solving 1 number at a time can work :O
eulerscheZahl: a number that i will fix very soon is more important than one that i fix at the end
eulerscheZahl: distance also matters (more than linear)
cegprakash: wait
cegprakash: what do u mean by fix
eulerscheZahl: get at the right place
eulerscheZahl: if i have a number 2 cells away from the target and one like 40 away, then the one with larger distance is more relevant
eulerscheZahl: i can get the dist of 2 later or might even break it again if i solve it now
eulerscheZahl: the dist 40 needs work for sure
cegprakash: oh so u identify what number to work on next?
eulerscheZahl: yes
eulerscheZahl: https://pastebin.com/40aM8DfC
eulerscheZahl: just play it on a larger testcase. that explains my strategy best i think. watch a replay
cegprakash: so while u are moving 1 u suddenly change ur target to say 5 because 5 is too far from it's target than 1 to it's target
cegprakash: ?
eulerscheZahl: no, i solve the 1 completely
eulerscheZahl: but while solving the 1, i still have an eye on other numbers
eulerscheZahl: you can't just move the 1, you move at least 3 other numbers together with it
cegprakash: so u have 1600 eyes
eulerscheZahl: no, just a local view for my rotation
cegprakash: what's the use of keeping an eye
eulerscheZahl: and bruteforce with depth 2 in order to maximize the gain on other numbers while moving the 1 to the target
cegprakash: oh so u make some rotations that does not involve 1 while solving 1
eulerscheZahl: when i don't look at the 1 only but also the other numbers affected by my rotation, i get get them closer to their location as well
eulerscheZahl: saving moves later when i fix those
eulerscheZahl: but when fixing 1, i always rotate the 1 and get it closer to the target
cegprakash: yes I get that
cegprakash: but u always rotate a grid involving 1
cegprakash: or sometimes u do rotations without 1
eulerscheZahl: always with 1, until the 1 is in place
eulerscheZahl: then i never touch it again
cegprakash: mm
cegprakash: so sometimes u rotate diagonnally sometimes vertically sometimes horizontally
eulerscheZahl: https://twitter.com/_simanman/status/1255710921365716993
eulerscheZahl: that's siman (4th)
eulerscheZahl: our strategies are somewhat similar but he has a better implementation
eulerscheZahl: and my order is a little different, not doing the spiral
eulerscheZahl: more like a diamond. corners first, then moving towards the edges
cegprakash: nice
cegprakash: so this strategy is just a guessinngn
cegprakash: we need to try all
cegprakash: to find one
cegprakash: I never thought we could really get any board to 0 location penalty
cegprakash: so I just submitted a pleb search bot with mannhattan distance
cegprakash: it does huge rotations as well if it improves score
cegprakash: and I don't give priority to any rotation at all.. just any random rotation which improves score
cegprakash: I saw ppl like u getting 70+ score on first submission
cegprakash: and mine was at 20% after working hard to fix my sim.
cegprakash: and then I lost hope.. these guys must be smart
eulerscheZahl: i have a working sim too
eulerscheZahl: but there is no way to write a full search on this
eulerscheZahl: so there are lots of heuristics involved to solve 1 number at a time
cegprakash: mm
eulerscheZahl: but a sim to find the right moves. improving the rest too while solving that one number
cegprakash: but Psycho got a huge lead
eulerscheZahl: yeah, impressive
cegprakash: that makes the leaderboard scoring suspicious
eulerscheZahl: Psyho btw. no c
eulerscheZahl: he won(?) halite in the past
eulerscheZahl: at least ranked really high
eulerscheZahl: 2nd https://2017.halite.io/programming-competition-leaderboard
cegprakash: it says fake psyho
eulerscheZahl: it's the real one
cegprakash: wow he works for OpenAI
cegprakash: I love OpenAI bots on DotA
cegprakash: that must be a nice job for him
cegprakash: I really have no idea if future of AI will have a space for me to work on because my AI sucks :D
cegprakash: I'll go live after 15 minutes on https://www.twitch.tv/cegprakash will do 2 clashes
inoryy: what are you discussing?
eulerscheZahl: topcoder marathon 117
inoryy: wow it's still alive
eulerscheZahl: https://twitter.com/_simanman/status/1255710921365716993 good visual summary
cegprakash: no system test inoryy
eulerscheZahl: choose a square and rotate it in a given direction
eulerscheZahl: arrange the numbers. rotations of larger squares are more expensive
eulerscheZahl: and there's a penalty for not fully solving the board
inoryy: cool
eulerscheZahl: yeah, was fun
eulerscheZahl: system test in progress
eulerscheZahl: for almost a week already
cegprakash: haha
inoryy: lol
cegprakash: bcoz eulerscheZahl wrekt their servers
eulerscheZahl: it's 84 contestants. that's a lot
cegprakash: lol
cegprakash: u can see lot of active challenges and past challenges with cash prize to fix marathon judging
cegprakash: they build their product with their product :P
cegprakash: instead of hiring ppl
cegprakash: finished my dinner starting stream in 5 mins
KillZoneUK: And who's already done this before?
KillZoneUK: please dont hack my computer
KillZoneUK: anybody in here???/
Astrobytes: No.
KillZoneUK: what are you guys doing??
Astrobytes: No.
KillZoneUK: yall too uptight in here
Astrobytes: no.
KillZoneUK: int arg1 = in.nextInt();
KillZoneUK: can someone explain?
Astrobytes: No.
KillZoneUK: Astrobytes can you say something else other than no.
Astrobytes: No.
KillZoneUK: Astrobytes do you have any balls between your legs
Astrobytes: My sides are splitting.
metahom: hysterical
inoryy: Automaton2000 No.
Automaton2000: don't understand why it is not my problem
eulerscheZahl: cegprakash did the stream already start?
cegprakash: i just started
cegprakash: I need to check my mic
eulerscheZahl: we can hear you
eulerscheZahl: i hear your mic recording the stream audio and sending it again
eulerscheZahl: now it's fine
eulerscheZahl: just ask your question and skip the small talk
jacek: C# user spotted
eulerscheZahl: i know java too
eulerscheZahl: it's like C# in boring and verbose
Mak1000: Why gave up on Java ? lol
cegprakash: hey eulerscheZahl can you here me properly?
Nanosplitter: I would give up on java for c# any day if it wasn't required for my university
cegprakash: or should I talk louder or reduce music volume?
eulerscheZahl: annoying music as usual
Mak1000: Any Maths guru here lol
eulerscheZahl: :thumbsup:
jacek: java AND maths guy? does it exist?
eulerscheZahl: ceg invite zarthaxx
Mak1000: That is what you think
ZarthaxX: do NOT ceg
eulerscheZahl: fun clash: shortest mode and the CG timer is broken :D
eulerscheZahl: i bet he will submit
eulerscheZahl: ignoring shortest
eulerscheZahl: lol
eulerscheZahl: i knew it!
eulerscheZahl: you will lose now ceg. it's shortest mode
IjustKilledutoo: hello
IjustKilledutoo: i need a programmer friend
eulerscheZahl: your audio is better now ceg. and i forgot my twitch password
cegprakash: hey IjustKilledutoo join my twitch stream
cegprakash: twitch.tv/cegprakash
eulerscheZahl: you have some permanent background noise
IjustKilledutoo: hello @eulerscheZahl
eulerscheZahl: like a fan or some other electric device
IjustKilledutoo: hello euler
eulerscheZahl: hi IjustKilledutoo
Astrobytes: It's his fan euler, pretty warm in Chennai ;)
IjustKilledutoo: hi i m following you lets chat there
IjustKilledutoo: hello @Astrobytes
Astrobytes: Hi
DiL: I cannot use disableChat in query string anymore... timer doesn't work... someone knows why?
IjustKilledutoo: hello Dil
eulerscheZahl: the bug about the broken timer is reported already
IjustKilledutoo: okay
DiL: oh thanks! sorry to push it, I just found it :-)
MadKnight: what timer doesn't work ?
eulerscheZahl: https://www.twitch.tv/cegprakash
eulerscheZahl: showing 0 at the top
eulerscheZahl: that clash timer
eulerscheZahl: oh i pinged ceg
eulerscheZahl: sorry
DiL: the clash timer always shows 0 if you use disableChat
eulerscheZahl: no matter if you disable the chat or not
eulerscheZahl: it shows 0
DiL: wait... now i didn't use disableChat and timer is working fine for me
eulerscheZahl: cegprakash trailing whitespace
Insufficient: ok question about limitations of minimax
Insufficient: i know MCTS is better for ultimate tic tac toe but im learning this method first on that game
Insufficient: in python3 i can only look 2 turns ahead or i timeout sometimes
Insufficient: so i get an idea about order of differences
Insufficient: have any of you guys got a c++ minamax for this one that can look 3+ turns ahead?
eulerscheZahl: with python MCTS won't get you far either
eulerscheZahl: there are minimax bots in legend
eulerscheZahl: some players got around 8-10 i think (probably not in the first turn with huge branching)
dbf: I read somewhere that dbdr has minimax in UTTT
eulerscheZahl: zenoscave has one for sure
dbdr: dbf correct
eulerscheZahl: also: haven't seen you in a while, welcome back
Insufficient: ok, so they probably also have a much smarter value function, but can you look like 5 moves ahead in c++?
cegprakash: eulerscheZahl u were trolling when u wanted me to invite ZarthaxX right?
dbf: thanks, eulerscheZahl :)
eulerscheZahl: of course, wanted you to troll zarthaxx
dbf: mostly spend my freetime learning algorithm tasks, so had not too much time for contests :)
eulerscheZahl: like codeforces?
dbf: no, mostly books with some excercises
eulerscheZahl: slightly related: kotlin heroes on may 29th
eulerscheZahl: classic algorithmic problems, 2.5h duration
dbf: need to learn kotlin, lol )
ZarthaxX: dont troll me
ZarthaxX: im a good bear
eulerscheZahl: last time i coded in java and used the kotlin converter plugin from intelliJ
dbf: dbdr I don't like your minimax for uttt because I can't reach first place in java because of it :)
Astrobytes: lol, what a cop-out
Astrobytes: :D
dbf: is a java code also a valid kotlin code?
dbf: like with groovy
eulerscheZahl: can be converted mostly
eulerscheZahl: you have to add some forced allow-nulls
dbdr: :D so you'll be happy when i RIIR dbf
eulerscheZahl: dict[key]!!
dbf: on my job I copy-pasted java into .groovy files to run them without compilation on server
eulerscheZahl: :D
dbf: dbdr, yes, please
dbdr: one day
eulerscheZahl: RIIR? recode it in rust?
dbdr: https://transitiontech.ca/random/RIIR
dbdr: yes. rewrite, canonically
eulerscheZahl: close enough
cegprakash: eulerscheZahl there was still some noise during the stream
cegprakash: :(
LynxNoix: Hi guys
cegprakash: i think the noise is coming from laptop's fan
eulerscheZahl: an external microphone would help i guess
dbdr: you streamed eulerscheZahl?
eulerscheZahl: no
struct: it was ceg
dbdr: ah ok
eulerscheZahl: i only had a guest appearance on another stream once
struct: You streamed 1 time before didnt you?
struct: right
eulerscheZahl: code a la mode aftermath
eulerscheZahl: commenting on my bot
dbdr: cameo :)
eulerscheZahl: with a crappy microphone (or audio settings in the system)
eulerscheZahl: so sometimes the first word of my sentence was muted :D
Astrobytes: I remember that
eulerscheZahl: and speaking in real time with the streamer, while the image was about 30s behind
Astrobytes: The dude was completely misunderstanding you
eulerscheZahl: oh, didn't know you saw the stream too Astrobytes
Astrobytes: Yeah I saw some of it
Astrobytes: Some American guy, forgot his name
DiL: it seems now the timer issue has been fixed! wow, thanks everyone
eulerscheZahl: would be stressing to have a permanent 0 during the contest
cegprakash: hey eulerscheZahl
cegprakash: can u be my guest
cegprakash: during my stream
cegprakash: on Thursday
cegprakash: u can make some jokes on my code
cegprakash: u'll have a lot
cegprakash: co-cast with me
eulerscheZahl: i'll be busy with my own bot during contests
cegprakash: alright
eulerscheZahl: and you haven't seen me on the other stream
cegprakash: lol
eulerscheZahl: took me a simple "can you hear me" and smits said "i can hear someone with a german accent"
Astrobytes: hahaha
cegprakash: then smits is the guy I want
cegprakash: I want to be trolled
cegprakash: roasted
Astrobytes: I'll troll you in the chat ceg
Astrobytes: Since you asked nicely :P
cegprakash: :D
cegprakash: how is my Indian accent jokes apart
Astrobytes: Fine? I have no trouble understanding you at all
cegprakash: good :D
cegprakash: so I have hopes to get job in other countries
DiL: does anyone has good resources on learning dynamic programming (with python)?
Astrobytes: You can definitely get jobs in other countries, your English is fine
cegprakash: hey DiL if u understand arrays/multi dimentional arrays u can understand DP tutorial on any language
cegprakash: u don't really have to search for Python tutorials on DP
cegprakash: just search on youtube for DP tutorials
PetrutV: how is the ranking in clash of code calculated? or is it just time based?
struct: Depends on what type
struct: fastest and reverse = speed
struct: shortest = code length
jacek: its based on place
struct: Then it depends on ranks of other players
jacek: if youre 1st, doing it in 1 minute or 2 minutes doesnt matter
DiL: thanks cegprakash! i'm ok with multidim arrays, I'll keep on searching good videos, maybe I havent find a good one
Uljahn: Your rank in Clash of Code depends on your score which is computed with a TrueSkill-based system. Winning (resp. losing) a clash will increase (resp. decrease) your score by an amount which depends on the players you faced in that clash.
cegprakash: DiL also search for recursive DP implementations. I always do DP using recursion as the code looks so clean
cegprakash: it's difficult for me to think a DP problem in array.. because I always look a DP as a DAG (directed acyclic graph)
cegprakash: and imagining a DAG in an array is little difficult for me
cegprakash: so whenever u see a DAG, you can apply DP there DiL
DiL: ehi thanks a lot! these are the kind of tips I'm looking for
cegprakash: this you won't find on any tutorial
cegprakash: only very strong DP guys will teach DP = DAG
cegprakash: I'm one of them :D
Astrobytes: So modest :D
cegprakash: Astrobytes show me any DP tutorial which talks about DP = DAG
cegprakash: u can rarely find one
Astrobytes: I believe you man!
DiL: cool, so what's your youtube channel? :-)
cegprakash: wait.. I'll share..
Astrobytes: Interesting way to view it actually
cegprakash: https://www.youtube.com/watch?v=geKWw-Yill4
DiL: I struggle a lot with DP, mainly because I force myself to think to tables as a way to apply DP
cegprakash: there are 3 parts of videos
cegprakash: for the first part enable subtitles
cegprakash: I put in the subtitles by myself
cegprakash: :D
cegprakash: adding subtitles is a hectic job
cegprakash: :D
DiL: I'm definitely check it out. thanks again... I'll let you know about it:-)
cegprakash: cool :)
PluckyPenguin: evening / morning all how's it going?
JabrailzadeAli: what's up everyone
AntiSquid: AchrafLy
AntiSquid: acat ?
AntiSquid: oops sorry to the other guy i pinged
Dhruv-Garg79: hello guys,
Dhruv-Garg79: does anyone know how to find distance b/w two nodes in BFS without using parent.
zades: https://www.geeksforgeeks.org/find-if-there-is-a-path-between-two-vertices-in-a-given-graph/
zades: i think this might help
MSmits: if you just need the distance, you keep a property "travelled distance" on the nodes.
MSmits: the moment you hit your target, you also know the distance
MSmits: but this might actually be slower than just keeping a parent and backtrack at the end, counting nodes
Astrobytes: Info here: http://chat.codingame.com/pastebin/955c1d5a-e3bf-4edc-b9a0-5355205afff0
Astrobytes: stupid pastebin
Astrobytes: https://www.redblobgames.com/
Astrobytes: https://www.codingame.com/playgrounds/38626/optimizing-breadth-first-search
Astrobytes: hi MSmits
MSmits: the optimizing bfs link assumes you know the algo already
MSmits: hi Astrobytes
struct: Hi, I have a few doubts on mcts still
MSmits: ok
struct: So when I create root
struct: should I auto expand?
MSmits: your selection function will stop when it hits an unexpanded node. That should be your root
MSmits: should happen automatically
struct: So when it select unexpanded
struct: I expand and do rollout?
MSmits: yes
MSmits: you can use various methods to identify an unexpanded child
Dhruv-Garg79: Thanks MSmits, zades and Astrobytes. I finally did it using dist array. where dist[des] = dist[source] + 1;
MSmits: I used to look at visit count, but that may be bug prone. Now I just use my childindex property, if it is 0, then its unexpanded
struct: and the expanded child in that expansion matter for ayntihng?
MSmits: Dhruv-Garg79 good
struct: expanded childs*
MSmits: what do you mean struct
struct: So I selected a unexpanded node
MSmits: oh, you mean for the rollout?
struct: I expand and do full rollout
struct: yes
MSmits: you rollout from a child
MSmits: you can select the first one, but random selection could be better
struct: So the backpropagation will start from that child right?
MSmits: depends on how you code it
MSmits: my backpropagation doesn't go back
MSmits: goes from the top to the bottom
MSmits: i keep track of all nodes i selected
struct: Yeah I do something smilar
MSmits: and just loop over them
MSmits: that makes it so you dont need a parent reference
MSmits: makes a big difference if you have a node pool of 25 million nodes
Astrobytes: I forgot about that trick
MSmits: and none of them need the 8 byte reference
MSmits: 8 byte * 25 million = 200 mb
struct: So you talked about the random selection
MSmits: yeah i never actually do that
struct: I should do that while parent visits < x right?
MSmits: either i just pick the first one
MSmits: or I pick all of them and do a rollout for each child
struct: full rollout seems nice
struct: for each child I mean
Astrobytes: The random selection was Smitsi-specific iirc
MSmits: it's important you do the UCT thing when all children have been visited
MSmits: Astrobytes no i think it's a mcts thing
Astrobytes: For the first few turns
MSmits: you're supposed to select randomly to avoid bias
MSmits: for example if you're navigating a maze and your move generation always does a move left first. Then if you always select the first move, you'd be going left an awful lot
struct: Currently I use UCT, even if a children doesnt have visits
MSmits: depends on the game what the effect is
MSmits: that's going to crash you
struct: I just give it inf score
MSmits: there is a division by visit count
MSmits: ah why bother using UCT at all before at least N visits... there is no point
MSmits: you have no statistics
Astrobytes: In your smitsi writeup you select randomly before using UCT, so you have something to work with
Astrobytes: For like first 10 or so
struct: I use before N visits
MSmits: ohh right,
MSmits: I did do that
jacek: UCT for 0 visits is just inf
Astrobytes: ^
jacek: so each child will be visited eventually. unless you do some fixed low FPU
MSmits: Astrobytes I think this was mostly to avoid some sort of weird resonance, where both players keep selecting the same nodes. Random fixes that
Astrobytes: Kk, gotcha
MSmits: the thing is that when both players select a bad move, it's just as good as when both players select a good move
MSmits: so if they always select the same move, you're never gonna know what good moves are
MSmits: mcts does not have this problem at all
struct: I wonder how much will the mcts "fix" will change my bot
MSmits: if we're talking about UTTT, you wont see a difference, except you win more and rank higher
Astrobytes: lol, no difference
MSmits: if it works correctly that is
MSmits: well it's hard to know what a good move is aside from the obvious try to get 3 in a row
MSmits: and block the opponents
icecream17: Hey, at the compete section there's a 1 like its a notifications
Astrobytes: It's just the updated contest page
MSmits: Worked all day in the garden today so i dont have to do anything for 2 weeks :P
MSmits: maybe tonight or tomorrow I prepare all classes for next 2 weeks. There arent so many
Astrobytes: I've got an emergency x-ray at hospital tomorrow for my back, hoping I'm gonna be OK for contest :/
MSmits: sucks :(
MSmits: glad they could make time for you, a lot of stuff has been postponed
struct: The "make children" function in my mcts is the most expensive
Astrobytes: Our area is not hit too badly thankfully
struct: 40% of my code is wasted there
MSmits: with me it only used about 5% I think
MSmits: selection uses a lot though
struct: Yes but I dont think you call it 1765467 times :p
MSmits: during the game, not in the first few turns
MSmits: hmm
MSmits: I call it half that many times in the first turn
struct: Dont forget its not the true mcts
MSmits: right
struct: Mine is something different
MSmits: you did weird stuff
struct: I thought it was like this :(
struct: What I get for not reading
MSmits: you're not the first
MSmits: Maddy did this too
MSmits: on his first mcts
MSmits: pretty common mistake I guess
struct: In my defense it makes a bit of sence
MSmits: sure
MSmits: allright gotta go do some stuff, ttyl!
struct: cya
struct: and thanks again for explaining
Astrobytes: laters
icecream17: =O there are prizes?
struct: at the bottom
icecream17: Private clashes can have a lot more players. Hmm...
AntiSquid: wtf is going on Astrobytes? thought you would be more fit
AntiSquid: is it the sedentary life style ?
Astrobytes: I appear to be having some kind of spinal compression
AntiSquid: but how from what sinc when? is it something from years ago that just got worse with age?
Astrobytes: Getting numbness in my leg and face, as well as the back pain. No it's relatively new. Since this year
struct: damn :(
Astrobytes: I am normally fit and healthy
AntiSquid: well fingers crossed, might just be aftereffect of the virus ?
Astrobytes: No I've had some symptoms prior to the virus
AntiSquid: :/
Astrobytes: Meh. I'll see what they have to say, not gonna waste time speculating.
AntiSquid: get well soon
Astrobytes: Thanks man
AntiSquid: even Automaton2000 wishes you that
Automaton2000: i know what you mean
AntiSquid: see?
Astrobytes: lol
cegprakash: I'm streaming again.. I took my sister's headphones
Astrobytes: With permission I hope!
cegprakash: twitch.tv/cegprakash
AntiSquid: why was that detail important lol
AntiSquid: are they pink ?
AntiSquid: sorry too much celine dion in your stream
Astrobytes: lol, he's doing that just to troll us
Astrobytes: +he likes it...
Astrobytes: I sincerely hope I'm OK for the contest so I don't miss the opportunity to troll ceg on twitch :D
AntiSquid: cegprakash at the very least give baby metal a try lol, still better than celine dion https://www.youtube.com/watch?v=nDqaTXqCN-Q
Astrobytes: Gawd Babymetal lol
AntiSquid: ikr
Illedan: BabyMetal \o/
Astrobytes: That better be a Troll-edan
AntiSquid: stream with baby metal on :D
Astrobytes: lol ffs
Astrobytes: Music still too loud cegprakash, or did you turn down your mic?
AntiSquid: the headphone are to protect his ears from the song
AntiSquid: he might even have ear plugs underneath
Astrobytes: hahaha
Astrobytes: Does he realise he's in Fastes mode?
Astrobytes: *Fastest
AntiSquid: cegprakash try coldplay, it's normal music that isn't bad, you might enjoy it
Astrobytes: https://www.youtube.com/watch?v=afRqVmMf1Lo
icecream17: let's do a private clash where everyone joins
Illedan: wtf Astrobytes :P
Astrobytes: :D
AntiSquid: hey i like it lol
Illedan: https://www.youtube.com/watch?v=-PeeDCnoG3k
Illedan: ^
Astrobytes: I was gonna post https://www.youtube.com/watch?v=dQw4w9WgXcQ
icecream17: diagonal = hypotenuse
icecream17: = c^2
AntiSquid: oh a mash up ... kinda weird though, i prefer the disturbed song on it's own
Illedan: True, but that version is actually good
AntiSquid: seriously it ruins it for me :/
AntiSquid: no offense
Astrobytes: Yeah no offense but it's just as bad as the ones I posted :P
icecream17: i'm on a school account and it says "video has not been approved yet"
Astrobytes: Well...
Astrobytes: maybe not *quite* as bad
Illedan: You going to GA that one? :P
Illedan: cegprakash
Illedan: Binary search works though
Illedan: but :snail:
Astrobytes: FASTEST mode
Astrobytes: :P
Illedan: shhh
Astrobytes: :D
AntiSquid: if you train a model on it, it should know the result immediately !
icecream17: i never knew watching someone else code was so exciting
Astrobytes: Should have used the D
Illedan: 2 more min, can he do it
Astrobytes: Who does fastest in C++? Not that I clash any more but... seems ever so slightly counter-intuitive :P
icecream17: why not... redactedMathFunction(diag)
Astrobytes: Aaaaand not eve using namespace std;
Astrobytes: *even
AntiSquid: 32 sec
Astrobytes: "Oh no"
Astrobytes: :D
Illedan: Nope, no more time :P
icecream17: suspense
icecream17: TOP 3!!!!!
AntiSquid: no idea what the puzzle is
icecream17: You have diag and ratio between 2 sides are are trying to get the length of the sides
Astrobytes: cegprakash save some time and use using namespace std; if you must use C++
Astrobytes: So no more std::
AntiSquid: ah! but wait isn't that easy icecream17 ?
Illedan: You have to find the contribution to see the testcases
Astrobytes: Oh I see cegprakash
AntiSquid: listen to the background guy regarding the sneezing
AntiSquid: :joy:
Astrobytes: I heard something about handwashing
AntiSquid: is that ceg-metal ?
Astrobytes: It's 100% better than Celine Dion/instrumental Titanic soundtrack
Astrobytes: But ceg still has to do some singing for his contest stream
AntiSquid: https://www.youtube.com/watch?v=vLOuHLAhQe0 Astrobytes cegprakash
Astrobytes: FFS
Astrobytes: AntiSquid I raise: https://www.youtube.com/watch?v=_sk0W1_1sJ8
Illedan: cegprakash, diff is wrong?
Illedan: The radio you multiply with is not correct
AntiSquid: Astrobytes https://www.youtube.com/watch?v=FKlGHHhTOsQ
Illedan: Width and Length should not be equal on 16:9 :P
Illedan: cegprakash
LelouchVC2: 16 = 9, how could this possibly be misconstrued?
Illedan: cegprakash, look at your error printing..
Astrobytes: AntiSquid I win https://www.youtube.com/watch?v=bsKZ0mOBvfs
Illedan: cegprakash => you print equal length and width for all values
AntiSquid: but that's just random @_@
AntiSquid: thought we do some sort of metal / metal wannabe theme
Astrobytes: Yes, these are some punk band singers
AntiSquid: :/
Astrobytes: Fair enough: https://www.youtube.com/watch?v=M50lKtaE8rs
AntiSquid: Astrobytes https://www.youtube.com/watch?v=RRKJiM9Njr8
Astrobytes: goddamn I hate that song
AntiSquid: :D
AntiSquid: so i win? :thinking:
Astrobytes: meh
AntiSquid: https://youtu.be/Wdt1pzddYTI?t=67 ok do i win now?
AntiSquid: :joy:
AntiSquid: cegprakash play that song i just linked
Astrobytes: WUT! https://www.youtube.com/watch?v=YnbOhSGVbRg
Astrobytes: (very NSFW btw)
LelouchVC2: Are the top 10K ranked automatically in the dev team?
AntiSquid: lol that's just annoying :D
AntiSquid: wdym LelouchVC2 ?
struct: What do you mean LelouchVC2?
LelouchVC2: I keep getting notifications
Astrobytes: Good video. But yeah, I hate Dani Filth's voice
LelouchVC2: About accepting and rejecting contributions
reCurse: Ah you reached the damned level
AntiSquid: wait i think i know one that sounds more annoying Astrobytes
reCurse: Congrats, you will get those all the time
reCurse: Just kidding, they fixed it eventually
LelouchVC2: LoL, nice. I guess it's automatically once you reach a certain rank
reCurse: https://www.codingame.com/settings/notifications
struct: You can mute those notifications
struct: :)
LelouchVC2: 😂😂 Thanks
Illedan: cegprakash it is reversing the hypotenus formula
reCurse: Used to be all the time though
reCurse: Was fun
LelouchVC2: Thanks for the link, saved my life
Astrobytes: ceg massively overthought this
struct: Yeah, now we can only hope for Clash setting
Astrobytes: AntiSquid It cannot be more annoying than Coin Coin https://www.youtube.com/watch?v=jdznSjCW254
Illedan: cegprakash, first line is before I move the formula around.
icecream17: Most annoying song? That's reminds me...
LelouchVC2: "Invite me to Clash, earn a free ban!"
LelouchVC2: LMAO
Astrobytes: Oh actually AntiSquid https://www.youtube.com/watch?v=3dColJFx-jI
cegprakash: lets do more tomorrow guys
cegprakash: it's 3AM here
Astrobytes: Get some sleep cegprakash
Illedan: :zzz:
cegprakash: that colon thingy in input :(
cegprakash: I don't want to mess up something like this during Thursday stream
Astrobytes: Just delete the stream and deny it's existence...........
cegprakash: haha
Illedan: :D
Astrobytes: :P
Illedan: I'll stream the contest next week
struct: D stream?
Illedan: The stream!
Astrobytes: The only stream I usually watch in full during the contest is JBM's Haskell stream
LelouchVC2: I tried learning haskell for about 20 minutes
Astrobytes: Because I'm FP-curious and it's entertaining
cegprakash: okay my volume is too less
LelouchVC2: is there a "real" tutorial for haskell?
icecream17: i wikipediaed it.
Astrobytes: Real?
LelouchVC2: A good one I guess I mean
LelouchVC2: if you've learned haskell
Astrobytes: I'm very basic (ahem) in Haskell, I know a wee bit of Scheme and Racket
struct: Why do you want to learn haskell?
LelouchVC2: I heard it was an interesting language. I guess I'll leave it till later
struct: Im just asking, its always easier to get into it if you have an idea to do with it
AntiSquid: 2nd sunday legend stream Illedan :p
Illedan: :D
JBM: you can do, like, all CG puzzles
Astrobytes: I find Haskell quite elegant
LelouchVC2: I heard it described as a lazy language. Hopefully I'll get to it before I die
Astrobytes: At least to a noob such as myself
Flyingkid: Will we get to code in Swift soon :upside_down:
Flyingkid: ooh nvm its already there. where have i been. lol
LelouchVC2: In the shadow realm
Flyingkid: is it even shadow realm anymore. i think its called VRAINS or something now
Astrobytes: whoosh
AntiSquid: for a moment i thought it's tickles in chat, Flyingkid's avatar looked similar
Astrobytes: He's not doing any contests anymore afaik :/
AntiSquid: i thought its just ooc
Astrobytes: He wasn't sure. Have to wait and see I guess
LelouchVC2: Yea, Yu-Gi-Oh has like 10000 generations now
LelouchVC2: I liked GX because they brought Yugi into it in the beginning and end - and it also gets dark
LelouchVC2: But not hooking up with the hot chick to run off to see spirits pissed me off
Astrobytes: Yu-Gi-Oh? Sounds like you've got a stomach complaint or something
pmeikle: it's heavily implied i'm pointing a gun at you!
LelouchVC2: You've never seen it??
AntiSquid: are you saying teccles is a voice actor for yugioh?
Astrobytes: No
pmeikle: the english version of yugioh is way censored lol
LelouchVC2: Damn, childhood destroyed
Astrobytes: I have never seen it
LelouchVC2: Go watch yu-gi-oh
AntiSquid: talking to LelouchVC2
Astrobytes: No
pmeikle: yugioh abridged on YT, is funny
Astrobytes: How old are you
LelouchVC2: teccles?
LelouchVC2: I'm 12
Astrobytes: I am 37
LelouchVC2: Lol, I'm 20 😂
LelouchVC2: I say I'm 12 in video games
AntiSquid: yugioh is a very old japanese cartoon, i've watched it when i was 12 - 15 or so it aired on TV
LelouchVC2: Nice! I loved that show
Astrobytes: It must have passed me by squiddy
LelouchVC2: GX was a way for it to live on
LelouchVC2: But then it started doing some weird shit with ghosts and motorcycles
AntiSquid: plot twist Astrobytes i later realized it's just a monstrous advert for a children's card game
LelouchVC2: And every new generation had longer hair than the last
AntiSquid: the entire show is a fucking advert with a good plot for first season
Astrobytes: Like Transformers, with a plot
LelouchVC2: Yea, it's for a card game, but it was so good
Astrobytes: Except Transformers didn't even have a card game
LelouchVC2: Pokimon has a card game
AntiSquid: it's like pringles had a cartoon basically Astrobytes https://www.youtube.com/watch?v=96ELLT17GYQ
LelouchVC2: Listen to my demo <3 :
LelouchVC2: https://lelouchvbritannia.wixsite.com/voiceover
Astrobytes: Brb, cat's attacking my bass
Astrobytes: nvm, all good, was a moth
LelouchVC2: Lol! Nice pringles ad
Astrobytes: gotta love a bit of Rick and Morty
Astrobytes: Anyway, I'm out. Early trip to the X-Ray department. Laters all
AntiSquid: is that your site your voice LelouchVC2 ?
AntiSquid: bye AstroBoy58
AntiSquid: astrobytes gone nvm
LelouchVC2: @AntiSquid Yea :))
LelouchVC2: Idk how to make my message directed to a specific person xD
AntiSquid: nah it's cool, much better than my personal site
AntiSquid: (i don't have one)
mpt: Took me days to do the Nintendo challenge. Very hard indeed...
yashjain27: i got a google interview question
yashjain27: https://www.geeksforgeeks.org/maximum-sum-such-that-no-two-elements-are-adjacent/
yashjain27: i felt that this was wayyy too hard for an interview question. any thoughts?
Uljahn: Automaton2000: pls respond
Automaton2000: i need to read it
Uljahn: ok
KiwiTae: yashjain27 not too hard to be honest
fvla: this is easily solvable using dynamic programming
OrdoFlammae: I'm having a lot of trouble with the Ghost in the Cell puzzle, where the input for 'entityCount' is always zero. I'm not sure why this is. I'm using Clojure, but I don't think the language should affect anything.
fvla: if you haven't made significant changes, then restore default code
LelouchVC2: These clashes get so retarded
LelouchVC2: I'm sitting here with working code having to make like 10 conditions for spacing because the tests can't deal with it
LelouchVC2: If there's an extra space at the end, the tests shouldn't freak out!