Chat:World/2021-09-10
**a.S.i.T slaps around a bit with a large fishbot
Alec801: :eye::tongue::eye:
derjack: so its friday again ~
elimazariegosr: https://www.codingame.com/clashofcode/clash/1957648969c51d150814d77fc681d1add522db6
Illedan: Please keep chat free of COC links. use #clash
JSboss: CoC anyone?
elimazariegosr: https://www.codingame.com/clashofcode/clash/195767705359ae5a2a57a247ad221bbb70b5052
bear314: :pensive:
ESMAKING: mHello
MiyamuraIzumi: Hello guys
derjack: good morning
ESMAKING: pls help me get good at programming
Uljahn: how?
BlaiseEbuth: MAgic
MiyamuraIzumi: practise make perfect
Uljahn: or use magic pills "Instaprocoder"
ESMAKING: yes?
C26_1: I'm just learn "how to good at programming" by a coder
C26_1: He's very good at programming
ESMAKING: oh wow, tell me more pls
C26_1: He's say that you don't need to compare yourself with other
C26_1: That is 99.99% reason that a programmer will give up their job
C26_1: Also, practice makes you better and better at coding
BlaiseEbuth: :violin:
C26_1: If your job's salary is not high enough
C26_1: compare to your freinds' job salary
C26_1: Everyone has their own life
ESMAKING: thank you so much, now im ready to be best programmer
BlaiseEbuth: Don't compare to others... Except for salary.
BlaiseEbuth: :3
C26_1: Maybe your boss or a lot of your friend has more money than you, but who cares, maybe their job is harder or their lovers is stricter at money
C26_1: Any pros come from noobs being
C26_1: so don't worry if you didn't become a pro yet
C26_1: Does you to expect that you can speak when you 5 months old?
C26_1: So. That's it. That's all things that I can say
C26_1: i think programming is rely a lot on math and your google skill
C26_1: becuase anyway, every single question that has been ask in programming language sovled
C26_1: You just need google it
C26_1: 10% your success on PG is only rely on your computer or how many money you have
Uljahn: C26_1: do you want to be a better coder or just to flood the chat?
C26_1: I'm just introduce tips for beginners, I thinK?
BlaiseEbuth: lel
Uljahn: look at your level, jeez
ESMAKING: dont be rude
derjack: just start making projects. they can be simple. the code can look ugly. just start doing something
Uljahn: i doubt someone can give valuable tips while being noob himself
derjack: overcome any problem youll get
BlaiseEbuth: If you have a heart let him speak and give him a :thumbsup:
derjack: mods dont have hearts
Uljahn: :broken_heart:
ESMAKING: uljahn is idiot!!!
derjack: oO
BlaiseEbuth: Baba C26_1 found a disciple for his life coaching lessons :o
bear314: :kiwi:
Manjius: :expressionless:
mkkhell: hey
Manjius: hello pickle rick
mkkhell: hii matrix
mkkhell: i can beat anyone in clashh of code-- reverse mode
mkkhell: challenge me if u dare...
mkkhell: :smirk:
gugrbywitkr: what language are you using mkkhell
mkkhell: c++
mkkhell: https://www.codingame.com/clas
mkkhell: https://www.codingame.com/clashofcode/clash/1957978d1efaf865e5c0fc00cc5311bc6a9a6c0
mkkhell: the bottom one
mkkhell: nvm i made a mistake
mkkhell: sec
mkkhell: https://www.codingame.com/clashofcode/clash/19579811be34a172fdfc7b64380e5ff3c503855
_NikJ: Python codegolfers: Many CoC require outputting lowercase boolean true/false. Python print True/False by default, what is the shortest way of making it lowercase?
gugrbywitkr: i saw ['false','true'][bool]
gugrbywitkr: but its not shortest probably
Uljahn: 'ftarlusee'[bool::2] is shorter
Uljahn: the hint is from https://www.codingame.com/blog/code-golf-python/
eulerscheZahl: Binary or language-specific outputs should be avoided in CoC.
Some output formats favor specific languages and make the contribution unbalanced.
eulerscheZahl: https://www.codingame.com/playgrounds/40701/help-center/contribution-guidelines
eulerscheZahl: bad task design when you even have to print "true"/"false"
MohED: who wants to play coding escape
sprkrd: The whole idea of code golfing is unbalanced anyway
codeing: hello gays
codeing: for this thord problem, does anyone can optimize this solution ?
codeing: https://www.codingame.com/ide/puzzle/power-of-thor-episode-1
codeing: https://pastebin.com/CARJScyQ
codeing: thx
sprkrd: May the gayest person answer that
ProCoder03: should it be shorter or faster ??
codeing: bith
codeing: both
sprkrd: no point of making it faster, really, it's not like you can't squeeze so much performance from such a simple task
sprkrd: mind you, you can do it shorter
sprkrd: may I suggest checking other people's solutions?
sprkrd: You can do that once you solve a problem all by yourself, which seems you've already done
ProCoder03: have 2 variable dirX and dirY, and do it with just 2 if else
ProCoder03: don't have umpteen elifs
codeing: k
sprkrd: (if in doubt, check others' solutions, again, that's something you can do)
chop-chop: Does it possible finish https://www.codingame.com/training/easy/rectangle-partition by python?
Uljahn: ye, in around 15 lines
z64555: @codeing I recommend using nested ifs to start off with. One comparison per if makes it easier to read
z64555: "try to make your code so that a blurry eyed, hung over you can understand it" seems to work well
chop-chop: @Uljanh, thx
GerJoe: how can I learn something here if I don´t know what to do in the clash???
derjack: then do puzzles, not clashes
GerJoe: ok. there you can learn?
chop-chop: I skip such clashes and take new one. and one by one steps learning
Uljahn: do some tutorials first (not on this site)
GerJoe: I did tutorials, I learned JS but I suck at using it...that is why I found this site, which should help me why I learn...at least that was in the ad
Justin-Truong: WHo want to play coding escape
Uljahn: then try easy puzzles, solve classic ones first (without an author specified)
derjack: try descent, thor, temperatures
Uljahn: ye, also mars lander, horse racing
MiyamuraIzumi: :(
Uljahn: look for hints tab on the left
Uljahn: some puzles have it
MiyamuraIzumi: we have tutorial, if I remember correctly
MiyamuraIzumi: the onboarding
MiyamuraIzumi: which specify only if - else copy for csb
Justin-Truong: the codingame learn is kind of hard
Justin-Truong: the different of hard between puzzle sometime i think is too high
Uljahn: copypasting a solution from github shouldn't be too hard for you :smirk:
Justin-Truong: so i think i don't know how to learn from this site
Uljahn: try new things, profile, optimize, repeat
chop-chop: deploy? >-<
Uljahn: ye, it's friday deploy time!
Justin-Truong: deploy?
derjack: its a peanut butter jelly time!
MiyamuraIzumi: D
MiyamuraIzumi: now I have tiime to improve my MCTS with solver :D
MiyamuraIzumi: are you there Wontonimo? I am setting a goal to beat you in UTTT
cypher_glyph: How much of this is probabalistic?
ProCoder03: what is probabalistics??
Uljahn: Automaton2000 should be deterministic i guess
Automaton2000: this game is too random
ProCoder03: Hello Automaton2000, good to see you !!
Automaton2000: there's still a lot of nodes
AllYourTrees: have you thought about deleting nodes at random
AllYourTrees: fight randomness with randomness
AllYourTrees: stick it to the man
Uljahn: node dropout
AllYourTrees: :joy:
jacek: mcts with solver eh
Rag: when is next box challenge coming?
Rag: bot*
Limonade: Hello guys what's up
Limonade: just please Nicola debanne moi chakal
BlaiseEbuth: No.
MiyamuraIzumi: Hello guy
MiyamuraIzumi: should I learn Python
MiyamuraIzumi: I only learn to expand my mindset
AlexNance: then do it :)
AlexNance: I've been wanting to learn Python as well
MiyamuraIzumi: but maybe there are better
MiyamuraIzumi: I want to horn my mind a bit
MiyamuraIzumi: and I already know java/javascript/typescript/c++
quentin_aa: yes of course
quentin_aa: Hello guys what's up just please Nicola debanne moi chaka
nicola: Insulte-moi encore une fois et tu es banni.
quentin_aa: Please unban Limonage c un bon gars
quentin_aa: Limonade
jacek: my c4 net is jumping during training :(
eulerscheZahl: my yare bot is jumping too
eulerscheZahl: there's even a jump() function
eulerscheZahl: also: unban? there is no unban command
jacek: Automaton2000 wwhat's unban?
Automaton2000: so when you xor them normally, you just get a good result
ArturWWL: Is everything ok with site? My Web IDE cannot connect to language assist. It keeep saying (in console) Couldn't start client CodinGame go Language Client
darthinvader666: haha just beat my dad on shortest because of 4 spaces
jacek: domestic violence eh
struct: hi
jacek: oO
struct: you mention c4 and you summon me
struct: jacek you are also improving your c4 bot?
jacek: im making some experiments
struct: o.o
struct: please have mercy on my bot
struct: Do you even train vs non NN bots?
jacek: everything is self-play
struct: I dont think your bot has the problem that jolindien has though
struct: Maybe you do something diffferent
jacek: what problem
struct: If I increase my exploration factor to 1000 I win every game vs him
struct: or almost every game
jacek: "it was like that before" https://img-9gag-fun.9cache.com/photo/a9ExgGo_460svvp9.webm
jacek: sounds randomish
struct: yeah
struct: robo had same problem, but he fixed it
LeksoGelekva: algoritmebis azrze ar var
struct: https://www.codingame.com/replay/579905412
struct: has you can see
struct: this is with 1000 exploration facto
struct: with -1,0,1 score for rollouts
struct: maybe his bot always go into this line
darkhorse64: He detects his loss quite late in the game unless he is playing a very bad move suddenly
jacek: blinds posts eh
struct: I'm sure he will be able to fix it
darkhorse64: Usually you can predict the outcome 20 moves before the end
struct: yeah I only detect 1 frame before him though
struct: I feel like bt is the only game where I solve earlier than other players, at least the ones that show it
struct: But with 1k exploration factor I cant expect to solve early :D
darkhorse64: It could be because evaluations cost so much that he cannot go deep down the tree
jacek: costly policy eh
struct: you need to code
jacek: :scream:
struct: please ping me before you submit
struct: so I can close the tab :(
jacek: no soon submit, i promise
struct: uff, I can sleep in peace
Astrobytes: Or can you... :thinking:
struct: o.o
struct: What am I missing
struct: the code I write
struct: If you meant the language I mostly use C++
jacek: up up down down left right left right b a start
struct: http://chat.codingame.com/pastebin/f71aaed9-7ff0-4aeb-8ce6-c0561de2308d
struct: There you have a snippet of the ugliest code I wrote
jacek: c4?
struct: it was for selection with avx
struct: its not worth
struct: Maybe its due to the thing im doing with the status flag
struct: its way too dirty
struct: maybe instead of a flag I can set score
struct: But I never bothered
struct: Since more sims wont really matter imo
Astrobytes: struct: re "Or can you" https://youtu.be/HwtBEQT9Uck
struct: lol
struct: I didnt know this reference
struct: I think we have CN on portugal
struct: But I didn't understand English well enough when I was younger
Astrobytes: Gumball was classic, stop watching it when his voice changes though, wasn't the same after that
jacek: kek https://twitter.com/GDNonline/status/1435938249567055875?s=07
struct: again?
jacek: but only for hours it seems
jacek: definitely somethings going on with my c4 net. the one submitted is just lucky
struct: :scream:
Maxim251: I have technical question, On toturial in French I readed that he thinks that POINT to describe bot position is easier if will be made as class obiect... I want ask You coleques if is better to use obiect POINT to hold x, y values, or stor it straight in bot class. I am using C++ but that question is aplaying to any obiect oriented language
jacek: tutorial in french?
jacek: and i'd use class
darkhorse64: It all depends if you want to use OOP design for your bot. I would say do it because it will allow you to have arithmetic operators on points and simplify your code
struct: just do it like me and code everything on main
struct: Maxim251 where is this tutorial? and which part is it
Maxim251: http://files.magusgeek.com/csb/csb.html
Maxim251: I want rewrite Coders Strike back and as reference I want use his experience.
struct: using pointers is fine
struct: if you dont want to make copies of the gamestate and such
struct: its a design choice
struct: you can either have
Maxim251: But i want use OOP .. as exercise.
struct: GameState { Pod pods[4]; };
struct: or GameState { Pod *pods; };
Maxim251: O yes, in future that can be usefull
darkhorse64: Please note that his comments on Vector class are somewhat outdated. My recommandation is to use it. I did that without any loss on performances
struct: I usually go with the first approach
struct: maxim also if you can provide a simple snippet so I can understand better what you want to do
struct: Ill try to help a bit more
struct: Can be code non related to csb
jacek: struct doesnt trust classes. theyre hiding something
darkhorse64: Same. If you know in advance your data size, no need to allocate it
Maxim251: https://tech.io/snippet/qnhahU1
Maxim251: its starting point, how I think it should look OOP desighn. But this time I want put functions in proper classes, not all functions in one class...
struct: looks ok if you are getting into it
struct: also I would make checkpoints static so all pods share it
darkhorse64: int distance( POINT p ) -> int distance(const Point&p). You are making uneccessary copies
Maxim251: Thats why I try use a reference from Frenche tutorial, because its the closest of what I want
struct: ah darkhorse is right
struct: When you pass a struct/class without reference it copies it
Maxim251: Yes, I know... But for now, I want focused at OOP desighn
struct: this is what my csb would look like +-
struct: Point Checkpoint has Point; Pod has Point; GameState has Pods and Checkpoints
Maxim251: last time, I was exercising inheruitance In C++. Now I want learn what functionality brake in to parts, that whole class structure, will look nice and simple
darkhorse64: my personal taste: don't use accessors on trivial data structures
struct: something like that
darkhorse64: struct: agree with you except CheckPoint is a Point
struct: you are right
Maxim251: Then rather use BOT{ Position position;} Easier is using BOT{ intx, int y; } Because is trivial and its no need to over complicate it?
Astrobytes: Agree with darkhorse64 re. accessors on trivial data structures, ESPECIALLY on CG
struct: Position position is fine imo, so you can share methods from Position
struct: Maxim251 also I would check inoryy csb code so you can get a better idea if you are lost
darkhorse64: I would not do that. You will to reimplement distance to Point for Pod
Maxim251: Oki... I think is easier pass Pos, rather using ( x, y )
struct: By Position I thought he meant point
darkhorse64: Yes
Maxim251: Thats the point, csb I look at his code, but for me, his desighn of classes looks litle wired.
Astrobytes: Yeah, why pass x and y when you have a Point class?
jacek: thats pointless isnt it
Astrobytes: It's not meant to be a shining example of perfect OOP practice
Maxim251: I was using always pair< int, int> to store position, but csb uses class.
Astrobytes: It's hints and tips for implementing a bot for CSB
Astrobytes: Yes, because sometimes you might want to inherit from your Point class, but not inherit from std::pair
Maxim251: Ooowww... Thats good point
Astrobytes: There are many different approaches
Astrobytes: You might implement your pods or checkpoints or whatever with std::pair, but it would be a completely different approach from this
Maxim251: Yeah, less duplicating obiect creation for pos...
Astrobytes: Anyway, sorry for butting into the conversation :D
jacek: :unamused:
Astrobytes: Feel free to continue, I'm leaving
Maxim251: Have good night, or day...
YurkovAS: does anyone have an example of DUCT algorithm?
struct: https://github.com/Ludeme/LudiiExampleAI/blob/master/src/mcts/ExampleDUCT.java
struct: I found this
struct: but havent read it tbh
struct: Only saved the link
struct: But i think ludii code might be a bit hard to read
YurkovAS: thanks!
jacek: recently you are quite interested in ludii, struct :thinking:
Pappijx: can anyone help with calendar problem
Maxim251: How I can use int distance, I am struggling between bot and checkpoint. In game I have input distance between Bot and Checkpoint, I have class BOT and class Checkpoint, where is the best store integer distance?
Pappijx: Given a start date with a known week day, your program must compute the day of the week at another date anytime in the same year.
YurkovAS: Maxim251 use float, store in stack :smile:
Maxim251: http://www.javaproblems.com/2012/12/displaying-calendars-with-java-solution.html
Maxim251: yeah,,, I dont care about return type, In OOP I have two classes, and I have value of distance, i dont know to where store that value, in bot class or in checkpoint class, distance is lenght between bot and checkpoinyt
Maxim251: or create new class, and stor it there?
Maxim251: for calendar problem, maybe it helps https://www.dreamincode.net/forums/topic/211937-calendar-program-problem-in-c/
YurkovAS: calc distance when you need it,
with float return type, and store it in local variable (stack)
YurkovAS: for csb i'm use distance in eval function only, don't store it
Maxim251: #YurkovAS Thank You. thats make sense.
YurkovAS: but i'm bad coder: write in "c with classes" style, without oop, inheritance, new and other
Maxim251: Yeah, I go straight to deep water, I start in C++ , But first steps was like in C. OOP is for me interested, because some things I can brace in parts, like in C using struct, I can describe some real word obiects , and I dont need to worry abut names colisions
Maxim251: #YurkovAS bad coder, and GURU?
Maxim251: Oh, I wish to be in so high place, to be 0.1%
YurkovAS: https://github.com/inoryy/csb-ai-starter/blob/master/main.cpp good csb example
struct: YurkovAS on highload can I use multiple threads?
YurkovAS: struct see info in Restrictions: 1 CPU
struct: so entire cpu?
struct: not only 1 core?
Maxim251: Wow, super, I start to read it... At least I have nice example how construct classes, what functionality is nice to brake in seperaste clases. And I see that You use inheritance for point...
YurkovAS: but Unique strings v2 - 3 CPU
struct: ah, my solution was only using 1 core / thread
YurkovAS: use mmap from wiki https://github.com/Highload-fun/platform/wiki/How-to-use-MMAP-to-optimize-data-reading
struct: yeah I used mmap
struct: but that was about it
struct: i got like 38k on parse integers
struct: Maybe if I use more cores I can improve
YurkovAS: struct :thumbsup:
YurkovAS: with gcc compiler?
struct: yes
YurkovAS: i'm without avx in Parse integers
struct: only 1 core?
YurkovAS: yes 1 core 1 thread
struct: o.o
jacek: 2 girls 1 core
YurkovAS: 1 girl = 2 cores + 2 threads
Maxim251: #YurkovAS hey Did You use base code from that site? http://files.magusgeek.com/csb/csb.html
Maxim251: Its looks so simmilar.
Maxim251: Anyway, I am happy for that example. thank You
YurkovAS: Maxim251 yes, use it for simulation. But with smitsimax search algo https://www.codingame.com/playgrounds/36476/smitsimax
Maxim251: I dont care about simulation, for now for me is too advanced, but example of inheritance and composition, thats what I want to train with.
Maxim251: xv and vy its the last pos of bot? And is used to calculate velocity? or speed?
YurkovAS: i'm recommend use GA algo (as in example) for first. You can reach 50+ with it
struct: Maxim251 you get more inputs in gold
struct: you get all checkpoints on first turn and the velocity of the pods
Maxim251: If I will fill stronger with desighning classes, and composition, then I will go level higher. Problem wit me is that I alwas make mess in one of the classes, because I cant brake functions acording to the class. Your example looks good, like I should make.
struct: OOP can be tricky at the start
BobLob: I'm getting language assist interruptions. Is that on my side or is it sitewide?
darkhorse64: A good starting point is to consider that a class contains the data it is responsible for and that its method deals with that data. In this respect, a pod will never contain the list of checkpoints
jzen: BobLob: I am getting it too
BobLob: ok, thanks for the information. I'll take a break for a while and check back later.
NordTechSystems: I have the hardest time understanding these questions....
unthinkable: anyone want to vc on the disc server and work it out togeateher
whateverxd: d3if akhay @averiz
marco8: Am i the only one here who feels like they have no idea what they're doing?
marco8: i realinse that they the inputs are taken with " print( ' input ' ) " statement but thats s far as i got. someone help please.
marco8: and literrally anything else. tired of googling
unthinkable: sorry im not doing that one lol
marco8: well essentialy iv never completed a challenge on this website without googling the exact answer and the forums dont help at all. is it because i dont have programming experience or is it the i dont get the concept of coding overall?
unthinkable: sometimes it is hard to formulate a way of approaching a problem
unthinkable: it is not because you are "bad at coding"
unthinkable: honestly it just takes experience
marco8: iv been trying code challenge websites for 6 months now so i can get the experience. I relly dont know what to do now. i hardly even understand the sulutions when i find them.
unthinkable: then the way you are working is not good
unthinkable: just staring at a problem and hoping you will think of a solution wont work
unthinkable: you need to get some help
unthinkable: or the discord is a very friendly place
unthinkable: i just got taught by an amazing stranger who helped me out
unthinkable: without him i would have just been mindlessly losing my way
unthinkable: so find some help
Westicles: lol, I got banned from one of the twitch streams
jacek: happy Caturday
iWishICouldJS: i have a coding game aptitude test tomorrow, shall i use clash of code as practice or work through the exercises easy,medium.. etc?
ProCoder03: well is it aptitude test for professionals ??
iWishICouldJS: junior software developer role
iWishICouldJS: they said it will be a "CodinGame Aptitude & Coding Test"
Westicles: I haven't done it, but the usual answer is easy puzzles
iWishICouldJS: well i'm currently doing the "ASCII art" puzzle and let me just tell u its not looking good lol
Westicles: I'd try something else, ASCII art puzzles in general can get very tedious
iWishICouldJS: alright sweet, ill try another one.
NinjaPuffin1: what day does the 'weekly puzzle' rotate
Justin-Truong: THe ASCII art is hard and i don't understand it
Uljahn: you're lvl 23, so it should be ez to find the solution on the internet as always :relaxed:
Uljahn: at least you'll learn something while copying it, right?
Justin-Truong: yeah
Justin-Truong: I searched from internet for that tricky puzzle
Justin-Truong: and why you know that