Chat:World/2022-05-07
zicknacker: hi people...just write down from which country you are all from??
StevenV: I'm from Mars
ITPTIT_CATGUIN: ITPTIT
5DN1L: no spam please
5DN1L: https://www.codingame.com/playgrounds/40701/help-center/code-of-conduct
jacek: happy Caturday
Adeeb_007: hi
jacek: :upside_down:
abt8601: :upside_down:
Mjdoo: :upside_down:
Mortis_666: :)
PatrickMcGinnisII: :scream_cat:
waterproofsodium: :sunglasses:
jacek: :taco: Automaton2000
Automaton2000: or at least i think so yes
StevenV: ?
StevenV: ah, yes. u r right.
waterproofsodium: blunder don't suicide we still need you to work for us..
waterproofsodium: what a sad problem
jacek: oO
waterproofsodium: https://www.codingame.com/ide/puzzle/blunder-episode-1
cr4sh_bandicoot: jello
aymene: https://www.codingame.com/clashofcode/clash/2387090ff5ba44ef118b73da3eb08f955539665
DaNinja: PatrickMcGinnisII you did well solving Sliding Maze in php. I cant pass Test 4 in c++ with full pragmas
DaNinja: but validators all pass
5DN1L: aymene please use #clash channel for clash invites, thanks.
mybk: http://chat.codingame.com/pastebin/744fec12-b229-4970-87e3-ab275caeff0a
Harry12302: If you could choose between reversing and pausing your life, what would you do?
mybk: Hello everybody, yesterday I did a coding test and I am not seeing what's wrong with my solution, can anyone check it out, please?
mybk: http://chat.codingame.com/pastebin/c9880a12-4f9e-4ad3-af80-db5d6970576a
mybk: http://chat.codingame.com/pastebin/d884c2ad-f384-4ca6-8f37-dd75cc9b1a6d
mybk: problem: https://imgur.com/c08DX3b solution: https://imgur.com/bEvcj9S
mybk: thanks
5DN1L: Harry12302 coding-related topics only, thanks
5DN1L: https://www.codingame.com/playgrounds/40701/help-center/code-of-conduct
DaNinja: mybk do you calc the average somewhere?
mybk: no I am suming it
DaNinja: use the average
mybk: ah, the problem is the length of the table
mybk: yesterday I was seeing 3 in test case, I forgot it's varibale
mybk: newby error
mybk: anyway if I do the average, I will just divide the summation by the length of the table, so it's not going to make any difference (I think)
Markus235: hi guys, why its not possible to write a direct message to someone?
5DN1L: You've tried?
Markus235: ok im an idiot. But how to do it if you have only the username?
5DN1L: Write "/msg " then the username
Markus235: thank you sir
5DN1L: np :)
elderlybeginner: could you remind mi how to compile a referee?
DaNinja: brutaltester has instructions https://github.com/dreignier/cg-brutaltester
elderlybeginner: mvn package :wink:
DaNinja: yup
elderlybeginner: reading that instruction is like reading a description of a bot - you always miss something and you have to read it again
j4at: Does anyone have a Spider Attack simulation ? I'm too lazy to write my own one
struct: j4at check the source code of the referee
j4at: struct, thank you :)
waterproofsodium: on blasphemous' stream
jacek: hm?
waterproofsodium: someone is streaming on twitch and has that chat visible
waterproofsodium: "BlasphemousCrossbreed" his channel
waterproofsodium: seriously I swear there was a shorter word for that that starts with B and ends with d :thinking:
BlasphemousCrossbreed: how to close it?
BlasphemousCrossbreed: I'd gladly
waterproofsodium: what you wanna close?
BlasphemousCrossbreed: chat
waterproofsodium: the ">" arrow in the bottom left corner of the chat window
BlasphemousCrossbreed: thanks
waterproofsodium: it's sad you can't close it 100% would love if that was possible, cause I am still tempted to check new messages
5DN1L: you can
5DN1L: add ?disableChat=true to the end of the url
waterproofsodium: thanks a lot
5DN1L: np :)
waterproofsodium: like that? https://www.codingame.com?disableChat=true
waterproofsodium: seems to have no effect
5DN1L: try other links, e.g.
5DN1L: https://www.codingame.com/forum?disableChat=true
waterproofsodium: ah works well!
jacek: :taco: Automaton2000
Automaton2000: took me a long time
waterproofsodium: to cyte jacek:
5DN1L: Automaton2000 Do you hm?
Automaton2000: oh, you are in the chat
struct: Ok only viewer and statement missing now
jacek: no one reads the statement anyway
waterproofsodium: is that "suicidal robot problem" to be solved with "real state machines" or should normal logic be sufficient too?
waterproofsodium: (https://www.codingame.com/ide/puzzle/blunder-episode-1)
waterproofsodium: what is it with the fetish about code shortness?
Zyk0: there's no fetish I think
waterproofsodium: not sure if you get extrap points for it. but I noticed a lot people attempting to make their code as short as possible
5DN1L: That's either the code golf section here: https://www.codingame.com/multiplayer/codegolf
5DN1L: or the shortest mode in a clash of code
jacek: disk storage is expensive nowadays
DaNinja: and paper
LaurensD: @waterproofsodium, there is a clash of code that is about shortness, yes. Also coding the most efficient way is a good thing right? make it more readable, easier* to maintain. etc.
waterproofsodium: optimizing for size != improving readability && improving efficiency
waterproofsodium: in most cases
waterproofsodium: anyways people may just do it for fun. I didn't get the big picture yet
Zyk0: you did, they do it for fun
Zyk0: It helps learning new things about a language too (that could be applied elsewhere than code golf)
LaurensD: Well, it does give you idea's how you might do things different, I guess
5DN1L: That's right
Ayza: any good idea on how I would get the most wild mana?
Ayza: It's always a tie between me and the boss but it ends up winning with the most wild mana lol
waterproofsodium: ayza what problem you solving?
Ayza: spring challenge 2022
waterproofsodium: is it difficult?
Ayza: It's leagues based so
Ayza: wood league is pretty easy
Wontonimo: which league Ayza ?
Ayza: bronze
Wontonimo: i gathered a lot more wild by using wind to keep bugs outside of my base range
Ayza: so the more spells you cast the more wild mana you get?
Ayza: and it gotta be outside the radius of your base right?
Wontonimo: no, read the details on the left
Wontonimo: it's all there
Wontonimo: you gather wild mana per hero per turn that is outside of a base
Wontonimo: that's it. it's not based on kills, or spells, or anything else
Wontonimo: it is to encourage you to no camp in your base
Ayza: oh I see, just keep my heroes outside the base
Wontonimo: bingo
Wontonimo: paste a replay link of you vs the boss
Ayza: https://www.codingame.com/replay/633182535
struct: I would try pacifist until silver
Wontonimo: waterproofsodium , you can get to bronze by simply downloading the example AIs that are in the description and adding a sort so that your heros attack the closest bugs first
struct: and then make an attacker from there
Wontonimo: Ayza , borrow an idea from soccer. Have your heroes have positions, and each hero is responsible for the bugs closest to their position
Wontonimo: your heroes are running around like 8yr olds playing soccer
Ayza: lol, I'll try that strategy
Ayza: thanks
waterproofsodium: how long is that challenge still around, i may want to try it later
Wontonimo: I tried 20 degrees, 45 degrees, and 80 degrees at a distance of 6000.
Wontonimo: sort all spiders by distance to base
LaurensD: which challenge? spring challenge it ended already
LaurensD: you can keep playing 'spider attack'
Wontonimo: then a particular hero is responsible for a bug if their camping point is closer to tthe bug than another hero.
Ayza: right now I am saving all the spiders coordinates in a list then get the one closest to the base
Ayza: which sounds like a bad idea
waterproofsodium: i'm confused. seems like they're still doing it
Wontonimo: no, that's pretty good Ayza
Ayza: but I think that's the reason why my heroes are all attacking at once
Ayza: because they are all going for the one closest to the base
Wontonimo: a simple improvement would be for hero 0 to attack spider 0, hero 1 attack spider 1 etc. that will spread them out but once a spider dies thenn they all runn around like idiots
Ayza: sounds like a good idea
LaurensD: does anyone know which c# framework is used for spider attack?
struct: C# framework?
LaurensD: .net framework
struct: C# 8.0
struct: net core 3.1.3
5DN1L: waterproofsodium It was originally a limited-time contest, now it's turned into an all-time bot-programming game, so you can play it any time
LaurensD: Thanks
LaurensD: @struct
Ophen: @5DN1L what is the badge near ur name
5DN1L: hover over it
5DN1L: and you'll see
Wontonimo: hey Ayza , here is a replay of mine. I'm in the lower right. Notice how my heroes seem to have a camp point, and they only attack the bug that is closest to their camp point
Wontonimo: https://www.codingame.com/share-replay/632964234
Wontonimo: and if a bug is too close to the base, wind it away
Wontonimo: just that will get you to gold
Wontonimo: gotta go. Good luck
Ayza: Thanks! I'll look at the replay
Ayza: goodbye
struct: meh cant find any board to my liking and the graphics look so pixelated when I draw the triangles
jacek: and still no models for dices?
MimmoFlow: Could you guys recommend me a bot programming challenge not too difficult for a novice please?
struct: jacek for dices I will just use a number
struct: lol
Quidome: MimmoFlow Tulips and Daisies is an idea
Quidome: https://www.codingame.com/multiplayer/bot-programming/tulips-and-daisies
struct: are you still doing coif Quidome?
Quidome: yep working on it now
Quidome: doing a few more heuristics and try to get into gold.
Quidome: but already far more work than getting into silver :P
Quidome: I think I need search of some kind but not decided on that yet.
Quidome: Sim is more complicated than I like
struct: yeah Im not sure how to progress yet
struct: I want to do bitboard but Ill need to create my own for it
struct: instead of using uint64
struct: since it doesnt fit it
Quidome: interesting it doesn't fit in a i128 either...
struct: yeah
Quidome: hm...
struct: but bitboards are not needed for legend
Quidome: ok, don't it then :D
struct: I could use bitset<>
Quidome: youre doing C++ right?
struct: yes
Quidome: what is bitset?
struct: it optimizes based on the size of bits you need
Quidome: ah, ok
struct: so if you do bitset<192> it will probably create an array of 3 uint64
struct: and you can do normal bit operations oin it
waterproofsodium: can you do bitset<191>?
struct: yes
waterproofsodium: does it throw if you access index 191?
struct: no
waterproofsodium: (the index that is out of range)
struct: ah
struct: No idea I dont really use it
Quidome: if you put an envelope around the board to accommodate a void border you need 196 bits
struct: 13*12 is enough Quidome
therealbeef: bitset has small downside of not supporting arithmetic operations though
Quidome: why 13*12 and not 14*14?
struct: because bottom and top is irrelevant on bitboards
struct: 0b1110 >> 4 will just return 0
Quidome: so you rotate to move in the other axis?
Quidome: nm I have to look into this subject one day
Quidome: but not now
Quidome: :D
struct: yeah its simple to understand but I cant explain it well
waterproofsodium: btw are >> operations across programming languages the same? (provided they use same underlying datatype)
waterproofsodium: should all be done by CPU correct?
jacek: welp java has >> and >>>
Quidome: hi\
Quidome: hi
Quidome: struct i find it hard to get optimal movement without search maybe I do a DFS of optimal movement of my troops within a turn
struct: Yeah I dont know what ill do yet
struct: im not good on these types of games
Quidome: what are your favorite games?
eulerscheZahl: still playing ice and fire?
Quidome: yep
eulerscheZahl: one of my favorite games here together with hypersonic
eulerscheZahl: unpopular opinion but i also liked the pacman contest very much
eulerscheZahl: despite fog, not because of it
Quidome: pacman wass cool indeed
Quidome: i liked that one as well
struct: Im finishing backgammon first
struct: The french are waiting
eulerscheZahl: darkhorse
struct: nah, they reached on pm
ElCimici: i have the same problem as yesterday
ElCimici: i don't remember the fix
ElCimici: Found: +++End of line (\n) Expected: Nothing
struct: you have one extra \n
ElCimici: http://chat.codingame.com/pastebin/20966f8f-0d86-40ba-91bc-39330c6b2d82
ElCimici: i tried s-1 but it dosen't work
derjack: print(o.strip())
derjack: removes white characters (space etc.) from the end of string
derjack: and beginning too i think
jacek: ohai
Quidome: eulerscheZahl
Quidome: do you use search on coif?
eulerscheZahl: to some degree
eulerscheZahl: to find paths that cut off an opponent area and to build a kill chain (or to prevent the opponent doing so)
eulerscheZahl: https://www.codingame.com/forum/t/a-code-of-ice-fire-feedbacks-and-strategies/105722/5
eulerscheZahl: and and the hungarian algorithm, i already forgot about that part again
ElCimici: how can i get last character of a string in c++
ElCimici: i tried string[string.length()]
Adsonmin: length - 1
Ayza: not a c++ programmer, but aren't you supposed to do string.length()-1?
Andriamanitra: @ElCimici std::string also has .back() method that gets the last character
Andriamanitra: also i would advise you to use .at() method rather than indexing because [] can cause undefined behavior
Quidome: eulerscheZahl thnxs for the link very helpfull! :D
eulerscheZahl: much more detailed than what i can write 4 years after
eulerscheZahl: 3 years
jacek: brainfrog?
Ayza: thanks a lot Wontonimo, your tips helped a lot
Ayza: couldn't beat the boss but atleast got first ranking somehow
Quidome: :joy:
Quidome: the remainder\
Quidome: of a intehger division
jacek: modulo [solved]
waterproofsodium: I have brainfrog today
antiwonto: [auto] Hey waterproofsodium, here is a :taco: for loggin in today while it is quiet. You now have 2 tacos
Quidome: whath
Quidome: keep talking you might get tacos
waterproofsodium: keep getting tacos and I might get brainfrog
Quidome: waterproofsodium tacos
Quidome: there was a trick to give tacos, forgot how
waterproofsodium: I would be interested in a trick to motivate myself
Quidome: waterproofsodium :tacos:
Quidome: waterproofsodium :taco:
antiwonto: [auto] Quidome has awarded waterproofsodium 3 tacos. waterproofsodium now has 5 taco. Quidome now has 15 taco
Quidome: :D
waterproofsodium: thank you for dem juicy tacos
Quidome: where are you working on?
waterproofsodium: that suicide bot
Quidome: ??
waterproofsodium: https://www.codingame.com/training/medium/blunder-episode-1
waterproofsodium: but I wanted to do clash now. wanna join?
Quidome: ok
waterproofsodium: I missed you
Quidome: I was second, starting a new one
Quidome: ok got out again
Quidome: still there?
Quidome: Hm we are not supossed to chat about clashes here
Quidome: ok, I stop clashing to much stress
waterproofsodium: how is it stress tho :)
jacek: :scream:
C_breeze: got to love the clashers using eval with U16 codes to cut the char size in half
jacek: yeah, who does that :unamused:
waterproofsodium: how can I reopen a problem I just worked on in clash?
C_breeze: you can't unlss you go into community contributions
Westicles: search here https://eulerschezahl.herokuapp.com/codingame/puzzles/
waterproofsodium: thx found it
waterproofsodium: ah now I get my mistake lol
waterproofsodium: seems if I do "test in ide" my code is no more there :(
jacek: huh
waterproofsodium: "negatives are not prime" seriously?
jacek: "By the usual definition of prime for integers, negative integers can not be prime"
EleKtr1X: i accidentally submitted my giant code on a shortest challenge 🗿
5DN1L: sad
VizGhar: sad backwards is das and "das is not good"
waterproofsodium: hm I scored a lot places > 4 in clash today
waterproofsodium: does that mean I lose score? :(
waterproofsodium: also does clash ever become more difficult? doesn't look like it. but still asking
5DN1L: i guess it's random
5DN1L: and for scoring i believe it's based on trueskill
Laki_42: I think it is not random, I think it is based on ranking of players who are in clash, when I play with top ranked players I always get harder problems
5DN1L: or just "freshness": https://www.codingame.com/forum/t/clash-of-code-lack-of-puzzle-randomness/92534
5DN1L: ah, so the selection was updated in 2020
5DN1L: difficulty is not the first factor to take into account
HenroLST: anyone know what ackermann is ? :sweat_smile:
5DN1L: google it?
5DN1L: maybe you can search it in YouTube
5DN1L: I think some explanatory videos there
5DN1L: are* there
5DN1L: np
jacek: :taco: Automaton2000
Automaton2000: i have a lot of matches
antiwonto: [auto] jacek has awarded Automaton2000 10 tacos. Automaton2000 now has 51 taco. jacek now has 28 taco
Automaton2000: let's see how that goes
BenjaminUrquhart: Automaton2000 still exists? nice
Automaton2000: and i have no idea how it worked
jacek: :upside_down:
antiwonto: [auto] ':upside_down:' was defined as ' ɥǝllo '
nightwalkerinthedark: :angry:
antiwonto: [auto] Hey nightwalkerinthedark, here is a :taco: for loggin in today while it is quiet. You now have 1 tacos
nightwalkerinthedark: hh
waterproofsodium: nightwalkerinthedark your name is definitely composed from too many words
waterproofsodium: strange.. usually when I make a random silly comment I get a taco
nightwalkerinthedark: :expressionless:
Defiines: mmmm taco
nightwalkerinthedark: lol
picoplankton: so, what does this code in java doe ?:
int value = (seed & 0x10) == 0 ? 2 : 4;
ASM_MOV_INT: variable names can never have too many words, besides his name is only 2 more words than your name
picoplankton: do
Defiines: seed & 0x10 is a bitwise and, basically will 1 if second bit of seed is 1...
so if that == 0, return 2; else return 4
ASM_MOV_INT: seed & 0x10 is the hardest part? doesn't that do a binary AND with seed and 0x10
ASM_MOV_INT: bitwise is what i meant
Defiines: indeed
Defiines: so if seed is 10010, will return 1, meaning value will be 4
if seed is 10100, will be 0, so value will be 2
struct: 0x10 is 16
struct: which is 0b10000
Defiines: ah lol I messed the ox
struct: any number that has a matching bit in the 5th position will not be 0
Defiines: you're correct
picoplankton: so, is this the same as this in python ? value = self.seed & int(16)
picoplankton: what about the second part 0 ? 2 :4
picoplankton: that;'s a really weird statemetn
struct: picoplankton
struct: ternary operator
struct: a = false ? 1 : 2; a will take value of 2
struct: a = true ? 1 : 2; a will take value of 1
struct: maybe with parenthesis is less confusing
struct: a = (true ? 1 : 2)
picoplankton: what does the question mark do ?
picoplankton: 1:2 = 0.5
picoplankton: that's probably not java synthax
picoplankton: but my point is I don't understand the operators
struct: https://www.javatpoint.com/ternary-operator-in-java
picoplankton: oh, i see; its kindof like an if/else statment; i hate code like this. Code should always be as human readable as possible
picoplankton: thanks !
struct: np
picoplankton: though I still don't get it;
0 ? 2 : 4
doesn't this statement always return a 2 ? the zero value before the question make is a constant; doesn't change
picoplankton: oh wait
picoplankton: (seed & 0x10) == 0
struct: yeah
picoplankton: so, is this: int spawnIndex = freeCells.get((int) seed % freeCells.size()) the same as this: spawnIndex = self.seed % len(empties)
picoplankton: to java; bottom python
struct: the first doesnt seem to return the index
struct: but the object
BigBadStopwatch_4678: coming to prep for interviews
picoplankton: its assigned to an integer
struct: freeCells.get(
struct: freeCells its an arrayList right?
struct: I dont really use java that much
picoplankton: yes, its an array; I'm trying to generate the java code to generate the same in python. the code his here: https://github.com/eulerscheZahl/2048/blob/master/src/main/java/engine/Board.java#L25
picoplankton: 4x4 grid
PatrickMcGinnisII: random spawner
picoplankton: yea;
picoplankton: one last one -- in this:
picoplankton: seed = seed * seed % 50515093L
picoplankton: multiply or modulo first ?
struct: multiply
picoplankton: thx !
picoplankton: this can end up making very large or very small numbers....
isaadi: hi
struct: hi
Darleanow: Hello guys just a quick question
Darleanow: if a male of somthing weights 20% more it is w/100*20+w right
Darleanow: BUT
Darleanow: its given the female weight
Darleanow: if we do it in the other way, taking example of a male which weights 120, 20% of it should give 96 not 100 right ?
picoplankton: if male is 20% more than the male is 1.2x female; so female is W/1.2
Darleanow: OH THANKS
picoplankton: 1.2f=m <=> f=m/1.2
picoplankton: right ?
Darleanow: yeah that's right !
Darleanow: i though u had to remove 20% of her weight
jzen: :taco:
antiwonto: [auto] ':taco:' was defined as ' A currency to some, sustenance for others '
antiwonto: [auto] Hey waterproofsodium, here is a :taco: for loggin in today while it is quiet. You now have 6 tacos
waterproofsodium: thx for taco
waterproofsodium: hm i didn't get promoted
waterproofsodium: i don't get it
Ayza: taco
antiwonto: [auto] Hey Ayza, here is a :taco: for loggin in today while it is quiet. You now have 5 tacos
Wontonimo: how's your Spider Attack bot doing Ayza ?
Ayza: first off thanks for the tips, helped a lot
Ayza: doing well passed bronze
waterproofsodium: spider attack bot is for children
waterproofsodium: (no taco? :( )
Wontonimo: cool
Link_jon: takes about 30 mins before u get a taco during quiet time
antiwonto: [auto] Hey Link_jon, here is a :taco: for loggin in today while it is quiet. You now have 3 tacos
Link_jon: this is example of 2 ish hours though
Link_jon: maybe its 45. iduuno
Wontonimo: oh, thanks for the idea! I should make it random
Wontonimo: if you want to see the source code of the bot Link_jon , here it is https://github.com/panchishin/cgchat
PatrickMcGinnisII: huh, it runs under xamp
PatrickMcGinnisII: superuser Wontonimo
PatrickMcGinnisII: exports to a user json file, i figured that's how it is
Wontonimo: it's pretty hacky
Wontonimo: and since I write it, I have it on good authority that it's hacky.
Wontonimo: x = 1/(x+1)
antiwonto: [auto] x = 0.6180339887506111
Wontonimo: -x = (1/x+1)
antiwonto: [auto] x = end of the universe
Wontonimo: -x = 1/(x+1)
antiwonto: [auto] x = end of the universe
PatrickMcGinnisII: 192.168.1.20:8082
Wontonimo: what's that?
PatrickMcGinnisII: i don't usually keep server running
PatrickMcGinnisII: hmm, oh the server port to listen to i believe
Wontonimo: 192.168.... is local to your LAN.
PatrickMcGinnisII: umm yea, was just picking weird stuff out
PatrickMcGinnisII: :upside_down:
antiwonto: [auto] ':upside_down:' was defined as ' ɥǝllo '
PatrickMcGinnisII: test
antiwonto: [auto] 'test' was defined as ' this is a test '
PatrickMcGinnisII: working on space maze
PatrickMcGinnisII: spent the day working on a bitwise floodfill, works but can't do paths longer than 19 moves
DaNinja: in php? masochist :D
PatrickMcGinnisII: tree width is an issue, but prioritizing works well
PatrickMcGinnisII: gamestate can fit in 30 bytes
PatrickMcGinnisII: more than 12k nodes and I'm screwed
**PatrickMcGinnisII is a masochist
DaNinja: do you pass Test 4 in sliding maze?
PatrickMcGinnisII: https://www.codingame.com/replay/633336012
PatrickMcGinnisII: I'll finish it later, I'm fried
DaNinja: https://www.codingame.com/replay/633336042
PatrickMcGinnisII: :applause: