Chat:World/2021-09-03
LittleFlea: 5922 can you show me the last clash of code you did i'd like to study it,.
eulerscheZahl: oh, struct is back
eulerscheZahl: about 2 months before the contest already
sudobeans: h
Alec801: :eye::lips::eye:
ShaxoLudo: Hi, i'm having a hard time for a specific need in a flyway migration (mysql script) is there someone that might be able to help me
YiQinTeow: :point_right: :ok_hand:
vsa: what's up nerds
Jothegeier: hi
GiovanniDe: bye
MiyamuraIzumi: Hello guys
GiovanniDe: Hello
vsa: how's everyone doing this fine morning?
TimothyAlexisVass: Thinking about this https://www.codingame.com/contribute/view/7308d63b764bf1979ade0e862fcb636fa0f4
TimothyAlexisVass: how about you?
derjack: oO
MiyamuraIzumi: I am thinking about this "https://www.codingame.com/multiplayer/bot-programming/tic-tac-toe"
derjack: :+1:
derjack: Astrobytes oh my
derjack: or Uljahn or other cats
Uljahn: sry was afk
oxydowe: this guy also spams in private
Uljahn: there is "Report abuse" option in his profile hidden under three vertical dots
MiyamuraIzumi: can pure MCTS reach legend in UTTT?
MiyamuraIzumi: I can only go to top gold
derjack: yes, though you need more performance
Wontonimo: yes
derjack: do you use bitboards
MiyamuraIzumi: yes, I use bitboards
Wontonimo: you need about 20k rollouts per turn
MiyamuraIzumi: but I am not good at performance
MiyamuraIzumi: thanks
Wontonimo: have you used a profiler?
MiyamuraIzumi: nope
oxydowe: ty Uljahn
Wontonimo: that will really really help you see where stuff is hung up
MiyamuraIzumi: I use eclipse
Wontonimo: are you using STL lists and arrays?
MiyamuraIzumi: arrays actullay
rkocharyan: array has very bad performance
Wontonimo: just regular arrays like or STL arrays?
rkocharyan: arrays run slower than vectors almost 100 times
derjack: do you use pragmas :v
derjack: huh
MiyamuraIzumi: most are regular arrays
MiyamuraIzumi: some are vectors
ProCoder03: isn't it the other way around ?? vectors are slower than arrays, right ??
MiyamuraIzumi: just some small code I just vectors
MiyamuraIzumi: should not be problem
rkocharyan: you should switch to python actually
Wontonimo: i don't use STL at all for uttt
rkocharyan: python is faster because it doesn't take time to compile
Wontonimo: lol
Wontonimo: how large is your mcts node?
Wontonimo: if you do sizeof(Node)
rkocharyan: i dont understand who people use C++
rkocharyan: it compiles for no reason
rkocharyan: and make you lose your time
rkocharyan: that is really cringe
Wontonimo: for real? i thought you were joking earlier
ProCoder03: for a 32 element bubble sort , python took around a 10ms , while for C I had to bubble sort it a billion times to just get an non zero value :unamused:
Wontonimo: thank you space shooter for helping me break into the 300's in rank
Wontonimo: long live PID Controllers !
Wontonimo: i think there is a bug in your C code ProCoder
ProCoder03: ???
ProCoder03: But it worked correctly.....
Wontonimo: how long did the C code take?
ProCoder03: 18 sec or so
Wontonimo: yeah, there is definitely a bug. it should be less than 1 ms
ProCoder03: hmmm.....
ProCoder03: will check
Wontonimo: paste it into tech.io and send me a link
Wontonimo: for C Bubble Sort of 32 elements ended in 0.00000200 sec
Wontonimo: so, there we go, 10ms in python, 0.002ms in C
darkhorse64: How to optimize my Python bot ? Use C++ [solved]
struct: seems easy enough
dreadylein: ^^
ProCoder03: If it doesn't use OOP, then use C.
darkhorse64: Even if you do not use a lot OOP, there are many C++ features that make your life easier: STL, operator overloading, for based range loop
darkhorse64: auto
ProCoder03: yeah, but C++ is just too complex imho, I personally prefer C/C# instead of C++
ProCoder03: but obviously, C++ is unavoidable in some cases
TimothyAlexisVass: rust
MiyamuraIzumi: but you can just use C++ and code like C if you don't want the features?
darkhorse64: C# is also a very good tool. Re complexity, if you stay away from templates, multi inheritance, you are safe
ProCoder03: "Re complexity" wdym ???
eulerscheZahl: regarding?
ProCoder03: ohhh....
eulerscheZahl: that was a guess, i'm not entirely sure either
darkhorse64: On CG, I seldom use inheritance. I have a few template classes for reuse, a Vector class with lots of overloading, the rest is plain C structs
darkhorse64: Yes regarding
eulerscheZahl: I didn't even know that you code in C#
ProCoder03: Ohhh..... I never thought about having classes in snippet , to reuse it
darkhorse64: At work but it's mostly modifying existing code
ProCoder03: maybe I need try it !!!
darkhorse64: C# is almost like a foreign language to me but I like how it sounds
Manjius: like a musical note
ProCoder03: half note higher than C , tbp
eulerscheZahl: i started with pascal/dephi. but C# is the first language that I ever learned properly (using OOP and such, not just procedural coding)
ProCoder03: I was C primarily, but after learning C# , I am now fully involved in it
ProCoder03: it's really easy after knowing C !!
derjack: my first language ever was some basic in NES-clone with keyboard. good ol' time
struct: I think I started with C
darkhorse64: I started with Fortran, read the K&R C book and never ever wrote another line of Fortran
ProCoder03: K&R C book is the book which any programming language would like have
ProCoder03: but only C has it till now
ProCoder03: well I tried the Go book , wasn't nice
darkhorse64: Rust documentation/book is very good
ProCoder03: is it ?? I never tried it.
ProCoder03: I will give it a try :wink:
darkhorse64: https://www.rust-lang.org/learn
ProCoder03: Thanks
derjack: https://www.rustoleum.com/en/product-catalog/consumer-brands/stops-rust
Stinkyfish: Hi, I'm new here, is there a way to choose which mode to do clash of codes?
Manerr: Only in private game
Velcoro: CG may have some issues - viewing code in clashes stopped working
eulerscheZahl: you can report that on discord's #bug-report channel
Velcoro: ok, thanks
da20rs: Hi everyone, is the native IDE not showing your previous code too? I can't seem to recover my solution to Thor and Horse Race scenarios.
Resetting the code on the IDE also doesn't retrieve the default code. Is this a known issue?
struct: try changing the language two times and then reset
struct: I couldnt reset it too but after i changed language it seems to have fixed it
da20rs: worked! thanks
struct: if you want to check your previous submits you can click on results -> history
da20rs: yeah, it was all blank before! but your solution fixed that too, thanks a lot!
eulerscheZahl: still no bug report Velcoro? I copied your message from the other channel
Velcoro: I joined discord, but it didn't let me write anything before I wait for 10 minutes.. but it looks like it started working again..
eulerscheZahl: oops, then I was too quick. Sorry
g11n: has anyone ever ran into new line formatting issues on the ascii art puzzle?
[CG]Thibaud: probably. Check the forum thread related to it piratas
Maxim251: In C++ I have an error
Maxim251: UnitType = {quin,knight,archer,giant}[_unitTType+1];
Wontonimo: https://tech.io/snippet/7xVC6kv
Wontonimo: yes ^^
Thyl: hi
opitt: Would appreciate some approvers ..https://www.codingame.com/contribute/view/7204a06363301568107e0e98085cfc40eb6a
eve_va_hooves_the_king_of_wifes: hello
eve_va_hooves_the_king_of_wifes: im eve va hooves the king of wifes
Golyator: hi if you wanna play private clashes with us https://twitch.tv/golyator
eve_va_hooves_the_king_of_wifes: cant, im at school and i dont any tech
jacek: random promote in volcanoes oO
BrandonPetersen: what up homies
Ryan_Brighton: brandon petersen is racist
eulerscheZahl: stop spamming
BrandonPetersen: :regional_indicator_p:
eulerscheZahl: i'm in a mood to ban. fair warning
jacek: i thought with the school beginning it would decrease
eulerscheZahl: hard to auto-complete a ryan, he's not the only one in chat
BlaiseEbuth: Where is ryan?
eulerscheZahl: gone
darkhorse64: in the kitchen
BlaiseEbuth: *itchen
eulerscheZahl: except for ryanolsonx 1 that one's still here
eulerscheZahl: oh, the other ryan is already back again. let's see if the kick was enough
Ronora_Zoro: hi eular its me
eulerscheZahl: jay?
Ronora_Zoro: yes
BrandonPetersen: i miss ryan :cry:
jacek: bryan?
Ronora_Zoro: wheres ryan?
Ronora_Zoro: whos ryan
Ronora_Zoro: ryans world??
Ronora_Zoro: why u miss ryan
eulerscheZahl: jacek I want to go to bed. Why did you refuse mod? :/
BlaiseEbuth: Jacek mod? We're lost...
Ryan_Brighton: i am really offended by what was said about me when i was gone
Stepan0806: Hy all
Stepan0806: When will start fall challenge?
struct: not announced yet
ridafkih: codingame on a plane rn
ridafkih: lmao
Ronora_Zoro: what
Wontonimo: any newbies here need a hand?
Wontonimo: :clap: :clap:
Illedan: :wave:
Wontonimo: what are you working on ?
jacek: yeah, how to do the temperatures
Illedan: MinMax jacek
Wontonimo: i don't know what malboge means.
Wontonimo: hey milkyid
jacek: malboge is language
milkyid: i need help too, i'm working on "don't panic - episode 1"
Wontonimo: cool i can help you with that
Wontonimo: what's your experience level and what programming language are you using?
milkyid: the four first cases are green but the three others are red
Wontonimo: what do you think is different between "Several floors" and "6 floors, lot of rounds" ?
Wontonimo: i mean, from the point of view of your code
Wontonimo: why would it pass on several floors
Wontonimo: can you share a replay of "6 floors, lot of rounds" ?
Wontonimo: oh, the only difference i see is that this is the first test case where you have to continue in the same direction after an elevator to get to another elevator
milkyid: okay that's the replay of 6 floors : https://www.codingame.com/replay/578662301
milkyid: i don't get why they stuck
Wontonimo: yeah, that's kinda weird. why is it moving so much before you block it? Can you block it right away?
milkyid: and that's the replay of several floors : https://www.codingame.com/replay/578662447
Wontonimo: you block 2 clones and they all get stuck inbetween
milkyid: yes, but i don't know how to fix it
milkyid: and i don't know how to block it as soon as they get out
Wontonimo: so, in this puzzle, what's the max number of blockers you'd have on any floor?
milkyid: there is not limit number mentioned
Wontonimo: i mean, to solve the puzzle. what's the max you need to solve "Several floors" per each floor
milkyid: for "Several floors" i only need one blocker per floor
Wontonimo: okay, so what if you kept track if you already put down a blocker on a floor, and if so, don't put down aother one?
milkyid: okay okay I will try that; I think it will solve it
Wontonimo: np
Wontonimo: okay jacek, i can help you with temperatures now. You've been struggling with that for a while it seems
Wontonimo: :P
Wontonimo: CG now thinks I'm "a C lover". geez, I kinda thought I was a better lover than that.
Wontonimo: hey
Wontonimo: what are you working on LaMatrioska ?
LaMatrioska: I'm not working just now, but I'm learning c
Wontonimo: how's it going?
Wontonimo: do you already know C or C++ ?
Wontonimo: (or Java?)
LaMatrioska: I know about C# and you?
Wontonimo: how do you know about me?
Wontonimo: that's kinda creepy
Wontonimo: oh, that's a question. nvm
Wontonimo: I'm not too familiar with C#. i can hack in it
LaMatrioska: Oh, I'm learning C# because I want to make videogames
Wontonimo: how are you going about learning C# here on codingame?
LaMatrioska: I'm learning, not know all about C# :(
Wontonimo: have you looked at any Unity3D tutorials on youtube?
LaMatrioska: Not, First I want to know about C# after I going to see a tutorial on youtube.
Wontonimo: do you know any other programming language?
Wontonimo: what?
Wontonimo: nice, that's a useful language
LaMatrioska: Css, HTML and php
Wontonimo: css, html are not languages. php is
LaMatrioska: yes is a tag language
Wontonimo: I am between languages now, but I can code professionally in java, javascript, typescript, python, and php
LaMatrioska: Wow, so much languages
Wontonimo: i can also hack and dabble in a non-professional way in C, C++, C#, and old languages OOT
LaMatrioska: You are a hacker?
Wontonimo: what level is your javascript at? Do you know about recursion and dependency injection?
Wontonimo: no, i'm not a hacker
Wontonimo: how about while loops and for loops?
Wontonimo: Beginner is better than not-even-started
Wontonimo: which is >95% of the population
Wontonimo: hmm... that wasn't a question, it was a complement.
Wontonimo: i was saying you are further in your journey into programming than 95% of the worlds population
Wontonimo: why not focus on javascript if you already know some? you can make games in javascript?
LaMatrioska: yes i made a game with javascript
Wontonimo: really? Cool! Is it something I can see?
Wontonimo: simple is fine !
LaMatrioska: yes you can see, but I've never publish
Wontonimo: here is a very silly hex game i made way back a while ago https://panchishin.github.io/hexis/game.html
Wontonimo: it was for a friend of mine who made the original with wood and
Wontonimo: set the rules. i saw a problem with some of the rules so i
Wontonimo: coded up the game and made it so it could play against itself
Wontonimo: so i could see if it had the problem I thought. It did, so
Wontonimo: now the rules as just slightly different
Wontonimo: do you have a link to your game?
LaMatrioska: Wow is so very good
LaMatrioska: nop i not have a link
LaMatrioska: is a private server
Wontonimo: how about a screen shot?
Wontonimo: it's fine if you don't want to. np
Wontonimo: you paste it somewhere else, like instagram or reddit then paste the link here
LaMatrioska: Ohh, sorry, I not have reddit or instagram
LaMatrioska: but I made the game with a engine
Wontonimo: you can use this service https://pasteboard.co/KiYioQl.png
Wontonimo: that's a screen shot of this small interactive javascript evolution simulator https://panchishin.github.io/canvas_bootcamp/08.html
Wontonimo: you can click on one of the trees to make more trees like it
LaMatrioska: https://pasteboard.co/KiYjiaQ.png
Wontonimo: OH COOL ! a platformer. I really like platformers
LaMatrioska: Not is all platformer but is similar to Mario
LaMatrioska: and is a game for a homework of lenguage
Wontonimo: have you considered posting it on https://itch.io/ ?
LaMatrioska: but i had a problem
LaMatrioska: and is so very unplayable
LaMatrioska: "Perdidos en el verbo" in itch
Wontonimo: nice job
Wontonimo: i can't play it, i'm on a mac
Wontonimo: I sent you a PM
struct: hi Wontonimo, are you working on any multi atm?
Wontonimo: yeah, i am dabbling in Tron again
Wontonimo: and not too happy with my silver bot
Wontonimo: i also did a little upgrade to my spaceshooter bot and am happy with it
Wontonimo: how about you?
struct: Trying to find a multi
struct: I don't know how to make a bot for tron tbh
Wontonimo: oh! do I have an idea for you!
struct: my arena one is just single player monte carlo, but is very old
struct: tell me :)
Wontonimo: I got to top of silver (87th) with JUST area
Wontonimo: in python
Wontonimo: no sim
Wontonimo: the area is concurrent fill
struct: nice
Wontonimo: adding mcts onto that will go to legend I'm told (by a trusted source)
struct: should help if you make a sim then
Wontonimo: yeah, for sure
Wontonimo: i've just been dragging my feet
Wontonimo: i've been thinking of making a multi. well, that and drinking too much beer.
struct: whats your idea?
Wontonimo: one is a spin on https://play.google.com/store/apps/details?id=com.StefMorojna.SpaceflightSimulator
Wontonimo: without all the building aspect
Wontonimo: like a prequel to mars lander
struct: how would it work as a multi?
Wontonimo: i guess it is more an opti
struct: maybe instead of building you can choose starting fuel
Wontonimo: i was just gonna skip the whole building thing. you get what you get. the orbital mechanics was what i thinking of, with multi-year trajectory
Wontonimo: the other idea i've been tossing around is 2d rag doll boxing
struct: I see you want physics
Wontonimo: using verlet physics for the boxing
Wontonimo: yeah, I kinda like physics
struct: I wanted to port pool
struct: But my physics knowledge is not that great
struct: for what I wanted to do
Wontonimo: like, the game where you shoot balls into the pockets?
Wontonimo: with a stick?
struct: yes
Wontonimo: ah. i'm familiar with that game. the physics are really simple if you don't want to deal with spin
Wontonimo: and angular momentum
struct: yeah thats the problem
Wontonimo: you want angular momentum?
Wontonimo: and spin?
struct: yes
struct: and 3d
Wontonimo: oh, so you could do jump shots? I love doing jump shots
struct: yes
Wontonimo: oh, i'm getting close to beating Bossark, the Silver Tron Boss
Wontonimo: you could "fudge" a lot of it. The physics isn't too weird.
Wontonimo: the weird part would be getting realistic coefficients
Wontonimo: you could even go for very realistic physics, and it still wouldn't be too hard. again, it would come down to getting realistic coefficients and constants
Wontonimo: like, you can use some estimates for coefficient of friction,
Wontonimo: some angular momentum of the balls
Wontonimo: the elastic/spring of the side cushions and the effect on the friction with them
struct: yeah, but I still think its far away from my current knowledge
struct: even making the pocket seems hard
Wontonimo: would you be willing to take short cuts with "game-like" physics instead of "reality-mirroring" physics?
Wontonimo: if that's the case, there is a LOT of simple fakes you can do that give a very real feel and lots of interesting game play
struct: game-like can always be tweaked right?
Wontonimo: what do you mean tweaked? hacked?
Wontonimo: come one wontobot ... get another 0.10 trueskill and beat the boss !
Wontonimo: *on
struct: changing physics coefficients(?)
Wontonimo: yeah, for sure
struct: submit looking good
Wontonimo: thanks!
Wontonimo: i think the equations that are relevant for pool are :
Wontonimo: angular momentum
Wontonimo: angular energy
Wontonimo: kinetic energy
Wontonimo: regular momentum
Wontonimo: spring and friction
struct: thanks Ill save this
Wontonimo: for friction, I'd simplify it as a transfer of kinetic energy to rotational energy (and some small loss)
struct: In case I ever get the idea to try it again
Wontonimo: if you do, i'd be happy to work out the physics with you
struct: thanks
Wontonimo: My degree is in engineering, and my son and daughter just recently did physics in high school and I was able to help them and do their homework from memory, even through it has been 25 years for me. I really like it :D
struct: No way I can remember something from 25 years ago
Wontonimo: hey, maybe we start with something smaller as a classic puzzle that does a subset of the above
Wontonimo: okay, i'm actually surprised this bot beat silver
struct: ofc, if I do it I will probably start with 1 ball
struct: and figure rotation and such
struct: momentum*
struct: So many battles, damn
struct: you resubmited?
Wontonimo: yeah ??
struct: wasnt it above the boss
Wontonimo: i am looking at this code that i submitted 2 months ago and it really doesn't look familiar and I certainly don't want to get promoted not on my own code.
struct: ah
Wontonimo: so i resubmitted my old code that is just python
struct: maybe you helped someone and had that code saved
Wontonimo: so, it is by and large my style. i don't use STL and there is no STL. I do use FlatMC, and there is FlatMC in it
struct: still 2 months old
struct: I think I would remember it
Wontonimo: haha ... i was just wondering why i can still remember my physics from high school and uni, but i can't remember code i wrote 2 months ago
Wontonimo: OH! i should just check my git
Wontonimo: weird. there are so many oddities in this code that are definitely the way I code stuff, like a clone function
Wontonimo: (which should just be a memcopy)
Wontonimo: and unit tests (which I add right in my code)
struct: well maybe it is your code
Wontonimo: haha ... i think i'm being paranoid. I was playing with someone elses code for one multi and I can't for the life of me remember which one it was, but i know i didn't leave it as the last submit or use it to move up.
Wontonimo: anyway. i'm going to write a new bot and actually do mcts instead of flat mc
Wontonimo: it's not like i find mcts hard anymore
Wontonimo: so, last game idea (not-physics)
Wontonimo: a maze
Wontonimo: with loot spread around
Wontonimo: wait ...
Wontonimo: nope, too similar to other maze games
Wontonimo: anyway, the idea was basically the traveling salesmen problem, with just a little bit of adversary.
Wontonimo: there are 2 treasures at each treasure location. walking over it gets you yours. sitting on it for 2 turns destroys the opponents.
Wontonimo: otherwise it is an opti for solving the traveling salesmen problem in a maze
Wontonimo: hey struct, you haven't played space shooter!
Justin-Truong: space shooter is crazy I do nothing but now i'm in wood 1
struct: is it easy?
Justin-Truong: yep
Wontonimo: i basically used the -3v PID Controller from CSB for the ship, bullets, and missiles and I'm 8th.
Wontonimo: of course it isn't "3" for this game, but you get the idea
Justin-Truong: Thanks
Wontonimo: np
Wontonimo: beat me!
Justin-Truong: ok
MiyamuraIzumi: -3v is good
MiyamuraIzumi: but it is magic to me?
Justin-Truong: I just do nothing and i'm in rank 91 :grin:
MiyamuraIzumi: do we have any docs saying why it is good?
Wontonimo: haha ... i just sent you one :D
MiyamuraIzumi: :D
Wontonimo: alright, it's midnight for me
Wontonimo: i'm out
Wontonimo: nice chatting with everyone
Wontonimo: :wave: