From CG community
Revision as of 05:29, 10 May 2022 by Chat Log (talk | contribs) (Created page with "<img src=/a/42613726657704> Quidome: nice lectures on the topic <img src=/a/42613726657704> Quidome: take your time to really understand these topics it pays off <img src=/a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Quidome: nice lectures on the topic

Quidome: take your time to really understand these topics it pays off

Quidome: when you are competing here

Default avatar.png BigBadStopwatch_4678: lol.. just trying to do interview prep

Default avatar.png BigBadStopwatch_4678: tomorrow is last day to prep, so don't want to get bogged down too much in any single algorithm

Quidome: maybe the isbetter

Default avatar.png BigBadStopwatch_4678: ty

Default avatar.png BigBadStopwatch_4678: writing code to get data from REST APIs is so much easier than this stuff.. lol

Default avatar.png Kokoz: Hello all, Can someone help me with my project in python? ^This is an example of what I have to do. I have a list with events and the output should be week1, week2 etc.. The probelm is that I dont know how to do the string thing in week1, week2 where events are one under the other. Any help would be appreciated :)

antiwonto: [auto] Hey Kokoz, here is a :taco: for loggin in today while it is quiet. You now have 1 tacos

Default avatar.png Kokoz: yey.. You boy got his free taco

Default avatar.png Kokoz:

RivalRickson: hi

antiwonto: [auto] Hey RivalRickson, here is a :taco: for loggin in today while it is quiet. You now have 2 tacos

Gaurav.: we getting tacos?

Gaurav.: guess not :(

gokubill: hi con cặc

Default avatar.png letiii: hi

Quidome: hello

antiwonto: [auto] Hey Quidome, here is a :taco: for loggin in today while it is quiet. You now have 22 tacos

jacek: :upside_down:

antiwonto: [auto] ':upside_down:' was defined as ' ɥǝllo '

jacek: :taco: Automaton2000

antiwonto: [auto] jacek has awarded Automaton2000 10 tacos. Automaton2000 now has 51 taco. jacek now has 32 taco

Automaton2000: i know you can use the same thing

Automaton2000: it's just a lot of the stuff

Darleanow: Hello, i have a question concerning python functions arguments

Darleanow: the * one and the ** one

Darleanow: correct me if i'm, the * is for any amount of args, but what about ** ?

j4at: kwargs

Nik05: hey Darleanow

Darleanow: Hello j4at, yeah i know, but i don't know the difference !

Darleanow: hello Nik05, it's been a while !

Darleanow: because for *arg you can give variable amount of args

Darleanow: which is the same of kwargs no ???

j4at: and using **kwargs you can variable amount of keyword args

j4at: and then it get transferred into a dict inside the function


Darleanow: OH I THINK I GOT IT

j4at: np :)

jacek: numpy

Darleanow: format of arg is tuple and format of kwarg is dict

Darleanow: ty :)

Darleanow: def test(*arg,**args):


Darleanow: /flip

Darleanow: (╯°□°)╯︵ ┻━┻

Default avatar.png AurAa: (╯°□°)╯︵ ┻━┻

derjack: (╯°□°)╯︵ :upside_down:

antiwonto: [auto] ':upside_down:' was defined as ' ɥǝllo '

Default avatar.png Mr.Electro: newbie here

derjack: oO

HHChandar20: ei shmatkiii

HHChandar20: lqgaite we baluci

HHChandar20: \slabaci shte vi biq vsichkite

5DN1L: English only please, and observe the code of conduct


HHChandar20: You little shit

antiwonto: [auto] HHChandar20 be respectful and watch your language

HHChandar20: shut your mouth

HHChandar20: motherhacker

5DN1L: kicked, next is ban

Default avatar.png ARTUMLU: hiii :)

Default avatar.png ARTUMLU: you know ecole 42 ?

Default avatar.png TheFlyingdidgeridoo: bnjourrrrrrr

Default avatar.png TheFlyingdidgeridoo: do you know kaique 69 ?

5DN1L: do you know the code of conduct?

Default avatar.png Ivivihinizler: guys, I have made a game of son goku :

5DN1L: no spam please, or get kicked out

Default avatar.png TheFlyingdidgeridoo: Nazileri seviyorum

Default avatar.png Ivivihinizler: I'm not spamming , паличка

5DN1L: English only, please

Default avatar.png Ivivihinizler: простите

5DN1L: both have been kicked

5DN1L: next time is a ban

Default avatar.png otapan: helloo

cagriy: hello from turkey

Default avatar.png ARTUMLU: tr tr tr tr tr tr tr tr

5DN1L: no spam please

Default avatar.png ARTUMLU: sorry

Default avatar.png ARTUMLU: 5dn1L what do have a staff title

Default avatar.png ARTUMLU: ?

5DN1L: i'm not CG staff

Default avatar.png ARTUMLU: what is your job ?

5DN1L: It's not a job. I'm a moderator here, that's all

Default avatar.png ARTUMLU: ı couldn't explain

Default avatar.png ARTUMLU: what your real jop

Default avatar.png ARTUMLU: job

Default avatar.png ARTUMLU: not gc

Default avatar.png ARTUMLU: cg

5DN1L: this is not the place to talk about myself

Default avatar.png InstantWin: don't be shy


Default avatar.png InstantWin: why are you linking that

5DN1L: Reminder to all newcomers here to observe the code of conduct

Default avatar.png InstantWin: Quite obtuse response considering it was just friendly chat.

5DN1L: Sorry, but this chat is for coding-related topics only

Default avatar.png InstantWin: You're hyper sensitive and overreacting.

Default avatar.png otapan: youre right bro 5dn1l

5DN1L: Please stop or I'll kick you out InstantWin

Default avatar.png InstantWin: You're overly emotional and defensive in a situation that doesn't require escalation. I am going to report you're too easy to set off.

5DN1L: Feel free to report me

Default avatar.png otapan: Please talk good things , tell each other usefull things and be polite all time

Default avatar.png tantheman: so true

Default avatar.png tantheman: positivity people!

blop200: wassup

Espequair: banging my head against the entry code puzzle

Urutar: Additionally, try to stay on coding related topics; there are other channels for anything else if necessary

Urutar: Do you need help with the puzzle, Espequair?

Espequair: eh, I think i figured it out mostly, it's just a matter of executing

Urutar: Alright^^

Espequair: I'm just trying to balance out spaghetti code and understandable code

Espequair: wait no

Espequair: I've found a counter example for my algorithm

Espequair: I'm just a couple of digits off

Espequair: some examples work, others don't

derjack: have you tried forum

Espequair: oh no, not yet, this is just me complaining

Default avatar.png Ythough: hello people around the earth

Default avatar.png HenroLST: whats earth

Default avatar.png HenroLST: im from Mars

Default avatar.png trentdestroyer: ayo trent

Default avatar.png trentdestroyer: u a lil bitch

DegenGaming: Bitch ass

antiwonto: [auto] DegenGaming be respectful and watch your language

5DN1L: both kicked. next is a ban

Urutar: Thank you for that .

Default avatar.png trentdestroyer: dame

5DN1L: thanks Urutar for thanking me

5DN1L: :)

Default avatar.png trentdestroyer: was just testing the stuff

Urutar: Why people feel a need to swear and insult so much, I'll never get

Urutar: Sure 5DN1L :)

5DN1L: neither will I

Default avatar.png trentdestroyer: we friends we testing the site

Urutar: There are private channels...

ZndrBrok: 5DN1L is calm like a rock ! And the one who pretend that u are to much sensitive should maybe check the mirror :P

5DN1L: I won't judge :P

ZndrBrok: offtipic => off

ZndrBrok: :P

Urutar: And why do you feel the need to test manners or social rules / netiquette?

Urutar: Eh, back on topic I guess^^

Urutar: I think I'll try my hand at/on creating a submission :) (which one is correct? Trying ones hand at or on sth?)

5DN1L: contribution?

Urutar: Ah yeas

Urutar: That's the one I meant

DegenGaming: lol

5DN1L: nice, will check it out when you've submitted it

Urutar: Might take a while - is there a playground here on cg where I can test this stuff, or should I just start creating one?

5DN1L: I think you can create it and keep it private and test first

Urutar: Neat :)

ZndrBrok: Do a CodinGame who use somehow "chat rules" :P Even like a input... All chat moderators will upvote your contribution :P

Urutar: Not a bad idea, but not what I had in mind for now - but how about you make that one? :D

Yozamu: Hey dudes, regarding community puzzle, any hint ?

Espequair: just be worry of the Scunthorpe problem Urutar

Yozamu: I mean finding a solution is a thing, but having the smallest one..

Espequair: try to compute how long the solution *should* be, it'll give you a pretty good hint

Yozamu: Are you advising to make something like brute force ? Like, a backtracking thing ?

Yozamu: Because I kinda wanted to avoid it (I'm bad at simulating things, never know how to store / organize data) but if that's the way..

Espequair: nah, not really

Yozamu: ah

Urutar: The Scunthorpe problem? You mean, putting accidental swear words in the submission?

Urutar: I think I'll be able to avoid that^^

Espequair: more like, as a problem the players should take care of urutar

Espequair: Yozuma: but if you know how long the solution is, you will get a pretty good hint at how the solution is built

Urutar: Alright? Not quite sure where that should lead me though

Yozamu: Hmm ok, not sure how it should help me, unless it just makes me understand a specific pattern to build the sequence

Espequair: :)

Espequair: Urutar : yeah, your contribution should make sure the solutions don't fall for the problem

Espequair: if you do do an automoderator

Urutar: Ah, alright

Urutar: Nah, not doing an automoderator; I'll create a regular puzzle I think

Default avatar.png Tony_Hu: hello

Default avatar.png xernphoton: hi guys

NewCoder09: hi

Default avatar.png Tony_Hu: oh god, I don't understand the question :(

jacek: which question

NewCoder09: Tony_Hu what's the question?

NewCoder09: jacek do you think you could help me with my spider attack silver league formation?

jacek: im on low silver myself

NewCoder09: oh dang :joy:

NewCoder09: your ranked 116 above me

NewCoder09: you're*

Default avatar.png Tony_Hu:

Default avatar.png Tony_Hu: lol

NewCoder09: what league are you in?

Default avatar.png Tony_Hu: i want write in C#

NewCoder09: what league

NewCoder09: did you just start it?

NewCoder09: is it telling you what to do?

Default avatar.png Tony_Hu: i think so

NewCoder09: ok thats the tutorial

NewCoder09: is it telling you to make something x,y?

NewCoder09: ?

Default avatar.png Tony_Hu: invalid input. Expected 'x y power' but found '30003000300033000 50'

Espequair: looks like there's only 2 numbersthere, it's expecting 3

NewCoder09: i just want to know how you can't do tutorial its simple it tells you what to do


NewCoder09: so i accidently turned caps lock on

NewCoder09: sorry

StevenV: :D

Urutar: Tony_Hu, maybe you should write '3000 3000 50' instead of '30003000300033000 50'?

Urutar: Seems like you munged up your output somehow.

NewCoder09: where is this in tutorial

NewCoder09: ?????

Urutar: I think this is in mad pod racing and not the tutorial.

Default avatar.png Link_jon: print("answer") instead of calcuate answer then print

Default avatar.png Link_jon: oh appearntly i was 7 lightyears behind in chat

Urutar: No problem, happens to best of us^^

Default avatar.png Link_jon: so uh. whats happening down here?

StevenV: hello guys

NewCoder09: it has to be the tutorial because i followed him and i dont see him on this board anywhere

NewCoder09: my brain hurts now

NewCoder09: hello StevenV

Default avatar.png Tony_Hu: I'm sorry I just started playing this, I'm not very proficient, why doesn't it even show a style input?

Default avatar.png Tony_Hu: hello guys

NewCoder09: just follow the tutorial

StevenV: well, spider attack seems have a lot of Lengends

StevenV: 500 lengend now

GuillaumeDrillaud: Hi Automaton2000

Automaton2000: hey guys how do i get the option to override any customization and leave things to default, i'm fine

StevenV: do you mean the "restore default button" on the upper right of the ide?

StevenV: Hi antiwonto

antiwonto: [auto] hey StevenV. I'm a bot :robot:

NewCoder09: Automaton2000 gave the best story line the other day

Automaton2000: can i have a question for you

NewCoder09: Automaton2000 sure

Automaton2000: but if he is not a problem with my code for the game

Default avatar.png seechingwoo: hai

Urutar: Welp, I think it's time to release this submission into the wild :D

Urutar: How long does the submission process usually take? It seems to be stuck :thinking:

Urutar: Ah, nvm, it worked.

Urutar: Automaton2000 A nice day to you and everyone else.

Automaton2000: i guess there is some kind of search

Urutar: Automaton2000 A search for a nice day?

Automaton2000: but do you compute log(parentvisits) for every children? or just once and just put the value there

Urutar: Automaton2000 Yes.

Automaton2000: if you dont know the rules

Urutar: For anyone interested, I'd appreciate any and all constructive feedback:

Westicles: it looks good to me. should get approved

Urutar: Thanks^^

Urutar: Well, I'll be off for now; I'm curious as to how it will be received :)

blop200: I think it's really cool

blop200: but I I think it would be useful to mention that vowels are z's and consonants are s's

blop200: cause it's not completely clear at first

blop200: @Urutar

Default avatar.png waterproofsodium: gm



Default avatar.png MuriloLopes: Gm

thanos27: hey guys hows it going

TRAPGODZAY: yo murilo

TRAPGODZAY: eat a frank

thanos27: shut up bitch

thanos27: a

thanos27: a

thanos27: a

5DN1L: please observe the code of conduct or get kicked out

TRAPGODZAY: lame ahhhhhhhh


thanos27: hey gutys

thanos27: i'm sorry about that

5DN1L: ok, please behave or i'll have to ban you next time

TRAPGODZAY: :poop: <--- 5DN1L

thanos27: I've since reviewed the code of conduct and read line 26 where it states that I must obey the moderators

thanos27: so they feel powerful

5DN1L: TRAPGODZAY don't disrupt the chat again or get banned

thanos27: yeah come on man

thanos27: not freaking cool

thanos27: hey 5dn1l

5DN1L: it's not cool to cause disruption

thanos27: how old are you

5DN1L: please stick to coding-related topics only, thanks

thanos27: i'm trying to see if I'm a good age to be coding

thanos27: that's why I'm asking

thanos27: because i'm sure you're a master

5DN1L: not convincing

5DN1L: please practise to get good

thanos27: how about you practice getting some bitches dude, dumb soy boy fat neckbeard you probably still live with your mother

5DN1L: banned


antiwonto: [auto] TRAPGODZAY be respectful and watch your language

5DN1L: also banned

jacek: Oo

Urutar: Bloody hell, why do people insult so much? I seriously don't get it.

Try to uplift people to your level, don't drag others down into the abyss with you... just my 2 cents.

5DN1L: Agreed

Default avatar.png thekindboy: well as you said they are in the abyss so they try to drag others down with them , we just gotta hope they recover!

Default avatar.png Brawler_zx: has anyone tried the entry code yet?

Default avatar.png Frankybboy: I'm working on it right now

Default avatar.png Brawler_zx: cool

Default avatar.png Frankybboy: haven't logged here for 5 years, it's hard to set the brain back into puzzle solving mode instead of my regular web dev mode

Default avatar.png Brawler_zx: I am new

Default avatar.png Brawler_zx: so same for me

Default avatar.png Brawler_zx: but i was wondering if the puzzle can be solved with next+permutation function and recursion

Default avatar.png Frankybboy: i'm probably not the best person to answer these questions, i'm kinda just winging it honestly

jacek: its medium so it cant be that hard

Default avatar.png Soffss: the get a job button is so intimidating, im being judged even by a button :sob:

Diamon0: I get the feeling

Darleanow: 5DN1L i love u

bdrnglm: Hello

bdrnglm: I have a question

5DN1L: Darleanow :)

5DN1L: bdrnglm Just ask

mdaw: Is there only one puzzle to solve in this event?

5DN1L: yes

bdrnglm: I took a certification test

bdrnglm: And I believe one of the test I've got during a Clash of Code as well

bdrnglm: is there a way to retrieve it ?

bdrnglm: I couldn't resolve it on time, and I'd like to figure out what I did wrong

5DN1L: You may try searching here:

bdrnglm: <3

bdrnglm: Thank you

5DN1L: np

jacek: they give clash questions in certification test/

5DN1L: I think it's modified

5DN1L: I saw some too

5DN1L: not entirely the same

jacek: they should use space maze for test :imp:

5DN1L: lol

bdrnglm: I found it ! Thank you again ! :)

5DN1L: np :)

Default avatar.png feptkdie: Almost done

StevenV: hello guys,

StevenV: should I learn python before trying NN?

5DN1L: depends on whether you want to write your NN in python, I guess?

jacek: NN can be written in any language. python has more tools and libs for that

Default avatar.png Ryanless: any good in-deptdiscussion or tutorials for multi-agent system... al the page gives are some wiki links -.-

Default avatar.png Ryanless: all*

StevenV: I think I need to understand those libraries like Tensoreflow,... then try to apply them into problems like those multi on CG

Darleanow: Guys, i was wondering if it was possible to convert a string to a class object (in python) for example, is there a way to convert "p1.get_perimeter()" to p1.get_perimeter()

10100111001: Not 100% sure but I think eval("p1.get_perimeter()") could work

Darleanow: okay thanks !!

Darleanow: and is there any utility of using dir function in a python program

Darleanow: because it gives all the functions associated to a type/var

MSmits: StevenV worrying about using tensorflow for multis is like worrying whether your outfit is aerodynamically optimized when jogging.

Sabsterrexx: yeah eval() function would work for calling a class using a string darle

Sabsterrexx: and idk what you mean by ultility of using dir() can u be more specific

Default avatar.png Link_jon: (i mean. i usually use lua. on of the least usefull things ever)

MSmits: just use normal algorithms and techniques, get top 10 and then worry about it. In most multis there isn't even a NN at the top. It's mostly boardgames

jacek: maybe he wants to solve that bioengineering problem with NNs

MSmits: which problem?


Darleanow: dir gives u every functions associated to a type, try a print(dir(list));

Darleanow: but i was wondering what was the use of it ??

MSmits: oh right that problem

jacek: isnt dir used for duck typing?

Darleanow: wut is duck typing ?

MSmits: :duck:

j4at: I wonder if is there o(n) solution for the events puzzle. I can't guess it :(


Default avatar.png BigBadStopwatch_4678: if it looks like a duck, then it'll be treated as a duck

Default avatar.png Link_jon: there is, its just going to be a pain

Darleanow: AHAHAHHA

Darleanow: naughty boy >:(

Darleanow: so basically what you're saying is that it's only use is for giving functions of an object ?

MSmits: j4at I don't know either, but there is probably some systematic way to approach it. It's always best to start with 000 for example (the amount of 0's based on the sequence size)

MSmits: and after that, 0001

MSmits: or however many 00s, just with a 1 at the end

MSmits: maybe look for the smallest code that fits almost completely (except the last digit)

Default avatar.png Link_jon: definitely need a main loop to continue untill if finds a string containing each (theres another loop) Agree with MSmits, garrentee its best to start with a string of zeros, due to left to right number, and we need as small as possible. the 'as small as possible' part is the biggest problem

j4at: Well i aready know that starting with 0s is guaranteed to work

MSmits: probably it's best to do it heuristically and see where heuristics go wrong

Default avatar.png Link_jon: pretty much yeh

MSmits: where it goes wrong, you add some brute forcing

j4at: I tried but the system is gets complex later

Default avatar.png Link_jon: biggest problem it will have is at '100' type numbers

j4at: I don't want to add brute forcing tho

MSmits: maybe heuristics will be enough

MSmits: have you succeeded in making a solution work?

Default avatar.png Link_jon: i have yet to begin coding so...

MSmits: just any solution, not necessarily the shortest one

j4at: I already have a solution that works :3

j4at: But I need a O(n) one

Default avatar.png Link_jon: we require the shortest one

MSmits: No you dont understand

MSmits: I mean do you have a solution that fits the requirements except it isnt the shortest

MSmits: based on heuristics

Illedan: You can't have O(n) You need O(x*n)

Default avatar.png Link_jon: i guess we could probably trim from that heuristic

Default avatar.png Link_jon: hm

j4at: I mean by n length of the result

j4at: and length is not x*n it's x**n +2

MSmits: What if you do this: Start with 000, then make a list of numbers that fit the best (only need 1 extra digit, otherwise 2), add the smallest of those.

jacek: so far no question in the forum

MSmits: x**n+2 is also O(x**n)

MSmits: Illedan said you can have O(x*n)

j4at: yep

j4at: but it's not x*n

MSmits: your solution isn't

MSmits: maybe the best one is

j4at: Yeah it seems he knows better then me

MSmits: I am guessing he solved it

Illedan: Did not :P

Illedan: Looking at it now

MSmits: Seems hard for a medium puzzle

Illedan: Agreed

MSmits: but maybe there's a simple thing we are missing

MSmits: I am sure you could make some GA to optimize it, but it may miss the best solution

Illedan: Yeah, that wouldn't be acceptable for a medium puzzle

j4at: indeed

Default avatar.png Link_jon: ... i just had an idea... gimmie a min (hour)

Default avatar.png Link_jon: i believe i have the secret. its.... kinda simple. and i am probably skipping steps in my head

MSmits: should get that looked at :P

Scarfield: xD

Default avatar.png Link_jon: the fact im skipping steps? hm. probably. ill find out

Illedan: Hm, at worst 729 strings to order

Default avatar.png Link_jon: anyway i think its as easy as just literally comparing the value of the codes to eachother and making sure you dont put higher value codes in front

MSmits: yeah but they need to match digits to compress

Illedan: True

Default avatar.png Link_jon: hmmmmm. dang this just got harder

Default avatar.png Link_jon: i forgot about overlaps

MSmits: that's half the puzzle

Default avatar.png Link_jon: thats like 80% of the puzzle. the rest is coding your answer lul

Default avatar.png Link_jon: sigh. need an algorithm to find simplest overlaps

Default avatar.png Link_jon: and even then it will need fixing due to shortest might not be bestest from numbers being in places that cause biger total number

Default avatar.png Link_jon: pft i bet a random number generator could eventually solve the puzzle

Default avatar.png Link_jon: lul

MSmits: yes, you should outsource to a million monkeys on typewriters

Default avatar.png Link_jon: just apply some checks and random

Default avatar.png Link_jon: rerandom everytime it gets it wrong lul

Default avatar.png Link_jon: XD

MSmits: for laughs, please translate lul from Dutch to English

jacek: so, GA?

Scarfield: xd smitsi

Default avatar.png Link_jon: huh

jacek: oO

MSmits: just letting you know what a Dutch person thinks when you use that in a conversation :)

Default avatar.png Link_jon: and ive just been randomly reapplying vowels to lol. thats strange

jacek: lulz

j4at: GA doesn't make sense here

MSmits: well the Dutch used it first so :P

j4at: there is probably an easy solution

Illedan: BruteForce ftw

MSmits: yeah i am sure there is

j4at: Bruteforce is slow :3

Scarfield: lel is also an abbriviation of Low Elo Legends from t90 (a age of empires streamer/youtuber)

Default avatar.png Link_jon: brute force is basically random like i was talking about

mdaw: best solution is to put all answers into map, you can't beat that

MSmits: bruteforce is a bit of a misnomer sometimes. It can have a lot of smart pruning in it and still be bruteforce

Illedan: Some Trie might work

j4at: Randomly checknig is even worst than my solution rn :3

MSmits: random will be bad yeah

Scarfield: which is the bruter brute force, a smart one, or an optimized one

Default avatar.png Link_jon: optimized

MSmits: yeah

Scarfield: but a brute isnt smart

MSmits: if you make it too smart there is a point where you cant call it brute force anymore. Optimization will never stop it being brute force

Default avatar.png Link_jon: exactly

MSmits: minimax is brute force, ab pruned minimax is still brute force

jacek: is this it?

MSmits: similar i guess

Scarfield: thats only for 2 strings?

Scarfield: yea

struct: Hi

Default avatar.png Link_jon: Hai

Scarfield: oi

struct: Scarfield I only need to parse inputs now


Scarfield: Nice!

struct: Graphics will still need work

struct: Im not very happy with it

Ose: Hi

Illedan: I think this event is supposed to be solved like a tree. As you need to combine as many as possible in 1

struct: also I have a few design questions

struct: should a player get multiple turns in a row for each dice

struct: or output all moves in the same turn?

derjack: 40th in search race! NN with degree and thrust output only

struct: Nice derjack

Illedan: Nice derjack :)

Scarfield: all moves in one i would say. when hitting double, you get 4 moves

jacek: eeyup

Scarfield: how many inputs?

Default avatar.png Link_jon: ugh

jacek: in connect6 you would do 2 moves in one turn?

Default avatar.png Link_jon: trying to figure out how to calculate every single possible pattern

derjack: 8 - vx, vy, sin(angle), cos(angle) next cp dist x, next cp dist y, dist x cp1cp2, disty cp1cp2

Scarfield: no angle cp1cp2?

derjack: solves in 350 while my GA search in 334

derjack: it can figure it out from dist x and dist y, no?

Scarfield: oh yea, misread

Scarfield: but cewl :)

struct: yeah my current referee handles all at once

derjack: but this is hard solves in 198 and my GA is 110

Illedan: Looks very good :)

struct: But then plays one move per frame

Illedan: Bad link derjack?

Scarfield: btw struct, when hitting 2 dice of the same number, you get 4 moves, 4 turns in a row and 4 moves seems too much of an advantage?

derjack: :x

struct: well I have that rule

Illedan: Yeah, that map is hard :D

struct: of 4 moves

struct: But to remove is just 1 line or something


Scarfield: im just saying my gut feeling is that its more fair that you output all your moves same turn, not a turn per dice

struct: yes I have that

jacek: imo you need to print all moves in 1 turn

Lavecki: anyone able to help me out on The Descent. I know I need to use mountainH somehow but I dont know what will pull that value

struct: you can also output random if you want :)

struct: Also the moves you output must be in the correct order

Scarfield: correct order?

struct: well 1 move can change the future moves

MSmits: jacek that's like that childrens game where they jump on the numbers

jacek: Lavecki you need mountainH to find index of highest mountain

MSmits: only you do it with a car

struct: if you move c1 to c3 and you had no pieces on c3 then you can move c3 to c5 on next move for example

Lavecki: yea i know that much, just not sure how to get it to relate to each mountain. Sorta stuck

Scarfield: ah sure

jacek: MSmits skip jump?

MSmits: yeah that

jacek: Lavecki there are hints on the left

MSmits: Lavecki, you have a main loop where you output a move and within that you make your own move to select the highest mountain to attack

Lavecki: ok, ill just keep trying

MSmits: make your own loop sry

MSmits: I think the main problem coders face when they first try The Descent is just understanding how the main loop works and the input/output

MSmits: once you get that, future puzzles become easier

Lavecki: yea, i know what i need to do, just not how to do it

Lavecki: im also very new to coding, so not sure if thats part of it or not

MSmits: are you doing this in python?

Lavecki: java

MSmits: allright, so you have the while true loop right?

MSmits: thats the main loop

Lavecki: yea, got that

MSmits: within that is a for loop. The for loop goes by all the mountains

Lavecki: yep, grabs each mountain height for mH

MSmits: you have to make a variable called "tallest mountain height" or find a better name

MSmits: and also "tallest mountain indeX"

MSmits: but make a shorter name for them

MSmits: the index is between 0 and 8

MSmits: you initiate tallest mountain height to -1, then check each mountain to see if it's taller than the tallest mountain so far

MSmits: if its taller, you store the index in the tallest mountain index

MSmits: once you are past all mountains, you have the tallest mountain index and you output it

Lavecki: feels like the given mountainH is superfluous then

MSmits: no its not, you need to know the height

MSmits: otherwise you dont know which is tallest

Lavecki: k

Lavecki: ill keep working on it then

MSmits: you have an if statement saying if ( mountainH > tallest_mountain_H) talles_mountain_index = i or something like that

MSmits: oh and also update the tallest_mountain_H variable to the new tallest height

struct: also one more design question sry, should I even give a player inputs if he will have no moves to output?

Scarfield: it would make it easier for players wanting to reuse tree, but not necessary

MSmits: dont they need to know the history of the opponents moves?

struct: I will just give all the moves opponent did

MSmits: ah

Scarfield: yea makes sense

struct: if you passed for 3 turns in a row

MSmits: best is to test it out, write a bot for it, see what is easier

struct: I give 3 turns pending

struct: I dont write bots

MSmits: not often but you do write them

struct: I never wrote a bot to test any of the games I ported

MSmits: that's true

Scarfield: but then i cant make a bot using the entire time to think about all the things it cannot do

jacek: then how do you make bosses?

MSmits: poorly :P

Scarfield: darkhorse makes them :p

MSmits: oh he makes them hard

struct: I would delete othello and release it again with the book thing

struct: But too many players

MSmits: the book thing? You mean forced random starts?

struct: yes

struct: not random

struct: Balanced openings

struct: +1-1

MSmits: random balanced openings you mean?

struct: I guess

jacek: xot8

MSmits: i mean there has to be some random, or i can still just book it

Lavecki: MSmits, got it thanks

MSmits: ah great :)

Scarfield: :muscle:

struct: large list has 10k openings

struct: +2-2

jacek: but othello is release long ago, and only recurse rage quited over books

struct: the small has 3.6k

struct: yeah

MSmits: 3.6k is more than enough

MSmits: the +1 -1 part is annoying though

MSmits: that means the game is already solved against one of the two players

MSmits: the bots are good enough that this may decide the game, some make hardly any mistakes

struct: yeah

MSmits: but 0 0 starts will be quite rare

struct: It will probably make no diference

MSmits: there arent many 100% balanced starts unfortunately

MSmits: (starts that are guessed to be solved as a draw)

struct: or I can just do like amazons

struct: I dont even check if its balanced or not

MSmits: well it will cause noise on the leaderboard to have unbalanced starts. I don't know how bad that is. It may not be

struct: But no one plays that game

MSmits: clobber is unbalanced by definition, amazons too i guess, no draws right?

struct: yeah

struct: its possible because you play 2 games though

MSmits: with a sufficiently complex game it makes no difference

MSmits: but othello is not very complex

MSmits: like oware and bandas and such. They are near-solvable

MSmits: then balance is pretty important, because bots make too few mistakes

struct: so similar to c4?

MSmits: yeah similar, though i think c4 is less complex than othello

MSmits: amazons and clobber arent though

jacek: they are all complex for bots within 100ms

jacek: or has science gone too far?

struct: depends on the computer

MSmits: mmh i dont know. If i analyze those oware games, you have 200 turns and for the top bots maybe 2 or 3 mistakes

MSmits: c4 similar

MSmits: othello also, i completely counter booked dbdr and there were a few versions of his gameplay where he played flawlessly

MSmits: so i would draw those

MSmits: bandas is a perfect example of a game where the unbalanced start hurts a lot. The best bots can solve the game after 10 moves or so. In many starts, you can tell from the mcts statistics that there is no way to win

MSmits: it would have benefitted from mirror games

MSmits: but then you'd have a ton of draws among top bots, like in uttt

struct: Well its fair

MSmits: yeah

struct: You dont want to lose because of unbalance.

MSmits: I agree

struct: Maybe backgammon will also have this problem

struct: But blame java rng

MSmits: I will

MSmits: I just looked at java for that descent puzzle

MSmits: made me think there's more to blame java for :P

MSmits: anyways, gotta go for a bit. I'll try to be online a bit more in the near future. I want to go back to coding more. I should have some time

Scarfield: sounds good :) cya

MSmits: bye :)

Scarfield: but i think java has been blamed for everything already

MSmits: yep, I am just piling on

Default avatar.png Link_jon: java causes OOP

Default avatar.png Link_jon: caused*

Default avatar.png Link_jon: and that is its biggest crime.

struct: cya

jacek: kree java!

struct: Scarfield what should the output be if a player wants to move a piece that is on the bar?

struct: bar = eaten peace

Scarfield: if a player has a piece on the bar, its the only piece it can move, so could just be the dice number

struct: currently its only dice and number, so: cout << "d6" << endl;

struct: ok

Scarfield: you can get many pieces on the bar when in a bad situation, so id not needed i would say

struct: I meant d and dice number sorry

struct: I guess I dont need the d

Scarfield: xD

Scarfield: im holding back improper comebacks

struct: Ok its pretty much ready now

Scarfield: sweet

struct: I think replay in same conditions will not work well with secure random

struct: but w/e

Darleanow: hello again guys

Darleanow: anyone have idea on how to put a lambda inside a print


j4at: That should work

j4at: Darleanow

j4at: You are maybe forgetting to input the input.

jacek: or to move it move it

Default avatar.png Watsonka99: Hi, wondering if anyone can help. I'm trying to implement a beam search but the majority of the resources I find are related to NLP. is there any good I can look to learn more aboutit

pindsz: @Darleanow, not sure if it's what you wanted but... print((lambda n:n*n*n)(int(input())))

Noneoneoneone: hows it going everyone

Darleanow: no, it's working guys

struct: Now the real question 50 or 100ms?

Darleanow: i just want to know how i can shorten it

bingler: print((lambda x:x*x*x)(int(input())))


Default avatar.png quandaledingle: hey fellas! quandale dingle here

bingler: lmfao what's up quandale dingle

Default avatar.png asdjfkl: hello!

Default avatar.png Seanski_2005: goodbye!

jacek: :no_mouth:

jacek: struct backgammon seems quite complex game, so maybe 100ms

struct: ok

struct: im gonna write stub now

jacek: stub

NewCoder09: sdtub

NewCoder09: stub*

Default avatar.png Link_jon: ... the autogenned lua code got me to rank 260 in code royale.


Default avatar.png Link_jon: i didnt even know i was ranked at all

Default avatar.png Link_jon: i guess i randomly poked at it sometime or another

NewCoder09: im about to try code royale haven't tryed it

Default avatar.png carstenhag: is it normal that the tests take ages to run?

NewCoder09: tried*

NewCoder09: carstenhag yes that is normall

Default avatar.png carstenhag: sad :D

jacek: what tests

Default avatar.png carstenhag: test cases

NewCoder09: for what?

Default avatar.png carstenhag: clash of code

Default avatar.png carstenhag: what else is there?

Default avatar.png carstenhag: apart from the bot game thing

jacek: they are fast

VizGhar: :) there is more... but you are kotlin dev I see

jacek: puzzles, optim puzzles, multiplayer games, codegolfs

jacek: oh, kotlin compiler has some problems here

VizGhar: Kotlin compiles probably slowest of them all

Default avatar.png carstenhag: ahh ok i only use kotlin haha

NewCoder09: yeah

Westicles: so the achievement for starting 12 events, is that really for 12 contests? it doesn't seem connected to puzzle/clash events

NewCoder09: hi Westicles

Westicles: hey NewCoder09

VizGhar: Idk... but I receives +1 for "hidden contest" i didn't even submit to

Default avatar.png carstenhag: is there a way to see an overview of code clash puzzles?

NewCoder09: before you start?

Default avatar.png carstenhag: yeah :)

NewCoder09: no

NewCoder09: sadly

Default avatar.png carstenhag: ah thats too bad

jacek: that would be not fair for reverse eh

Default avatar.png carstenhag: I can link to a contribution but there's no list? weird


struct: jacek make a NN to write statements please

jacek: ask Automaton2000

Automaton2000: that would be too much for me

NewCoder09: is AutomatonNN working?

struct: rank 1 nice

Default avatar.png Link_jon: kkewwwwwllnesas

jacek: struct bash D starter codes not working :v

struct: too bad

jacek: and fox already there

jacek: is based on secure random?

j4at: struct. even state of the art NN can't do that perfectly :grimacing:

struct: cg yeah

struct: actions must be outputted separated by a ;

struct: Ill add the statement later

Default avatar.png waterproofsodium: jacek is always in this chat

Default avatar.png waterproofsodium: I just found a video from early last year where he was here

jacek: huh

Darleanow: print((lambda x:x*x*x)(int(input())))

Darleanow: bingler if u still there

Darleanow: when u pass the X arg

Darleanow: its determined through the next parenthesis which is the input() right ?


bingler: Darleanow (idk how to ping)

Darleanow: u pinged, its when u write the name ;)

Darleanow: okay thank you man !!

bingler: ofc ofc

struct: oh I can play the same game even with secure random

struct: It just doesnt seem to work locally I guess


antiwonto: [auto] hey MAWAAW dont paste those links here. Use the channel #clash

darkhorse64: struct: regarding dices, I'll suggest that you give only two numbers

struct: ok

darkhorse64: let the user sort out doubles

struct: but keep the rule

struct: ah ok

Default avatar.png waterproofsodium: when will my clash score update?

Default avatar.png waterproofsodium: it did not update for 3 days :unamused:

struct: because its harder to climb and you will get less points

struct: you already have 4.8k out of 5k

struct: to get 5k you need rank 1

struct: I think I already told you this

Darleanow: hello guys, i'm struggling on this code :

Darleanow: class Coordinate:

Darleanow: i get raised a Type error

Darleanow: TypeError: add_coordinates() missing 1 required positional argument: 'c2'

Default avatar.png waterproofsodium: struct I am wondering why id doesn't update. because my score is constant all the time. even if it's "harder to climb" it should change at least 1 score point as my performance is not constant

struct: waterproofsodium the formula should be 5000**((410784-2744+1)/410784)

struct: 410784 is the number of players in clash leaderboard

struct: 5000 is maximum points

struct: 2744 is my rank in clash

Default avatar.png waterproofsodium: yay

Default avatar.png waterproofsodium: completed a clash as 1 of only 2 people :P

Default avatar.png waterproofsodium: and thanks for sharing the formula

j4at: Darleanow you need to use @staticmethod decorator

j4at: like this

j4at: class Coordinate:

Darleanow: i solved it using a different way

Darleanow: just had to init object before assignating values to it

j4at: You can also set default values for x and y and then do this class Coordinate:

Dren: or just define an __add__

Dren: class Coordinate:

j4at: yes a lot better

j4at: I finally found an O(n) solution for the event's puzzle not even O(x*n) :D It took me only serval hours :3

Default avatar.png chrz: can someone give me a hint on "Shadows of the Knight - Episode 1"?

PatrickMcGinnisII: chrz gone?


Dren: r/codingame doesn't seem very active

Default avatar.png chrz: No

snoyes: chrz: what's the secret to winning at Guess Who ?

Default avatar.png Link_jon: ...dumb question: whats O(n)

Default avatar.png Link_jon: or moreso just; whats O

snoyes: means as the input gets longer, the time/space it takes increases linearly rather than, for example, exponentially,

Default avatar.png chrz: I never played :D

jzen: Link_jon

Default avatar.png Link_jon: huh

Default avatar.png chrz: so back to shadow of the knight. Right now im just using if statements to catch the strings and adjust my x/y accordingly

Default avatar.png Link_jon: so im guessing you managed to do the pain that i thought would need at minium three for loops... in one for loop length of n (length of code) ?? err. sorry about interupting the knights table

Default avatar.png Link_jon: well. code that we output*

snoyes: Link_Jon: So it's not really about the lines of code; it's more to do with how many times you go through a loop, for example.

snoyes: If you make a single pass with no looping, then it's O(1), regardless of how many lines that single pass is. It doesn't change for a longer input.

Default avatar.png Link_jon: Yeah. n == length of the code in that puzzle. Characters

Default avatar.png Link_jon: not lines of code

snoyes: If it's O(n), that means double the input takes double the time or storage space

snoyes: If it's O(n^2), that means double the input takes 4 times the time or space

Default avatar.png Link_jon: hmm. O(n) is generic isnt it

Default avatar.png Link_jon: i was thinking you were refrencing the variable from the puzzle, for whatever reason.... even after looking at the O(n) and how its logic

snoyes: chrz: and how do you decide where to jump next?

Default avatar.png chrz: Im getting the next direction each run "while true"

Default avatar.png chrz: i suppose

snoyes: ok, that's the direction, but what coordinate do you go to?

snoyes: you don't take a single step

Default avatar.png chrz: oh i do

Default avatar.png chrz: like this

Default avatar.png chrz: else if (bombDir == "UL") {

                   X -= 1;
                   Y -= 1;

Default avatar.png Link_jon: (Oh hey isnt that a C..?)

snoyes: chrz: you don't want to take a single step; that will take too long in most cases.

snoyes: you want to make a big jump

Default avatar.png chrz: Are you proposing something like (xmax - x) / 2? should be more efficient your way but i cant even make a single jump with my code

Default avatar.png Link_jon: h

snoyes: something like that

jzen: chrz Are you remembering to actually output the coordinates?

Default avatar.png chrz: System.out.println(X + " " + Y);

jzen: And it doesn't jump at all?

Default avatar.png Link_jon: mmm. Does the elseif statement to change the cords actually trigger? (Aka are you going to the same place each turn)

Default avatar.png chrz: no it kinda stays on 2/3

Default avatar.png Link_jon: Then... debugging awaits. (Probably start by looking into )

Default avatar.png Link_jon: bombDir (woosps)

Default avatar.png chrz: how to display values in java? If i try to system.out variables it screws up the code

Dren: system.err.print

jzen: System.err.println();

j4at: Link_jon well n in this case is number of characters

j4at: number of characters of the solution. so N=x**n

Default avatar.png Link_jon: ahh ok

Saurabh15987: take tacos

antiwonto: [auto] Hey Saurabh15987, here is a :taco: for loggin in today while it is quiet. You now have 1 tacos

Saurabh15987: take tacos

antiwonto: [auto] That taco command has moved to the #taco channel

j4at: take tacos

antiwonto: [auto] That taco command has moved to the #taco channel

RivalRickson: hi