Chat:World/2021-09-13

From CG community
Revision as of 05:29, 14 September 2021 by Chat Log (talk | contribs) (Created page with "<img src=/a/63052365393434> jacek: good morning File:Default_avatar.png gigabuffoon: good morning! File:Default_avatar.png gigabuffoon: wait are you a jagiellonian...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

jacek: good morning

Default avatar.png gigabuffoon: good morning!

Default avatar.png gigabuffoon: wait are you a jagiellonian

Default avatar.png gigabuffoon: those guys were the best

jacek: the kings? oO

Default avatar.png gigabuffoon: definitely

struct: im messing with you Wontonimo

struct: sorry :(

Wontonimo: haha

Wontonimo: it's all good

struct: im sure it will be fine

Wontonimo: it's not the first time. won't be the last. i do live very close to a lot of wilderness, so it is expected

struct: it seems china has over 2 billion rats

struct: you will be fine

Westicles: custom game of life

Westicles: potw

struct: seems easy enough

struct: ill try it tomorrow

Wontonimo: nearly midnight. gn all

struct: gn

Default avatar.png roughtough: heya

ProCoder03: For FlatMC in CvZ, should I make the guy move towards an random zombie ??

darkhorse64: moving towards a zombie is not always a good move for scoring. IRL, it never is

ProCoder03: Then ??

ProCoder03: should we move towards the person who has most zombies on his trail ??

darkhorse64: Actually, I have used a GA for solving. My initial guess is completely random moves and my fitness function is just the score

ProCoder03: wow, GA... I don't know GA!!

ProCoder03: Need to learn it then...

ProCoder03: Ahh... I found out one, in forum..

ProCoder03: Thanks darkhorse64

darkhorse64: for starting, you can do the following: say you solution is an array of moves (40 is enough). Fill it randomly, run the sim, eval. Then, make an random mutation on the array, sim, eval, keep the best. Repeat until you run out of time. This is called hill climbing

darkhorse64: This should be better than flatMC

ProCoder03: Awesome !! Thanks

ProCoder03: but how do we do a random mutation

darkhorse64: Select a random place in your array and change the current value with a random one

ProCoder03: :thumbsup:

darkhorse64: A GA uses a pool of solutions. At each cycle, you keep the best solutions and you build a new solution from two randomly selected solutions. For a given move, you pick randomly a move from one or the other solution. You can also keep part of one solution and fill the remainder from the other

ProCoder03: just like hill climbing in a tournament style, right ?

darkhorse64: You can also keep some of the best solutions with a random mutation and have a new few random solutions to avoid getting stuck in a local minimum. Yep, the tournament style is probably the right picture

ProCoder03: Thank you so much darkhorse64

Default avatar.png JustinZhang: Oh what is GA

ProCoder03: Genetic algorithm

darkhorse64: There are many twists you can apply to a GA: pool size, rate of mutation which have a dramatic effect on the efficiency. Genetic algorithm. So there is no single implementation for a GA

darkhorse64: The most important things are how you model your problem (which parameters you evolve) and the fitness function

ProCoder03: the fitness function is the scoring function right??

darkhorse64: For CvZ, yes. This is enough. For more complex problems, you need to evaluate many more features

ProCoder03: why does CG take my completion in to account while finding the best score??

ProCoder03: Can't they just take the best score :confused:

darkhorse64: Your goals is to save at least one human per test

ProCoder03: :disappointed:

darkhorse64: Humans score high

ProCoder03: wow, even my naive method seems to be performing good :smiley:

Default avatar.png apcoder: Hey can anyone help me with stub generator input.I am new to contributions.

Default avatar.png JustinZhang: thanks guy

Default avatar.png gigabuffoon: Made it to top 100 clash tonight!! Exciting :) fun platform

Default avatar.png gigabuffoon: these longer formats are much scarier, lol

Default avatar.png ash15khng: lol i see you keep winning

Default avatar.png JustinZhang: When I get the higher rank in COC everything Is harder

Default avatar.png JustinZhang: lol

Default avatar.png Saturne: You should have tried that one Justin

Default avatar.png WakimMRT: hello

Default avatar.png JustinZhang: hello

kyoya34: hello

kyoya34: have any of you guys completed dont panic episode one?

Uljahn: sure

kyoya34: im not able to pass all test cases

kyoya34: how did u do it

Uljahn: debug

kyoya34: uhh..im a begginer bro

BlaiseEbuth: debug

ProCoder03: is there anything like beginner can't debug or what :confused:

littlebear: good evening

kyoya34: there is no error in my code to debug

kyoya34: it passed 5/7 test cases

kyoya34: but it takes too long

kyoya34: and i cant find any way to decrease the time complexity

ProCoder03: what language ??

kyoya34: cpp

ProCoder03: and if statements shouldn't take long

Default avatar.png kenav: have you used cerr << "Debug messages..." << endl; ?

Default avatar.png kenav: check all the variables on the last floor :)

Default avatar.png kenav: kyoya34, sorry I thought you were talking about "Submiting" code. To pass tests - make sure you used "elevatorFloor" and "elevatorPos" variables :)

kyoya34: thats the thing...i am not getting how to use elevator pos variable

kyoya34: elevator pos is defined inside a loop..so i cant use it outside

ProCoder03: just define it outside and use

ProCoder03: Ezpz

Default avatar.png kenav: +1. feel free to change auto-generated code !

kyoya34: ok..thanlyou

kyoya34: thankyou*

ProCoder03: I finished it now in just 10 additional lines....

Default avatar.png Fettles: hey guys

ProCoder03: Hey..

ProCoder03: Can someone explain conway sequence please ?

Default avatar.png C26_1: Conway sequence is a sequence started with two first terms equal to 1 as feeds

Default avatar.png C26_1: Here we denoted P(n) as nth number in Conway sequence

ProCoder03: Thanks...

Default avatar.png C26_1: The recursion relation is this: p(n) = p(p(n-1)) + p(n-p(n-1))

Astrobytes: *recurrence

darthinvader666: hello

MiyamuraIzumi: Hello gúy

Default avatar.png C26_1: um, I have a question: What website can I put my math research into without cost and without needed PhD. I know it's unrelated to computer science but help me this once

Default avatar.png C26_1: I'm search in google for a while but it didn't resolve the problem

struct: isnt research gate free?

Default avatar.png C26_1: Ummmmmmmmmmm

Default avatar.png C26_1: Im gonna go to that webiste for a moment

AllYourTrees: arxiv

Default avatar.png C26_1: website*

AllYourTrees: ?

Default avatar.png C26_1: Arxiv is good but it didn't help you create your own paper

Default avatar.png C26_1: hold up a second

Default avatar.png C26_1: ResearchGate website needs your research email

Default avatar.png C26_1: How can I use my email to become research email

struct: ah I didnt remember that research mail was needed

jolindien: C26_1 overleaf.com/

Hiro-GG: welp

Hiro-GG: i did everything correct and i got success on all tests

Hiro-GG: but i got 75%

Hiro-GG: why

Astrobytes: validators != tests

Astrobytes: They're different to prevent hardcoded answers.

Hiro-GG: i did the same thing i did in another game

Hiro-GG: on the last game i got 100%

Hiro-GG: but on this one i got 75%

Hiro-GG: i dont understand it bruh

Hiro-GG: i did the exact same

Uljahn: guess it was one of those low-effortly approved clashes

eulerscheZahl: hooray to the quest map

eulerscheZahl: https://eulerschezahl.herokuapp.com/codingame/puzzles/stats/ that bar chart is loading slower and slower, maybe i should optimize the query

BlaiseEbuth: select * from *

eulerscheZahl: much worse. I extracted some properties such as author and type (clash/puzzle) in separate columns. but also store the full json response in my DB

struct: Who shows as owner of yavalath?

eulerscheZahl: for the chart I realized that I haven't stored the date in its own column. so I parse the full json each time you load the chart

eulerscheZahl: it's struct because I stored that contrib before you deleted

struct: I see

littlebear: lol

struct: they updated it though

struct: Im the owner again

eulerscheZahl: oh

struct: except on the main page of the puzzle

eulerscheZahl: https://eulerschezahl.herokuapp.com/codingame/puzzles/?q=struct&category=ANY&author=on you madea clash?

struct: on ide im the owner

struct: yes

struct: when I played clashes

struct: very long ago

struct: just a formula so I could win some clashes

littlebear: struct you love board games ?

eulerscheZahl: n*n*(n+1)/2

eulerscheZahl: looks beoring

eulerscheZahl: boring

struct: well its a clash :p

struct: no littlebear

struct: I dont really play board games

eulerscheZahl: he loves porting them and drive smits nuts

Astrobytes: unless it's called Breakthrough that is

struct: one day ill finish it

struct: just like stc

eulerscheZahl: you won't

struct: yeah probably not

struct: I usually stop at eval

eulerscheZahl: and before subimt

struct: The good thing about mcts games is that they dont really need one

struct: But I can understand why people dont enjoy them

struct: hard to make improvements

AllYourTrees: evals :scream:

AllYourTrees: i can't copy paste an eval between games for ez wins

struct: true

struct: my uttt bt and c4 are all the same bot

struct: pretty much

AllYourTrees: love it

struct: just a few more features on bt due to ept and it being more recent

AllYourTrees: it'd be cool if we could submit bots that could play multiple games

eulerscheZahl: be the change you want to see

eulerscheZahl: create multiple games and put them in the same contrib

MiyamuraIzumi: :D

AllYourTrees: we can call it "Sim City"

struct: make it play multiple games at once

struct: to make it even harder

AllYourTrees: oooh

eulerscheZahl: UTTT but you play on all 9 boards at the same turn

MiyamuraIzumi: harder to be appoved :D

darkhorse64: fog UTTT: you do not see opponent moves

AllYourTrees: :nauseated_face:

MiyamuraIzumi: so 9 different version of UTTT

MiyamuraIzumi: fog UTTT is one of them

struct: we need hex uttt

ZeroMemory: test

struct: test received

AllYourTrees: test failed

ZeroMemory: :joy::joy::joy:

eulerscheZahl: validator

AllYourTrees: okay for multiple games at once, do you make moves in all games per turn? or choose a single game to make a move in?

eulerscheZahl: up to you to make the rules

eulerscheZahl: or just generate a new set of rules every time a game is played. and pass it to the bots in some standardized way

Muppitfood: Anyone know why coders strike back have so many more entries than the other competitions?

eulerscheZahl: because it's the onboarding game

darkhorse64: It's called General Game Playing

eulerscheZahl: i didn't know the exact term

eulerscheZahl: i know that aCat is interested in that field

BlaiseEbuth: That's cool. I worked a little on it.

darkhorse64: A meta language that describes the game and some hints. I think Ludii is an GGP example

BlaiseEbuth: But you don't play multiple games at once. You just get the game rules as inputs.

darkhorse64: You need a meta bot to understand rules and play the games

xsabi: Hey! Do you have any news about Fall Challenge 2021 so far?

darkhorse64: none

struct: maybe

struct: :zipper_mouth:

xsabi: Thanks. A bit worryingm, but maybe in October we'll know more.

darkhorse64: You said already too much, struct

AllYourTrees: SPILL THE BEANS

eulerscheZahl: struct? speak out!

mkkhell: where can i find the puzzle of the week?

struct: im trolling sorry

eulerscheZahl: were they looking for community testers again?

**eulerscheZahl slaps around a bit with a large fishbot

AllYourTrees: T R O L L I N G

eulerscheZahl: R A C E C O N D I T I O N

OldJohn: D E A D L O C K

mkkhell: test

ProCoder03: When are you guys planning to validate ??

ProCoder03: is there a mathematics trick for Magic count of numbers puzzle ??

littlebear: test received

eulerscheZahl: planning to validate what?

eulerscheZahl: puzzle of the week @mkkhell https://www.codingame.com/training/easy/custom-game-of-life

mrs.kind: hello

eulerscheZahl: Magic count of numbers I just generated all the valid numbers by adding prime factors. but there's another way. search for "principle of inclusion and exclusion"

littlebear: hi mrs

mrs.kind: how are you lilbear?

eulerscheZahl: wait nvm. I used that principle too

littlebear: i am fine thanks, how you doing

ProCoder03: Yeah.. I am doing it by using sets and generating numbers but I get out of memory error

mrs.kind: eh, i punched a brick wall and a tree

littlebear: haha

ProCoder03: Is there a wiki on that ...

mrs.kind: i isnt mad

MiyamuraIzumi: hello guys

mrs.kind: i was just calm

eulerscheZahl: https://cp-algorithms.com/combinatorics/inclusion-exclusion.html

ProCoder03: Thanks eulerscheZahl

eulerscheZahl: and for another basic question: "how many numbers <= 10 are divisible by 3?"

MiyamuraIzumi: if we have solver in MCTS then we will change selection so that it will include the solve flag (I use flag to marked a node as solved)

eulerscheZahl: 10/3 = 3 (rounded down). So you can count them without enumerating

eulerscheZahl: that's all you need to know

MiyamuraIzumi: so that it will always select the win-node and don't select the lose node

ProCoder03: Ohhh.... That sounds easy...

MiyamuraIzumi: am I correct?

mrs.kind: should i change my username?

ProCoder03: no need mrs.kind

mrs.kind: why?

ProCoder03: but if you want to, you can

eulerscheZahl: also there's an easy version of the puzzle you are facing: https://projecteuler.net/problem=1

eulerscheZahl: the famous first puzzle of project euler, that can be solved with pencil and paper

darkhorse64: MiyamuraIzumi: why select a solved node ? It will not learn you anything new

eulerscheZahl: because it affects the stats of the parent node?

MiyamuraIzumi: but we know that this node is solved right?

ProCoder03: Ohh... I remember solving it, but by using C#..

mrs.kind: i have like 4 accounts on this website

eulerscheZahl: i have only 1

eulerscheZahl: eulerscheZahl

ProCoder03: OMG!!

mrs.kind: dont ask me what their names are

ProCoder03: 4 acc., for what ??

darkhorse64: If you have already solved children, you'd better solve others so that you can solve the node

mrs.kind: i have alot of account for things

darkhorse64: Unless one child is a Win, which means the node is a Loss and that you do not need to solve the other children

mrs.kind: plus if ya guys and girls knew my account they'll prob ban me again

mrs.kind: anyway i just got done with coders strike back

PureDay: so ur that

PureDay: eve.ha.hooves person?

ProCoder03: Okay if I have 3 primes, then I have to divide the no for 3! acc. to inclusion and exclusion principle, how do we do it ??

mrs.kind: nope never heard of eve.ha.hooves

mrs.kind: who is eve.ha.hooves?

BlaiseEbuth: Lel

Uljahn: eve and 7 smurfs

struct: only 4 accounts lol

struct: I have lost track

mrs.kind: on lost track on what?

struct: of how many accounts i have / had

mrs.kind: okay

BlaiseEbuth: We recognized you eve... I mean mrs.kind

mrs.kind: eh, i never did lie

mrs.kind: pureday said "eve.ha.hooves"

mrs.kind: so then i said "nope never heard oh eve/ha.hooves" i isnt lying

BlaiseEbuth: Oh really? :3

mrs.kind: yup

BlaiseEbuth: :grin:

mrs.kind: i know im gonna get banned by him soon enough

BlaiseEbuth: him ?

mrs.kind: yup.him

mrs.kind: the "him" hates me

struct: I dont even know how to ban

BlaiseEbuth: Yeah... That's why he banned eve right?

mrs.kind: not you, HIM

mrs.kind: and i help getting "drafted from coding"

mrs.kind: *ketp

Astrobytes: You again.

BlaiseEbuth: Hello him

mrs.kind: there is "him"

mrs.kind: fitting name if i say so myself

BlaiseEbuth: You could at least try to look like different when you create a new account eve...

BlaiseEbuth: * mrs.kind

mrs.kind: eh, i would be lying then

BlaiseEbuth: Friendly advice for your next one

IndecisionTree: I, for one, think the fake mustache and cheap sunglasses look *great* Mrs. Kind.

IndecisionTree: stick with it

mrs.kind: fine fine, im gonna code, i learned how to code AI

Astrobytes: So mrs.kind, would you like to be banned right now or later?

mrs.kind: use my name that i told you dude

struct: which name?

mrs.kind: not any of the usernames i had

BlaiseEbuth: Yeah, good advice! Next time take a screenshoot of a drawing of sunglasses and mustache eve!

  • mrs.kind

mrs.kind: when i first came here i said "call me kayla"

Astrobytes: Funnily enough, no one was listening.

BlaiseEbuth: Eve said that, yes. So you admit you're eve?

mrs.kind: never said i was isnt

littlebear: * mrs kind

darkhorse64: can we talk about coding and games ? This convo is boring and pointless

Astrobytes: Banned again.

Astrobytes: I hate this damn chat sometimes.

BlaiseEbuth: reCurse stole darkhorse64's account! :scream:

Astrobytes: struct or whoever, if it comes back ban it. I'm off, cba with this crap right now tbh

darkhorse64: We hit ground zero too many times. Why BlaiseEbuth ?

struct: cya astro

mkkhell: how can i split a string in cpp

mkkhell: strok doesnt work in clash of code

mkkhell: also stoi doesnt work( string to integer)

BlaiseEbuth: streams

struct: stoi surely works

struct: have you include <string>?

struct: https://stackoverflow.com/a/14266139

darkhorse64: http://chat.codingame.com/pastebin/84802dbf-ef1d-444b-8543-3d8662b1b5fe

struct: darkhorse64 are you working on any multi atm?

darkhorse64: Not really. Just improving my codebase for C4 (trying to simplify my solver).

PatrickMcGinnisII: I can't seem to get over 47% on bulls and cows 2, any hints? yes I'm using a slow lang

PatrickMcGinnisII: i feel like I'm missing some branching factor math trick

darkhorse64: My solution is really a brute force one so C++ helps a lot

Marchete: why FB again, Illedan?

darkhorse64: I wonder if he slept tonight

struct: he won 3 games vs recurse o.o

littlebear: http://files.magusgeek.com/csb/csb_en.html in this article section 4 simulation (between 0 and 200) should be 0 and 100 right ?

struct: darkhorse do you expand again if its a forced move?

RoboStac: littlebear - it goes to 200 in legend, 100 before that

littlebear: oh ok

mkkhell: @struct yeah but i cant do like a for loop and extract a string out of every index into stoi

mkkhell: ex "123" for(...){

mkkhell: int t= stoi(ex[i])

mkkhell: ...

struct: yeah

mkkhell: how can i do so then?

struct: ex[i] - '0'

struct: I think

struct: ex[i] will be a char

mkkhell: didnt work

mkkhell: bro

mkkhell: http://chat.codingame.com/pastebin/e34b8dd1-10ce-4363-81bf-0bdb21870114

mkkhell: ^^^

struct: int t = ex[i] - '0';

struct: works

littlebear: yup

mkkhell: oh damn

mkkhell: thanks dude!!!

struct: stoi is to conver the string to int

struct: ex[i] is a char thats why it did not work

struct: np

mkkhell: yess okey

mkkhell: how about splitting a string

mkkhell: whenever there's a comma for example

struct: darkhorse showed

struct: http://chat.codingame.com/pastebin/84802dbf-ef1d-444b-8543-3d8662b1b5fe

struct: it returns a vector of strings

mkkhell: okey thanks all

mkkhell: yes

struct: bot looking good Illedan

darkhorse64: struct: it works on some bots but not all (maybe my fault)

darkhorse64: expanding forced moves

Default avatar.png foxy_gir_halo: im back again

mkkhell: the string splitting function has this error

mkkhell: Implicit instantiation of undefined template 'std::__cxx11::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >'

/usr/lib/gcc/x86_64-linux-gnu/7.5.0/../../../../include/c++/7.5.0/iosfwd:108:11: note: template is declared here

struct: how did you call the function?

mkkhell: didnt even call it

mkkhell: just put it above the int main

mkkhell: buffer has an error

struct: https://tech.io/snippet/N7bnqgx

struct: it compiles fine here

darkhorse64: #include <sstream>

mkkhell: darkhorse

mkkhell: thanks

mkkhell: that worked

mkkhell: <#

darkhorse64: It's my super secret bot code. Don't tell anyone !

AllYourTrees: too late i stole it already

mkkhell: hahahaha thanks dude

PatrickMcGinnisII: got 100% on bulls and cows 2... wow, I overcomplicated it to begin with.

MSmits: darkhorse64 I think I made mcts hashing work for yavalath now. a definite improvement

MSmits: I had it before but never saw much gain, but now it's pretty good

MSmits: the trick is when you insert, you check stored hashed result against the current turn's starting board and if the starting board contains hexes that are not in the stored spot, you can safely overwrite them. That way you dont need a large hash array

MSmits: so I store the child index and childcount of a parent node when i expand and then when i expand a new one, i check if i already have it and if so, use the same index/count

**MSmits ramble mode off

MSmits: this should work well for any mcts game with many transpositions and/or large branching

PatrickMcGinnisII: keep talking, something might stick...my 39th ain't so bad...considering

MSmits: ok, well I also added some pruning. In the very late game you have some filler moves that are equivalent or provably useless. I prune those

MSmits: reduces branching

MSmits: on forced moves I continue expanding

MSmits: no need to do a rollout

MSmits: in fact, i do this on any parent with 1 child.

MSmits: I don't store them in my hash table either

MSmits: those are mostly my new tricks

MSmits: altogether I solve 3-4 plies sooner on games that fill the board

MSmits: (around ply 41-42 on a game that goes to 61)

PatrickMcGinnisII: can you aply that to the powerball lottery, it's over $400M atm

PatrickMcGinnisII: pick a number from 1 to 26

PatrickMcGinnisII: anyone?

struct: 24

PatrickMcGinnisII: tx

struct: When will you submit MSmits?

MSmits: I might submit within a day or two a version with no book, just to test for bugs

MSmits: but it will probably be 6th or so.

MSmits: solving sooner and playing lategames better does not help WR much if you fall to traps in early game

MSmits: I also realized I can supervised-learn a NN for Yavalath

MSmits: the mcts goes quite deep and I can round unsolved nodes to wins/losses if they have enough visits

MSmits: the meta mcts i mean

MSmits: so I might try that as well, I was going to do this for oware also. Either way is a good test

MSmits: book + NN could be deadly combo... in theory.

struct: yeah

struct: but you would have to train the nn after the book move right?

struct: or do you still train from the start?

MSmits: hmm, that sounds more like an azero type training

MSmits: no i just mean a value training. I have a bunch of gamestates, i know they are wins, losses or draws and i just train the NN to output the right value

MSmits: it's just a plain list of states and values

struct: if you force it to output always that move isnt it a book?

MSmits: no, i dont force it to output a move

MSmits: i force it to output a value

struct: ah

MSmits: 1 = win, 0 = loss

MSmits: i try to make it output what my meta mcts and its solver come up with

MSmits: then in the bot i can use this output instead of a mcts rollout result

MSmits: it might be off somewhat, but it's a big old average anyways

MiyamuraIzumi: I just forget for somehow

MSmits: which is why you need enough rollouts still

MiyamuraIzumi: How can I print message to screen ?

MSmits: which language?

MiyamuraIzumi: C++

MSmits: error output or game output?

MSmits: game turn output

MiyamuraIzumi: game output

MiyamuraIzumi: game turn

MSmits: cout << "this is output" << endl

MSmits: with a ; at the end

MiyamuraIzumi: I mean the message that show on screen

MSmits: that's different for each game

MiyamuraIzumi: not the one that intruct the bot

BlaiseEbuth: cout << "instructions" << "msg" <<endl;

MSmits: well that wont work

MSmits: you need a space

MSmits: "instructionsmsg"

MSmits: but it's not fixed, it depends on the game, some games dont even have it

MSmits: you cant use messaging in oware for example

MiyamuraIzumi: I am trying on UTTT

MSmits: UTTT has it yeah, lemme check

struct: for uttt is just a space

MSmits: ah ok

struct: 3 3 hello

MiyamuraIzumi: I see thanks

MSmits: I always use the msg to output solved results

MSmits: win/loss/draw etc.

struct: I dont

struct: my bot is shy

MSmits: it's nice, people who are debugging their bot can test against mine to see if their solver is correct

MSmits: and also when mine has a bug, they can tell me :)

MiyamuraIzumi: well my bot lose quite some game, I need to see my score with those game

MSmits: yeah msg is fine for that

MSmits: I also like it to debug a sim

BlaiseEbuth: To sell cars too

MSmits: and to troll

MiyamuraIzumi: :D

BlaiseEbuth: And sing

MiyamuraIzumi: initially, the first msg I use is to print some dummy eval score

MiyamuraIzumi: at that time I also don't know any bot algorithm

MiyamuraIzumi: print as I know a lot :D

MSmits: I recommend learning minimax. It's easy to understand and not much code

MiyamuraIzumi: I am still mess up with MCTS solver

struct: can be tricky

MSmits: Are you 100% sure your bot plays perfectly without it?

struct: and the code that is in the paper doesnt help

MSmits: if you already have bugs, adding a solver is going to make things really hard

MiyamuraIzumi: how to sure with MCTS?

MiyamuraIzumi: it works good

MiyamuraIzumi: that's my point

MSmits: it's a legend bot?

MiyamuraIzumi: yes

struct: this is my solver

MSmits: ah ok, then it's probably fine yeah

struct: http://chat.codingame.com/pastebin/429f3714-dc0d-4e6e-8623-58b30bb7758b

MiyamuraIzumi: thanks

MSmits: mmh that can be optimized a bit struct

MiyamuraIzumi: the point is, I optimize my bot a lot, then when adding solver I have to modify it

MiyamuraIzumi: but I don't understand solver much

MSmits: but it's more important that it works, in MiyamuraIzumi's case

MiyamuraIzumi: so I mess up

MSmits: what part do you find hard to understand?

struct: yeah msmits i can probably exit early if child status = 0

MSmits: also you dont really need to count

MSmits: you can just keep the best status

MSmits: and negate it for the parent

struct: hmm

MSmits: well that is, if you have a 0 symmetric status, you would have to do 2-status or something

struct: maybe ill get 4M rollouts

struct: :p

MSmits: nah, this is not a bottleneck

struct: I know

MiyamuraIzumi: As I understand, If I found a leaf node with direct win/lose/draw this node is solved, then I check with following:

MiyamuraIzumi: if the node is win => it's parent is lose

MSmits: correct

BlaiseEbuth: Make children...

MiyamuraIzumi: if the node is lose/draw => I check all of the siblings, if all of them are lose/draw => parent is lose/draw - else propagate normally

struct: yes

MSmits: if 1 is draw and all others are loss, parent is draw

struct: ^

MiyamuraIzumi: yes, I do like that

MSmits: only if all are loss, parent is win

MSmits: if a single node is unsolved, you stop solving

MSmits: except of course when the newly solved child is a win, then the others dont matter

MiyamuraIzumi: newly solved child is a win

MSmits: well that counts for every step in the solving, wins and losses will alternate, assuming there is no draw

MSmits: so any situation where a child is a win, you can immedately make parent a loss

MiyamuraIzumi: I think my solver is correct for this

MSmits: then the problem might be in the calling of the function

MSmits: when you use it

MiyamuraIzumi: in back propagation

MSmits: I don't do that

MSmits: that's a separate step for me

MSmits: completely unrelated

MSmits: in most bots i either back prop win/loss stats or i do the solver thing

MSmits: but sometimes i do both, but then i still prefer doing it separately

MSmits: this method of using the solver until it stops and then building the backprop on top of that is very messy and bug-prone

MiyamuraIzumi: I see

MiyamuraIzumi: assume that the part of propation is correct

MSmits: http://chat.codingame.com/pastebin/3d6ecf08-56dc-4831-a2d4-5e65a2048254

MiyamuraIzumi: for checking a node directly win/lose

MSmits: thats my backprop for yavalath

MSmits: normal stats backprop, no solver

MSmits: this is solver:

MSmits: http://chat.codingame.com/pastebin/7b0f58c2-a1e8-476c-a91c-6fbbbe73e4f0

MSmits: neither function is calling the other

MiyamuraIzumi: actually, I use UCT

MSmits: how do you mean?

MSmits: I mean I use UCT too, but not for backprop or solving

MiyamuraIzumi: and for some reason, I compute the "mean" value and upper bound and store on the node

struct: MiyamuraIzumi you should benchmark your code

struct: to find the bottleneck

MSmits: I don't store much on the node

MSmits: node:

MSmits: http://chat.codingame.com/pastebin/73226b46-e5bf-4f52-b485-e5ddd14ac9ab

MSmits: that's Yavalath, but uttt is similar

MiyamuraIzumi: well, so I have to change much

MSmits: small nodes are beneficial. I mean it's a tradeoff, sometimes it's good to save more of the gamestate on the node, so you dont have to recalc during selection

MSmits: don't let us tell you what to do. Just try small things and gradually change how you do things as you learn

MiyamuraIzumi: yes, I do it to avoid recalculate

MSmits: we're just showing you alternative ways to do things. Some we havent benchmarked properly. Well except struct, but he's special

MiyamuraIzumi: thank you, I will try with this new way

struct: math operations are fast

struct: I would not trade some bytes for few math operations

MSmits: yeah it depends on how many math ops

MSmits: especially if an applied sim move contains loops and conditions

MiyamuraIzumi: I think the log and sqrt are slow

MiyamuraIzumi: so that's why I store them

MSmits: the log is negligible

MSmits: it only is used for the parent

MSmits: so you calc it once and pass it to each child

struct: But you store them each individually?

struct: I know some people store the uct

MiyamuraIzumi: yes

struct: but storing log sqrt and other stuff

struct: is very expensive

MSmits: mostly because it takes up memory and that loses you cache efficiency

MiyamuraIzumi: my node worth 42 bytes each

MSmits: my nodes are usually 16 to 24

MSmits: sometimes a little higher

MSmits: with small nodes you also stand a better chance to reuse more of your tree

MiyamuraIzumi: well, so I do a lot of wrong thing

struct: its not "wrong"

MSmits: I wouldnt say wrong. There is little stuff you can do to improve.

struct: my first mcts was also wrong

MSmits: pretty sure if i show my code to struct, he will see problems and i will see problems with his

MSmits: every mcts i ever did was "wrong" to some extent. I hope they got less wrong over time :)

struct: maybe he does expansion like i used to do

struct: for every move i make i would expand

MSmits: thats a common mistake

MSmits: but i dont think he does that

MiyamuraIzumi: another thing

MiyamuraIzumi: I declare a global array of 1'000'000 node

MiyamuraIzumi: then reuse this array

MiyamuraIzumi: is this correct way of pre allocate at the startup time?

struct: I do

MiyamuraIzumi: thank you all, I will try another way

struct: http://chat.codingame.com/pastebin/e82a60ab-26ef-4582-bb85-5a6c77bb528e

MSmits: yeah, but 1 million is very few

MiyamuraIzumi: it is still 42Mbytes

struct: well if have access to 768

struct: on uttt 1M wont be enough for first turn

struct: you have access*

MiyamuraIzumi: should I pre allocate more?

struct: if you need space

struct: I reserve 45M just to be safe

MiyamuraIzumi: MEMORY_PTR = (MEMORY_PTR + 1) % OBJ_SIZE; return &MEMORY[MEMORY_PTR];

MiyamuraIzumi: I do something like this

struct: whats that?

MiyamuraIzumi: I preallocate 1000'000 nodes

struct: ah with the way i posted above you dont need any of that

MiyamuraIzumi: then if the node more than 1000'000 -> I modulo to go back to node 0

BlaiseEbuth: So much space. Need to see it all. OO

BlaiseEbuth: What's your favorite thing about space? Mine is space.

BlaiseEbuth: Space...

BlaiseEbuth: Ba! Ba! Ba ba ba! Space!

BlaiseEbuth: I love space.

MSmits: preallocation:

MSmits: const int NODE_MAX = 25000000;

MSmits: Node nodes[NODE_MAX];

MSmits: that's it

MSmits: wont fit that many with a large node, but 10 million should be fine

BlaiseEbuth: Come here, space. I have a secret for you. No, come closer.

MSmits: when did BlaiseEbuth last get reset? Someone forget to do it?

BlaiseEbuth: Look, an eclipse! No. Don't look.

Wontonimo: How's the solver going MiyamuraIzumi ?

MiyamuraIzumi: well ...

MiyamuraIzumi: not so good

Wontonimo: oh

Wontonimo: you were 80th yesterday, not 100'ish

MiyamuraIzumi: :D

Default avatar.png ashwin_h26: sup

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

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

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

IndecisionTree: ┬─┬ノ( º _ ºノ)

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

Default avatar.png JustinZhang: how could you guy write that

Default avatar.png JustinZhang: I want to write that too

thienphuc-dev: "/slap"

thienphuc-dev: :v

**thienphuc-dev slaps around a bit with a large fishbot

thienphuc-dev: ah no

thienphuc-dev: sorry

thienphuc-dev: "/flip"

thienphuc-dev: (╯°□°)╯︵ ┻━┻

thienphuc-dev: =)) nice

struct: hi ZarthaxX

struct: long time no seen

ZarthaxX: i have been busy with uni

ZarthaxX: and personal problems

struct: :/

ZarthaxX: i wont be able to be here until end of semester tbh haha

struct: sorry to hear that

ZarthaxX: yeah, pretty traumatic

ZarthaxX: last week was horrible

struct: feel free to message me if you need

ZarthaxX: i can tell you

ZarthaxX: it's already over tho

ZarthaxX: i will pm you on discord a bit

struct: ok

ZarthaxX: gotta continue studying later for a final exam

Wontonimo: :wave: ZarthaxX good to see you. Good luck with uni and stuff

ZarthaxX: hey wontoo

ZarthaxX: thankkkkss

ZarthaxX: <3

ZarthaxX: this game theory subject allows us to do some final presentation with algorithms

ZarthaxX: guy says we could talk about alphazero

ZarthaxX: pity i cant talk about that thing lmao

Wontonimo: MCTS is(was?) a huge part of alphazero. The UCB calculation is pretty impressive in combining weak classifiers in a tree (random rollout being the weakest)

ZarthaxX: okey

ZarthaxX: maybe i could try reading about it for some presentation but seems impossible for december

ZarthaxX: haha

Wontonimo: you've used MCTS right?

ZarthaxX: yeah, have done bots with that

ZarthaxX: working bots lmao

Wontonimo: that's all i'm suggesting. a focus on UCT, the UCB formula, and that many things can be put in for the eval, like a random rollout or a NN

ZarthaxX: but i have to do a NN

ZarthaxX: :(

Wontonimo: oh

ZarthaxX: never done those

ZarthaxX: i mean, isnt it the thing?

Wontonimo: no

ZarthaxX: anyway, prob i can find any other topic

ZarthaxX: maybe some paper about mcts solver

Wontonimo: i say that and my job is nn

ZarthaxX: thing is to talk about a paper

Wontonimo: ah

ZarthaxX: but i find it cool to talk about a paper and implement stuff

ZarthaxX: or a chapter form this book

ZarthaxX: https://www.cs.cmu.edu/~sandholm/cs15-892F13/algorithmic-game-theory.pdf

ZarthaxX: haha

Wontonimo: nice paper

Wontonimo: book

Wontonimo: don't get me wrong, NN is awesome. I'm not discounting it. I do love it. But it has it's place and often a classic machine learning algorithm fits the problem very nicely

ZarthaxX: wdym by this? " a classic machine learning algorithm fits the problem very nicely"

Wontonimo: a classic machine learning algorithm is something like auto-clustering, or K-means, or support vectors. They can solve a ton of problems without getting into NNs

Default avatar.png dolphin0509: bruh

Default avatar.png EEgmoney: .

Default avatar.png EEgmoney: .

Default avatar.png EEgmoney: .

UmutTaskan: ezzzzzzzzzzz

Default avatar.png JustinZhang: could you tell me how to fix the CBS.log

Default avatar.png JustinZhang: *anyone

Taka-Li: hey guys, I am trying to create a puzzle of "clash of code", what is the validator, what can I input in the validator?