Chat:World/2022-01-31

From CG community
Jump to navigation Jump to search

MACKEYTH: Um, google better, I guess? cmath is the name of the library you want, but math.h is the file you need to include.

MACKEYTH: Sorry, git gud isn't a helpful response, but that's how I found it

Wontonimo: i thought that was pretty funny "google better" lol

Mishaaargh: yeah the example i pulled up said #include <cmath>

Mishaaargh: hard to be reasonable when you're in the middle of a timed challenge aha

Dorak: This week's puzzle is insane. :disappointed_relieved:

Wontonimo: it's "hard" with a 31% success rate. yeah, it'll be difficult

Zmatical: hey, hope y'all are doing weel

Zmatical: very new around here ngl

MrZee: This week's puzzle makes me realize I really need to take some refresher trigonometry courses lol

Jerrasterix: what is this week's potw ??

Wontonimo: make an ascii 3d engine

Wontonimo: https://www.codingame.com/training/hard/lets-make-a-cheap-ascii-3d-engine

Default avatar.png Xascoria: holy hell that sounds super difficult

Blabbage: There goes my spare time :¨( 3d ascii engine... sounds too cool to ignore

Mush95: Yo, someone know how to detect which is your side In fall Chanllenge ? I'm stuck in wood my bot dont know how to brew in other side >< (cz of spell id) :D

BugKiller_328: ng

derjack: does the side matter?

Mush95: for me yes, i need to know which side to use right spell, not the enemy one. Mb i'm searching in a wrong way

Stilgart: derjack: it does, some of the spell's id are not the same

Default avatar.png TheBlueNoodle_ba92: I love playing Chamber with OP in Valorant

5DN1L: Coding-related topics only. Thanks.

Default avatar.png Axel_le_boss: 111

Default avatar.png Axel_le_boss: rt

5DN1L: No spam please

5DN1L: https://www.codingame.com/playgrounds/40701/help-center/code-of-conduct

mrswagger21: it's been 33 min since last message

Default avatar.png CommanderAzure: sirswagger21

Default avatar.png CommanderAzure: is very pog

Ose: hi i'm back

Default avatar.png SupremeDarkman: Trying to beat Boss 3. Having any advice

Ose: no sorry

Wontonimo: what multi SupremeDarkman ?

Wontonimo: mad pod racing?

Ose: yes of course

Wontonimo: fix the last lines of code to use X and Y. the code they give you uses Y and Y

ninjadip: is there a limit to queue container in c++?

ninjadip: trying to do the roller coaster challenge, everything passes but the 'working with large dataset'

ichuusy: hi

ichuusy: what's up

ninjadip: nvm

ninjadip: it's a time issue, need more optimization

ninjadip: Wontonimo what is this memorization technique? re: roller coaster

ninjadip: i don't see how looking up a table of what 4+4 is is faster than doing the math

Blokops: it stops you from doing the math over and over again

Blokops: try doing this one first, is a easier use of memo

Blokops: https://www.codingame.com/training/medium/the-grand-festival---i

ninjadip: oh thanks

ninjadip: just saw this

ninjadip: will look into it. i'm on roller coaster now. seems easy other than this part

Wontonimo: for rollercoaster i didn't use memorization

Wontonimo: instead i used modulus. look for a repeating loop and just do the math

Wontonimo: c++ can do the modulus and multiply to solve test case 6 in less than 1 millisecond.

ninjadip: HOW CAN it do that??

ninjadip: like if the pattern that goes on the ride the same? don't add up the people ?

Wontonimo: yeah, add up the people

Wontonimo: here is another hint written in python

Wontonimo: http://chat.codingame.com/pastebin/b2c54ea2-9b75-4b52-8e37-a2a7a4a9f2a4

Wontonimo: ^^ that example reduces a loop into a modulus

Wontonimo: it has to be a repeating loop though

struct: or solve it in js and you can brute force it

Wontonimo: :scream:

ninjadip: hey just saw your messages, Wontonimo, reading them

ninjadip: thought i was in there posting to you, not to world

ninjadip: i got an idea, thanks, back to work for a bit though and then i can come back

eve_va_hooves_the_king_of_losers: NNUC

eve_va_hooves_the_king_of_losers: thats the virus's name

eve_va_hooves_the_king_of_losers: it slowly breaks down your computer and sends anything it finds "useful" to the host

Wontonimo: i'm dropping off world chat for a few hours

eve_va_hooves_the_king_of_losers: k

jacek: oO

jacek: mods are asleep!

BlaiseEbuth: Riot! \o/

jacek: riots in canada, and Wontonimo is off... :thinking:

Blokops: Wontonimo IS CANADA!!!

Blokops: i had my suspicions

eve_va_hooves_the_king_of_losers: what?

Blokops: indeed

eve_va_hooves_the_king_of_losers: i walk for 10 mintues and this is what i see

eve_va_hooves_the_king_of_losers: *away

BlaiseEbuth: Why riots? No more maple syrup?

eve_va_hooves_the_king_of_losers: i feel if i walk away for another 10 mintues you guys probably have your own country

ninjadip: so he is all of canada? or u mean candian

eve_va_hooves_the_king_of_losers: it's both

ninjadip: there is some new about maple syrup i heard a week or two ago. about how they are having to go into their maple reserves and maple syrup prices have gone up

ninjadip: news*

BlaiseEbuth: The price of the maple syrup barrel is burning! :scream:

BlaiseEbuth: A single sleigh is blocking all the others because of a distracted reindeer.

ninjadip: poor taste

Blokops: i walk for 10 mintues and this is what i see

BlaiseEbuth: I don't allow you to taste my jokes weirdo :scream:

**BlaiseEbuth wash his joke with alcohol.

ninjadip: YES struct Wontonimo i got it:)

ninjadip: roller coaster 100% :)

BlaiseEbuth: GG. In clojure now

ninjadip: never looked at anyone else's code

struct: grats

ninjadip: no clojure

ninjadip: just my own logiv

5DN1L: BlaiseEbuth refers to the achievement you can get if you solve the same puzzle in clojure

ninjadip: whats that

5DN1L: another programming language

ninjadip: i get more points for doing the same puzzle in another language

ninjadip: ?

5DN1L: yup

jacek: if you do one in C, you can get C++ for free

BlaiseEbuth: (yup)

jacek: ee*

ninjadip: oh

ninjadip: i never do C

BlaiseEbuth: Took some time to got it...

ninjadip: just c++ and python and java in school

5DN1L: clojure = lots of brackets

BlaiseEbuth: 250 extra xp for doing roller coaster in clojure

BlaiseEbuth: Go ahead https://bubok.tech/category/languages/clojure/ :p

ninjadip: cool site

ninjadip: not getting into clojure at this time in my life however

ninjadip: too much going on

ninjadip: if i could get this maven import problem to work right in eclipse i would have more time lol

ninjadip: POM problems

NotForrest: where do you guys go to do like c++ golf puzzles?

eve_va_hooves_the_king_of_losers: "time to break code and eat food, and im all outta code" -bobo

Astrobytes: NotForrest: there's code golf on here in the multiplayer section, there's stackoverflow codegolf community, OneLoneCoder has some nice golf challenges (all challenges are golfable iirc)

Astrobytes: (last one is on Discord)

BlaiseEbuth: Found this some time ago, but didn't tested yet https://code.golf/

Rebollo: guys enum at the end can be a "ALIAS" and behind the scenes a INT at the same time right?

Rebollo: Why I cannot perform like:

Rebollo: c++

Rebollo: enum Direction : int { UP = 0, RIGHT, DOWN, LEFT };

Rebollo: Direction d = LEFT;

Rebollo: Direction a = d - 1;

Astrobytes: int a = d - 1 would work

Astrobytes: or you could cast the rvalue to type Direction

Rebollo: but then a need to reassign to Direction again

Astrobytes: Point is, you're mixing types here

Rebollo: Because i want to change to right

Rebollo: if left

Rebollo: and to up

Rebollo: if down

Rebollo: ANd son on

Rebollo: wihtout doing ifs

struct: Direction a = static_cast<Direction>(d-1);

Astrobytes: I showed you how the other day

Astrobytes: with your array of dx and dy

Astrobytes: The enum is only to key into the dx/dy arrays and to instruct your object which direction to move

Rebollo: Yes but U used two arrays

Rebollo: One for each dimension

Rebollo: I want to do

Rebollo: enum Direction : int { UP = 0, RIGHT, DOWN, LEFT };

MACKEYTH: Hi all!

Rebollo: int dir = (d+2)%4;

Rebollo: so I can change LEFT

Rebollo: RIGHT


Rebollo: or up Down

struct: check what I wrote

Astrobytes: https://www.toptal.com/developers/hastebin/bizitehexa.cpp

Rebollo: same rule

Astrobytes: that's what I sent the other day struct

Rebollo: true

Astrobytes: but yeah, as I said initially about types and as struct showed with the cast, there's your answer

Rebollo: sorry

MACKEYTH: Any tips for tightening up a Monte Carlo search algo? I'm stuck at #1 silver in UTTT. :(

Astrobytes: Object* ob = new Object(); obj->move(LEFT); obj->move(RIGHT); etc

struct: which language?

MACKEYTH: Java

Rebollo: c++

Rebollo: sorry

Rebollo: lal

Rebollo: worked

jacek: silver already? gratz MACKEYTH

struct: MACKEYTH do you allocate the nodes you will need at the start?

struct: or is this not possible in java?

Astrobytes: flat MC struct

struct: ah

MACKEYTH: I'm creating nodes for just the first generation of possible moves, then running sims using primitives and arrays.

jacek: are they entirely random?

MACKEYTH: I'm running them evenly for each move.

jacek: i mean the simulations, the moves inside simulations

MACKEYTH: Thinking I should implement a UCT-like choosing method that does more sims for high-scoring moves.

MACKEYTH: Yeah, rollouts are completely random, no heuristic.

jacek: simulations could be more intelligent: for example if there is a winning move, make it. also if there is a winning small board move, give it more probability to be chosen

Astrobytes: well at each depth you are evaluating anyway so the next depth will be based on last best move no

Astrobytes: ?

MACKEYTH: It's simple MC, not MCTS

struct: I think its time to learn a new algo

MACKEYTH: Not building a tree beyond the immediate possible moves.

Astrobytes: are you doing complete games or just to depth n?

struct: maybe you can try minimax first but its not ideal for uttt

MACKEYTH: Complete games.

Astrobytes: ah cool

Astrobytes: and you're still only getting a few 100 sims?

Astrobytes: or did you fix the GC issues?

Astrobytes: (I missed the rest of last nights discussions)

MACKEYTH: No, it's doing a lot better now. About 10k sims on an open board, over 100k near endgame.

MACKEYTH: Seems like it's not performing as well as it should for those numbers.

Astrobytes: ah cool. Well, I'd add some simple heuristics as jacek suggested earlier

Astrobytes: before trying anything else

Default avatar.png Dobbertstz: http://chat.codingame.com/pastebin/d2d47e08-be10-4848-9a36-7b4ee66b3125

Default avatar.png Dobbertstz: whoops, did not mean to do that. did'nt think it was that long either :

Astrobytes: all good. It's an optimisation issue if you fail on the extra large testcases usually,

jacek: have you tried the forums https://www.codingame.com/forum/t/tan-network-puzzle-discussion/23

Default avatar.png Dobbertstz: problem is i do find a route, just does not seem to be the optimal one

Default avatar.png Dobbertstz: I could think of a puzzle using a 'backroad' relatively far from the start but with a very small distance to the end (A* should solve this), hence the question here. But I'll look at the forums first. Thanks anyway!

Astrobytes: there's not usually any discouragement of particular algorithms unless explicitly stated btw

struct: jacek you use minimax or mcts with your NN?

Default avatar.png Dobbertstz: That's the answer I've been looking for. Jacek's link is spot on btw, thanks!

jacek: mcts

struct: thanks

jacek: my first trials with NN were with minimax

Default avatar.png Dobbertstz: If anybody is interested, I too swapped my lats and lons. Thanks again for pointing me in the right direction, I'll head straight to the forums next time!

jacek: :tada:

Astrobytes: forum first, then chat if you're still stuck, usually works ;) Glad ya got it sorted!

derjack: hmm my 1-ply minimax is enough to be in top silver in UTTT

struct: with nn eval?

derjack: eeyup

MACKEYTH: How does your nn eval work?

derjack: it takes board as input, and withing hidden layers magic it outputs probability of winning of the board for the player

derjack: its just more sophisticated evaluation function

Astrobytes: Succinct explanation :)

struct: easy enough

struct: writing the code atm

Astrobytes: nice!

MACKEYTH: How did you teach it the magic?

jacek: via self-plays in alphazero-style

MACKEYTH: How many generations did it take to develop your current eval logic?

jacek: that got me top 5. i was curious how strong is the eval itself

struct: I bet you can get legend with mcts 2ms

struct: per turn

jacek: hmm dont remember, but usually its around 50-100 iterations

jacek: 10k-20k games per iteration

jacek: getting right inputs for NN in UTTT was/is quite a hassle

MACKEYTH: I don't have a really solid grasp of NN.

jacek: my purer mcts bot would be around top 20-25 i think now

MACKEYTH: Overall, or in Silver?

struct: overall

struct: you dont need NN for top 10 most of the time

Astrobytes: though NNs are definitely becoming prevalent in board games at least

struct: if you cant write an eval write a NN

struct: problem solved

jacek: UTTT is still most about mcts and speed

struct: i have like 100x the rollouts dbd has on bt

struct: but we are the same rank

struct: maybe he uses different algo or something

jacek: or hes trolling

struct: true

struct: 10k seems low

struct: or w/e he has

jacek: or different counting. in pure mcts i report generally 10x less rollouts than others yet im at their level or higher

struct: how many did you have?

jacek: hmm for bt i never used vanilla mcts

struct: I used at the start

struct: my arena one has 400k turn 1

struct: with dynamic depth on rollout

struct: with no eval and full rollout until game is over

struct: I have 1M on first turn

jacek: oh my

struct: not fully random rollout though

struct: capture 7th row piece if its possible

struct: I think thats the only thing thats added to it

jacek: win/loses 3-4-plies too?

struct: no just if there is a piece on 7th row

struct: my arena version is old

struct: fully random its closer to 1.8M since the rollouts are way shorter

struct: but i rolllout all children

struct: this also affeects the number

struct: its jsut checking if there is a piece on the 7th row and its the player turn to move

struct: to check for win

TimberStalker: Why cant c# have a normal modulo operator

struct: it does?

TimberStalker: Doing modulo on a negative number in c# gives a negative number as a result, rather than looping it around to a positive number.

Wontonimo: you can then just add the modulo then modulo again

Wontonimo: or if you are certain the number will be greater than -modulo to begin with, then (num+modulo)%modulo

e_fishel: yey

e_fishel: 500 cocs

One-Six: wow

Wontonimo: now work on your global rank and get it less than 3,000

Wontonimo: you've finished Clash now stretch your wings with multis

Wontonimo: do TRON (aka line racing) https://www.codingame.com/multiplayer/bot-programming/line-racing

Wontonimo: turn left, right, or go straight. don't run into things

Default avatar.png KHRISTO: How do I Increase Thrust??

Wontonimo: what programming lang are you useing?

Default avatar.png KHRISTO: "Go"

Default avatar.png KHRISTO: X any Y

Default avatar.png KHRISTO: and*

Wontonimo: idk go. sorry. paste your code here anyway and let me take a look

Default avatar.png KHRISTO: // Edit this line to output the target position

       // and thrust (700 <= thrust <= 700)
       // i.e.: "x y thrust"
       fmt.Printf("%d %d 50\n", nextCheckpointX, nextCheckpointY)

Wontonimo: change

Wontonimo: fmt.Printf("%d %d 50\n", nextCheckpointX, nextCheckpointY)

Wontonimo: to

Wontonimo: fmt.Printf("%d %d 100\n", nextCheckpointX, nextCheckpointY)

Wontonimo: and that will increase your thrust to 100 instead of 50

Default avatar.png KHRISTO: Thanks so Much!

Wontonimo: only costs you 2 bitcoin

Default avatar.png KHRISTO: WHAT

Wontonimo: lol

Default avatar.png KHRISTO: I have 0.000001 Bitcoin

Wontonimo: submit that bot and tell me what rank you reach

Default avatar.png KHRISTO: Thats like 0.01 Money

Default avatar.png KHRISTO: I reached wood

Wontonimo: and i'll give you another tip

Wontonimo: which wood?

Wontonimo: there are 3

Default avatar.png KHRISTO: The first one probably

Default avatar.png KHRISTO: I just started playing.

Default avatar.png KHRISTO: I might quit

Default avatar.png KHRISTO: I thought coding would be easy

Default avatar.png KHRISTO: By The Way, What code do you use?

Wontonimo: probably a good idea. if you don't reach expert level and beat people who have 20 years experience in less than 1 hour it isn't for you

Wontonimo: joking aside, i love coding. started when i was 8

Default avatar.png KHRISTO: How old are you now?

Wontonimo: i sucked at it for 10 years

Wontonimo: i've been coding professionally for 25 years

Default avatar.png camsoupa: don't give up! it's hard at first, but with practice you will be amazed at your progress

Default avatar.png KHRISTO: Sorry, Coding is not for me

Wontonimo: he was talking to me! thank camsoupa, i can really use the encouragement sometimes

Default avatar.png KHRISTO: Ill stick to Drone phootage taking

Default avatar.png KHRISTO: Nice to see yall!

Wontonimo: lol

Default avatar.png KHRISTO: Bye!

Wontonimo: bye

Wontonimo: maybe if someone told him that there are easier languages to lear

Wontonimo: n

Wontonimo: oh well, he gone

Wontonimo: hey camsoupa, don't think i've chatted with you before

Blokops: yet again im defeated by a ruby user

Blokops: curse their name and obtuse one line code

One-Six: XDD

One-Six: I got beat by python3 more, I guess it's just because there's a lot of python coders here

One-Six: and Python are succinct anyways

Blokops: there no better feeling that ton free style rap python code

Default avatar.png Mauprogamer333: and is because phyton3 is a lil bit more fast of code