Chat:World/2021-06-28

From CG community
Jump to navigation Jump to search

derjack: sokoban puzzle of the week eh

Westicles: a fine choice

BlaiseEbuth: Yeah congratulation to the bot !

ableflyer: guys what must your rank be to become a clash of code pro

KP56: top 100?

KP56: i think

nuggetbucket54: i think that is depending on how many games you play not ur ranking but i might be mistaken

nuggetbucket54: i have clash of code legend but that is only because i played a bit (500 games) not because i'm actually any good

KP56: trueskill depends on how good opponents who you beat are

KP56: so yes it is your skill

KP56: also i didnt know you can get a rank in coc

Uljahn: the rank is not permanent and decays over time

KP56: in Chuk Norris (https://www.codingame.com/ide/puzzle/chuck-norris-codesize) does space also count as a character?

KP56: because my program fails tests containing space for some reason

BlaiseEbuth: "ASCII characters"

KP56: hm special characters are also messed up

Default avatar.png Siddhesh18: space is an ASCII character with value 32

KP56: yes but my solution does not match tests but only if someone inputs non-literals

KP56: which is weird considering i use this: bin(ord(i))[2:]

Default avatar.png TYJung: how do you do the 2nd lvl for uh hh the checkpoint thingy

Default avatar.png TYJung: im using bash

Default avatar.png TYJung: im using bash

KP56: what checkpoint thingy

KP56: coders strike back?

Default avatar.png TYJung: ah ye

Default avatar.png TYJung: soz im new to coding

KP56: learn some other language, bash is very limited

Default avatar.png TYJung: oh then which do u prefer to use

KP56: and if you were to try any othe more complex challenge it would be impossible to solve with bash

Default avatar.png TYJung: c++?

KP56: you can use c++, python is an option, java, c#, ruby, javascript

KP56: every single one of these is good

Default avatar.png TYJung: uh ok ill use c++ but how do u do the angle thingy with g++

Default avatar.png TYJung: c++

KP56: if (angle < 90) thrust = 0;

KP56: thats what you mean?

KP56: if (angle > 90 || angle < -90) thrust = 0;


Default avatar.png TYJung: http://chat.codingame.com/pastebin/7709940a-4e28-4f5d-80a3-51b718d81695

Default avatar.png TYJung: huh

KP56: int thrust = 100;

Default avatar.png TYJung: ye but it says that

KP56: if (nextCheckpointAngle > 90 || nextCheckpointAngle < -90) thrust = 0;

KP56: and then

KP56: cout << nextCheckpointX << " " << nextCheckpointY << " " << thrust << endl;

Default avatar.png TYJung: ah

Default avatar.png TYJung: ok

KiwiTae: y

Default avatar.png TYJung: thanks

BlaiseEbuth: Come back when you'll have passed to the next league, KP56 will give you his code...

KP56: you basically create a new space in memory called "thrust", then you set it to the value 100, if the angle between next checkpoint is higher than 90, then we want to set thrust to 0

KP56: has anyone here solved the chuck norris puzzle in python?

Uljahn: sure

KiwiTae: ya

KiwiTae: im stuck at 89 ~

Westicles: compressed?

Uljahn: same

KiwiTae: ya :/

Westicles: yeah me too. I'm curious about that c/obj c solution under 60

Westicles: too many people, either it is obvious or it is published somewhere

KP56: stuck at what

KP56: oh chuck norris

KP56: i was asking because i have this code and it doesn't work with special symbols

KP56: http://chat.codingame.com/pastebin/120b2c11-4005-414e-a942-f906188e58b5

KP56: it only passes tests 1, 2 and 5

Uljahn: "The input message consists of ASCII characters (7-bit)", the most common problem is for "%" char the binary has only 6-bit length because of a leading zero

KP56: oh thank you

KP56: FINALLY IT WORKS

KP56: im so grateful

KP56: i wouldnt have figured it out without your help

Uljahn: sorry for ruining the fun of debugging challenge

KP56: since when is debugging fun

Uljahn: always has been

Default avatar.png samiriscool: ayyyyyyyy how u doing coding gang

Default avatar.png Orwell983: How could I test assesmeny for a C++ and OOP profile?

Default avatar.png JEDWF: which site is the best to learn coding

KP56: if you already know syntax

KP56: you can check codewarriors out, it has some very simple puzzles to teach you basics, then you can come back here

Default avatar.png JEDWF: thank you !

Default avatar.png TeKI_Dubz: @samiriscool coding gang is not good

Default avatar.png samiriscool: nah coding gang never dies, am i right boys?

KP56: is implementing mini max after an x amount of moves to decrease possibilities in Ultimate tic tac toe a good idea?

derjack: hm?

KP56: instead of using it since the beggining to see for example 10 moves deep and try to evaluate who has an advantage

KP56: create a simple AI and just start using minimax after an X amount of moves

KP56: im asking which option is better

MSmits: KP56 i have no idea what you are saying

Uljahn: first x moves are most important, do you book them or use MCTS?

MSmits: are you asking KP56?

Uljahn: ye

KP56: what i mean is im trying to make an AI and implement minimax in it, since minimax is score based, i could just make it look through every single possibility for example 10-20 moves ahead and try to evaluate who has an advantage instead of who has won

Default avatar.png TeKI_Dubz: @samiriscool rip coding gang

MSmits: what you are describing is just minimax KP56

MSmits: yes minimax is an option

KP56: oh nvm then

MSmits: you wont get 20 moves ahead though

KiwiTae: KP56 check aCat minimax puzzle

MSmits: it's more like 10 max

KP56: ok thanks

MSmits: mcts seems more effective on uttt, but minimax does work

MSmits: you can get to legend with it

KiwiTae: MSmits no trains today? :D

MSmits: no trains today, tomorrow though

MSmits: and friday

MSmits: I need to finish grading some stuff

MSmits: reports from experiments done by students. They take half an hour each and i need to grade 18 of them still :(

KiwiTae: no gaussian drop on top of the stairs?

KiwiTae: :p

MSmits: gaussian drop?

MSmits: is this some experiment to determine gravitational acceleration or something?

MSmits: if so, that would have been an ok option for a similar assignment

KiwiTae: drop the reports from a stair cases ,white noise grading

MSmits: ohhh

MSmits: nope :)

MSmits: some of them are bad, some are good, I need to actually read them

KiwiTae: :) tough life

MSmits: heh it's ok. Grading my html/css assignment was easier though

KiwiTae: I would make a terrible teacher ><

MSmits: form is quicker to grade than content

MSmits: dont know until you try KiwiTae

MSmits: maybe you would make an excellent teacher because you are already setting the bar too high for yourself

MSmits: my first year as a teacher I was always thinking I messed up

MSmits: but noone else seemed to think so

MSmits: it's a hard job to start out in because you immediately get the same responsibility as every teacher that has been doing it for 30 years

MSmits: some jobs ease you into it, but this is not one of those

MSmits: so.. here's your classroom, with 30 young adults here, have fun, dodge the paper planes.

MSmits: (I;m exaggerating but not by much)

MSmits: with experience it becomes deceptively easy though

MSmits: you can get lazy and stop improving, that's a pitfall

KiwiTae: :grimacing: sorry i was getting my shot ~ it gets easier so you get more time for research

Wontonimo: good morning (or afternoon, or whereever you are on this pale blue dot)

Wontonimo: I haven't taught children in a classroom, but I have done corporate tech training.

Wontonimo: I agree MSmits, doing the same course a few times sure makes it easier

MSmits: well it's almost never exactly the same course, but the gain in time is mostly from the fact that you don't have to specify every action you take during class, when preparing. You can mostly "wing it"

MSmits: but therein also lies the lazy part. Wing it too much and you're not a very good teacher

Wontonimo: :thumpsup:

Wontonimo: lol ... :thumbsup:

MSmits: :)

MSmits: for example,, I could get away with just using the powerpoint from last year in most cases

Wontonimo: yeah, and then part of you would die

MSmits: but if i want to be good, i will check it for mistakes or i'll be making the same mistake every year

MSmits: and sometimes there are new developments

MSmits: or the content of the course subtly changed

MSmits: content is decided on a national level and that changes every so many years

Wontonimo: or you discover a recurring cognitive hurdle in the student population, and make a special focus point to help with that

MSmits: we get new teaching materials too, about once every 6-7 years (new books)

MSmits: Wontonimo yeah exactly

MSmits: this is physics btw, for CS we dont have any books. We write all our own stuff

MSmits: or cobble it together from various sources

MSmits: in that sense CS classes take more time to prepare, but grading is generally easier

Wontonimo: I was tutoring some very young children with serious math issues a long time ago. It seemed from the mistakes they were making they could do simple math with 1-10, and from 20-100 but not from 11-19

Wontonimo: so I got them to say "ten-ty one, ten-ty two" and all their problems went away after 5 min

MSmits: ah yeah

Wontonimo: i was pretty proud of that one. It was the whole english teens that was tripping them up for years

MSmits: it's confusing

MSmits: same in my language

MSmits: tien, elf, twaalf, der*tien*, veer*tien* etc.

Wontonimo: there are probably many many programming and science ones that you've seen. so many that you probably don't even realize that you are helping and rephrasing for the benefit of the students

MSmits: yeah that sort of thing becomes automatic

MSmits: I realize this when I am assisting an intern who never taught before

MSmits: then you realize how much of this stuff you do right without even knowing

Default avatar.png PaulSurzh: I can't do "verbal" math at all. I always have to imagine what the number looks like, do the math and only then tell the answer.

MSmits: anyway, good convo, but gotta do some shopping before it gets late :(

MSmits: ttyl

Wontonimo: me too PaulSurzh, so the whole "teens" number thing never effected me as a child.

Wontonimo: I don't know how a person could do "verbal" math for algebra or calculus

Default avatar.png PaulSurzh: Well, I guess actual math isn't supposed to be done "verbally" at all. I was mostly talking about arithmetic.

Default avatar.png PaulSurzh: Also, my native language isn't English, but we also have the "teens" thing. I think it's pretty common among languages.

Wontonimo: PaulSurzh have you tried any of the bot programming ? https://www.codingame.com/multiplayer/bot-programming

Default avatar.png PaulSurzh: Not yet, I'm most solving puzzles now.

MSmits: once easy puzzles become trivial i think you can succesfully do many multis

Astrobytes: ^

Astrobytes: If you want to, obviously

MSmits: yeah, I never really went back to puzzles, except when i wanted to learn python

MSmits: I still enjoy them, I just enjoy multis more

Astrobytes: Yeah puzzles are great for trying out other languages

MSmits: nine men's morris is still in contribution. I keep waiting for it to appear on the list

Astrobytes: Do you have a bot for it?

MSmits: no, i havent had time for it, but if it becomes a multi i will for sure write one

MSmits: It seems like a great game to practice supervised learning on

MSmits: because you can solve it locally

MSmits: and then train a NN to eval states

Astrobytes: everyone's going in on the machine learning huh

MSmits: to me it's just a tool i dont know yet

Default avatar.png aminzeos: hey guys

MSmits: like mcts, endgame book creation, meta mcts etc.

Astrobytes: I saw Marchet e tech.io article, what a great job he did

MSmits: definitely

Default avatar.png PaulSurzh: Sorry, I'm new here, what is multi?

MSmits: games played by bots

MSmits: with a leaderboard

Default avatar.png PaulSurzh: Ah, okay, thanks.

Astrobytes: https://www.codingame.com/multiplayer/bot-programming

Astrobytes: There are quite a few to choose from ;)

MSmits: the reason NMM seems great to me is my first succesful ML project was supervised learning TTT, also a solved game

MSmits: I could expand this to a more complex solved game.

MSmits: its a smaller step than oware

Astrobytes: Yes, would be a good starting point, I agree

Default avatar.png PaulSurzh: Yeah, Wontonimo has already recommended tham to me, I just didn't know they were called multies.

Default avatar.png PaulSurzh: *them

Astrobytes: Ah ok, sorry :)

MSmits: they are called multies or arenas

MSmits: or just bot games

MSmits: some of them are ex-contests

MSmits: the ex-contest ones have complex rules and are hard to simulate

MSmits: (generally)

MSmits: the rest are super simple and great to practice search algortihms with

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

Wontonimo: ┬─┬ノ(ಠ_ಠノ)

Astrobytes: lol

BlaiseEbuth: ngl

Astrobytes: have you misplaced your vowels again Blaise?

darkhorse64: ankle injury ?

Astrobytes: :D

BobTschigerillo: :joy::joy::joy::joy::joy::joy::joy::joy::joy::joy:

MSmits: is there a rule like, when the emotes use a 2nd line it's too many

Astrobytes: There should be.

MSmits: agreed

BobTschigerillo: :joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy::joy:

Astrobytes: Would you like a kick BobTschigerillo?

BlaiseEbuth: He want

Astrobytes: That counted as a warn then kick I guess :P

BlaiseEbuth: Which vowels btw?

MSmits: only you know

Astrobytes: ^

MSmits: do you know a nigel ?

BlaiseEbuth: Oh. No. Was my answer to the lol of Astrobytes

MSmits: well

MSmits: that doesn't help :P

Astrobytes: "the lol of Astrobytes" sounds like a book or something

dbdr: https://planetoids21.kattis.com/standings

BlaiseEbuth: Lucifer Our Lord -> Nam Gloria Lucifer

dbdr: 2 CGers in top 10 :)

Astrobytes: That bob guy wants a ban btw, he DMd me

MSmits: hey whats that

dbdr: a contest euler mentioned on the chat

Astrobytes: Nice, good job dbdr!

dbdr: then he did not join :D

dbdr: thanks

dbdr: CG experience definitely helps

dbdr: though the referee is not public, need to reverse enginner it :D

MSmits: yeah no idea what it is, but plenty of opposition, so gj

dbdr: small compared to cg contests

dbdr: unfortunately there is still time for me to get reckt

Astrobytes: It's asteroids game basically MSmits

MSmits: ah ok

dbdr: there is some kind of trip to the ICPC championship as first prize, if I understood correctly

dbdr: https://u.icpc.global/deviation-games/

Astrobytes: nice

MSmits: a swag bag

dbdr: :D

MSmits: that makes it worth it

Astrobytes: Yes, presumably one dropped by a burglar MSmits

MSmits: once you have that, you got swag

MSmits: I see

MSmits: this should be on your profile dbdr

MSmits: i won a coding contest and now I got swag

dbdr: I haven't won yet :D

Astrobytes: All your swag are belong to me

MSmits: we'll see

MSmits: lol

dbdr: I'll put it if I do, in your honor ;)

MSmits: cool :)

Default avatar.png BobCicerillo: im back

Astrobytes: hold on to that lead!

AllYourTrees: AllYourSwag?

Astrobytes: :D

Default avatar.png Good-one: hello world ;)

Wontonimo: they recommend 4ms of compute per frame. That's a very small time budget

dbdr: yeah

Wontonimo: seems like it is only enough for if/else bots. Are you doing any simulation in that time?

dbdr: I am doing a sim

Astrobytes: banked?

dbdr: I think it's global limit, yes

Astrobytes: Ah cool

Wontonimo: +1 for sim

dbdr: in rust, without libs, and the input is json :D

AllYourTrees: aww yisss rust

dbdr: so manual parser

Astrobytes: lol

dbdr: and if you get it wrong "Run Time Error" with no feedback :D

MSmits: this is why it's hard to go outside CG for contests. The conditions are almost always worse

MSmits: so once you go CG...

Wontonimo: i understand the attraction of using json, but have these people actually tried parsing in every language?

dbdr: C++ and python are officially supported

dbdr: they added a json parser to cpp

Default avatar.png BobTschicerillo: Hello

Wontonimo: "Run time error" with no feedback ;( It would almost be easier to code with punchcards

dbdr: well, you can run locally against a compiled referee. except somehow it has different input format (spacing)

Wontonimo: you know, just to spice things up

Astrobytes: Jeez :D

dbdr: yeah, was fun. I was ready to give up several times, was not even sure to start

dbdr: happy I did now, whatever the final result

dbdr: :)

darkhorse64: no referee, no visual, 3 days to reverse the mechanics and write a bot -> no fun

Astrobytes: best of luck man, hope you keep that lead

Default avatar.png BobTschigerilo: Im back guys

Default avatar.png BobTschicerillo: hope u fail

Default avatar.png BobTschicerillo: retard

Astrobytes: bye Bob

Default avatar.png BobTschigerilo: retard

Default avatar.png BobTschigerilo: which one

Default avatar.png BobTschicerillo: i have infinite accounts

Default avatar.png BobTschicerillo: bob tschigerillo is great

Default avatar.png BobTschicerillo: forever

Default avatar.png BobTschicerillo: Or should i say

Default avatar.png BobTschicerillo: Bob Cicerillo

dbdr: darkhorse64, there are visuals locally, in Unity

dbdr: and a python visualizer they build in a couple of hours because ppl had issues, pretty cool

dbdr: also, reverse can be fun, as long as it's clear it's part of the challenge

darkhorse64: oh, I rage quit within the first minutes mostly because I did not have the time, so i miss that.

MSmits: did you quit like Bob :P

BlaiseEbuth: Bob didn't quit, he was quitted.

Astrobytes: The Bobs got banned

MSmits: true

darkhorse64: the multiple heads one ? I am sure mods are faster to cut his heads

MSmits: he has infinite accounts though

Astrobytes: I have infinite bans

MSmits: true

darkhorse64: infinite powa

Astrobytes: :D

BlaiseEbuth: But infinite patience ?

Astrobytes: No. Even I have a breaking point.

BlaiseEbuth: Ok. So we have to make a bot to autoban him before you reach that point.

Astrobytes: A ban bot would be great. BAN 9000

darkhorse64: a moron killer

Wontonimo: how do the current Automate2000 and ML bots work?

Wontonimo: afa integration?

Astrobytes: Wontonimo: https://www.codingame.com/blog/markov-chain-automaton2000/

Automaton2000: yeah but i have to start somewhere

Astrobytes: Grr.

zsltg: or create a multiplayer game where the goal is to write a more effective moderation bot :)

darkhorse64: write an a0 that learns from mods how to ban ?

Wontonimo: does world chat use IRC protocol?

BlaiseEbuth: xmpp

BlaiseEbuth: do you want vowels ?

Astrobytes: XMPP

Astrobytes: oh

Astrobytes: hahaha

Wontonimo: using additional details like the users global ranking, XP, and if they have bothered to add an image would all be great additional signals

Wontonimo: not absolute signals, but at least help to not ban me

BlaiseEbuth: First thing i'll teach to the bot is to ban you...

Astrobytes: I can imagine the ban bot seriously annoying a lot of people, initially at least :D

Wontonimo: initial version could just be text warnings in world chat

RoboStac: you want to combat spam by having a bot add more spam? :)

Astrobytes: ^

BlaiseEbuth: Fire by fire !

Default avatar.png Outhous3: helo

dbdr: lol, I forgot to sim the damage to my ship

zsltg: invincible ship? :thinking:

dbdr: yeah, infinite shield

jacek: what game

Astrobytes: ICPC Planetoids

dbdr: https://u.icpc.global/deviation-games/

Default avatar.png BobTschigerilllo: Hello

AllYourTrees: "You reached the limit of plays for a period of time" :scream:

Astrobytes: so annoying

Astrobytes: afk for a bit

Skinjbir: hello world

The_10x_Engineer: hello world

ANONYMOUS42: 𝚑𝙴𝚕𝙻𝚘 𝚠𝙾𝚛𝙻𝚍

eulerscheZahl: dbdr is actually playing that contest?

eulerscheZahl: wait, there's some material to download now - that's new

eulerscheZahl: and even a video - how could I miss that? :D

eulerscheZahl: i see my fault: i expected that all the information was given in the problem statement on kattis. while same of the info was on icpc.global exclusively

eulerscheZahl: i also assumed that the contest would end today instead of tomorrow

eulerscheZahl: oh, dbdr is first :o well done little prince

BlaiseEbuth: little prince ? Oo

eulerscheZahl: of Persia

BlaiseEbuth: oh

eulerscheZahl: but seriously: why is there a long problem statement on kattis that doesn't even mention the 25 page pdf with more detailed rules on another website

eulerscheZahl: that's stupid

eulerscheZahl: and i'm 90% sure that the contest should end today and not tomorrow

BlaiseEbuth: That's a trap

eulerscheZahl: i wish dbdr good luck. but i'm happy i didn't get myself into this

eulerscheZahl: the handbook even has a chapter called "6.2. Bugs / Discrepancies with the Problem Spec"

eulerscheZahl: "How do I quit the game? " Use your OS’s Task Manager to force-quit.

dbdr: eulerscheZahl, the end was postponed because of a major bug in the statement

eulerscheZahl: i see

eulerscheZahl: did that statement bug affect you?

dbdr: NinjaDoggy reversed the issue

dbdr: yeah, it affected me too. but was not too hard to adapt

eulerscheZahl: still some ideas for improvements?

eulerscheZahl: is the "80" below your score the number of submits?

dbdr: yes, better reverse the engine ;)

dbdr: yes

dbdr: about 20 of those were for blind debugging my manual json parser :D

eulerscheZahl: "try not to submit to Kattis more than once per hour"

dbdr: I saw that

eulerscheZahl: and you tried to try it :D

dbdr: #4 has 196

Default avatar.png Good-one: /me

Default avatar.png Good-one: /message dbdr

Default avatar.png TipuTare: http://chat.codingame.com/pastebin/a71014b4-d17c-41d8-95af-b899048f5509

Default avatar.png TipuTare: whats wrong with this code

Astrobytes: It doesn't work.

eulerscheZahl: you should initialize the index and maxmountain inside the main loop

eulerscheZahl: thanks Captain obvious

Astrobytes: :D

Default avatar.png TipuTare: oh

Default avatar.png TipuTare: while True: http://chat.codingame.com/pastebin/1c3b4e54-70bd-4004-b6de-c4c447c809e0

Default avatar.png TipuTare: still not working tho

Astrobytes: Are you sure it's i you want to print?

eulerscheZahl: now you made me open the puzzle, are you happy now?

Default avatar.png TipuTare: i need the index of the highest mountain

MSmits: should work

eulerscheZahl: print(index)

eulerscheZahl: oh, astro said that already

Astrobytes: Yup.

MSmits: oh right

MSmits: btw, i would suggest variable names that are more clear

Default avatar.png TipuTare: why the frick was i printing the i?

MSmits: like "tallest_height"

Default avatar.png TipuTare: i think im stupid

MSmits: and "best_index

MSmits: index is easy to confuse with i

Default avatar.png TipuTare: ty

MSmits: because poor naming

Astrobytes: No, you're not stupid. We all make mistakes.

eulerscheZahl: but what's "best"?

MSmits: sure do

Default avatar.png TipuTare: still not working tho

MSmits: the best target to shoot

eulerscheZahl: that judgemental

MSmits: yeah

MSmits: it's a good character trait when shooting mountains

Default avatar.png TipuTare: wait but its still not working

eulerscheZahl: index_of_most_dangerous_mountain

MSmits: share the code again :)

MSmits: sure, do that :P

eulerscheZahl: works for me TipuTare

eulerscheZahl: while True: http://chat.codingame.com/pastebin/94b9faa1-85c4-4b63-a7ba-b08be8d38016

eulerscheZahl: all green

MSmits: green is good

Default avatar.png TipuTare: oh idk why it didnt work for me

Default avatar.png TipuTare: nvm im dumb

eulerscheZahl: we had that already

Default avatar.png TipuTare: i declared them inside the for

Default avatar.png TipuTare: ty man

MSmits: TipuTare i had problems with this puzzle when i just got to CG

MSmits: did not understand the input/output structure

Default avatar.png TipuTare: how old are you?

MSmits: ancient

Default avatar.png TipuTare: and what language should i learn?

eulerscheZahl: 29 :older_man:

Default avatar.png TipuTare: lol

MSmits: 40 here :P

Astrobytes: 38

Default avatar.png TipuTare: im 14

AllYourTrees: 28

eulerscheZahl: oh, you had a carry-through MSmits

MSmits: whats that?

eulerscheZahl: carryover*

eulerscheZahl: me making up new words

MSmits: ok, but what does it mean

eulerscheZahl: 39+1=40

eulerscheZahl: changing the first digit

MSmits: ohhh ok

MSmits: well this was in februari so been a while

ZarthaxX: smito 40

ZarthaxX: toad 29

ZarthaxX: astro 38

ZarthaxX: oh noeeesss

Astrobytes: almost 39

MSmits: if you repeat it, it's easier to remember ZarthaxX

ZarthaxX: NOOOOOOOOO

eulerscheZahl: almost 30 :scream:

ZarthaxX: right :P

ZarthaxX: CG is getting older

BlaiseEbuth: eulerscheZahl you're not so old ! :o I though so

ZarthaxX: :(

eulerscheZahl: how old did you see me BlaiseEbuth?

MSmits: I never remember my age, it's more efficient to calculate it. It's only 1 operation and 1 stored number

Default avatar.png TipuTare: whats input().split()

BlaiseEbuth: Zarthold !

ZarthaxX: nice one :P

Astrobytes: OldaxX

eulerscheZahl: input() : reads a line from stdin - codingame will give you that line

eulerscheZahl: split() : split at spaces

BlaiseEbuth: Don't knwo exactly eZ but... About 40... :sweat_smile:

eulerscheZahl: so "1 2 3".split() will become ["1", "2", "3"]

MSmits: when I let students try python on CG puzzles, they always get confused by the input split thingy

Astrobytes: lol really Blaise? :D

Default avatar.png TipuTare: ok ty

BlaiseEbuth: Yeah. He's so calm and wise... I really thought he was older ^^

Astrobytes: hehehe

eulerscheZahl: i'm just an impostor of a wise person

MSmits: which one?

MSmits: gandalf?

Astrobytes: :D

eulerscheZahl: that's lord of the rings, isn't it?

ZarthaxX: nice one too astro :P

MSmits: ok so not gandalf

eulerscheZahl: i'm too young to have seen that :P

BlaiseEbuth: :scream:

MSmits: Dumbledore?

eulerscheZahl: i know harry potter

MSmits: good

eulerscheZahl: but *spoiler alert* dumbledore died

Default avatar.png TipuTare: anime?

MSmits: mmh if you imitate a dead person it doesnt mean you have to die too

MSmits: thats not how that works

MSmits: "i'm gonna be just like Einstein". "Ok let me get a coffin"

eulerscheZahl: so i can admire van Gogh without cutting my ear off?

MSmits: you got it :P

eulerscheZahl: btw tomorrow is Kotlin heroes again on codeforces

MSmits: why does kotlin make you a hero?

MSmits: I did a course on kotlin once

eulerscheZahl: https://codeforces.com/blog/entry/92165

Astrobytes: Bet you felt heroic afterwards.

MSmits: did not feel like a hero. I feel like a wrote a bunch of one liners and forgot what they did in 5 minutes

eulerscheZahl: that's how i play those contests

eulerscheZahl: there are about 3 months between the rounds, i have to start from 0 every time

Default avatar.png TipuTare: what should i learn first guys?

Default avatar.png TipuTare: what language

eulerscheZahl: but intellij has a java->kotlin translator

BlaiseEbuth: brainfuck

MSmits: what do you want to use it for TipuTare?

MSmits: languages are made for specific purposes

Default avatar.png TipuTare: to become a software engineer i guess

MSmits: yeah that's not very specific :)

Default avatar.png TipuTare: then tell me what is phyton used for

BlaiseEbuth: Try java, and you gonna be an "expert"

BlaiseEbuth: Python is used for bad programs

MSmits: i saw a table where it said java engineers are the lowest paid

MSmits: and clojure the highest paid

BlaiseEbuth: Normal

AllYourTrees: python for bad programs??

eulerscheZahl: python is commonly used for machine learning, quick prototyping

Default avatar.png TipuTare: what about c++ ?

BlaiseEbuth: good one

MSmits: c++ is a bad place to start imho

eulerscheZahl: with Django and flask there are popular web frameworks for Python

MSmits: C# is nice, python is nice (for short programs)

Default avatar.png TipuTare: i already know it cause thats what we do at school

Default avatar.png TipuTare: what languages did u guys start off with?

MSmits: C#

BlaiseEbuth: C

eulerscheZahl: my first was Delphi

MSmits: ignoring visual basic, because everyone should

Astrobytes: BASIC

eulerscheZahl: but i wouldn't recommend delphi or basic

Uljahn: basic and asm

eulerscheZahl: actually it was Turbo Pascal for me

Default avatar.png TipuTare: and what u guys doing .. websites?

BlaiseEbuth: Salting chats

MSmits: I write bots for codingame mostly. and teaching material for my job

eulerscheZahl: mostly windows desktop applications at work

MSmits: for job, mostly python, for bots, mostly c++

Default avatar.png TipuTare: oh so should i start with phyton?

Astrobytes: Well you're already learning it, so learn it well

eulerscheZahl: there is no clear right or wrong answer to this question

eulerscheZahl: but stick with it once you chose a language until you feel comfortable with it

MSmits: python is nice for learning computational thinking, but it hides some of the complexity of how programs run. So you won't get a complete education at first. But this is ok

Default avatar.png TipuTare: and what website do u recommend i learn it?

Default avatar.png TipuTare: from what website*

MSmits: i did not learn coding from a website so not sure

MSmits: I mostly learned from modding space engineers. You can still do this btw, it's on steam :)

Astrobytes: this one is good once you're relatively comfortable with the basics of your language

Default avatar.png TipuTare: i used to do a course in real life but it was c++

Default avatar.png TipuTare: and only console

Default avatar.png TipuTare: https://hyperskill.org/

BlaiseEbuth: If you stay on python, learn on the python website.

Default avatar.png TipuTare: what about this one

Astrobytes: But you have to be prepared to use your search powers and read the language reference

Astrobytes: (when necessary, not from start to finish)

MSmits: AntiSquid, didnt you have some good websites to learn coding?

MSmits: I pinged him, so you might get an anwer at some point later today TipuTare :)

Default avatar.png TipuTare: ok ty

MSmits: there's a few guys on here that strongly recommend some site, but i forgot which one

MSmits: maybe coder camp or some such

MSmits: try google that

Astrobytes: As BlaiseEbuth said, if you stick with python, the python website has a lot of useful resources

MSmits: yeah but does it have a project too?

MSmits: you need to have some kind of goal

sprkrd: maybe I will get banned for this, but what about Coursera?

MSmits: or specific exercises

zsltg: the official website definitely https://www.python.org/ or maybe https://realpython.com/ ?

Astrobytes: You can search for that elsewhere MSmits

MSmits: thats true

Uljahn: https://diveintopython3.net/

MSmits: btw if TipuTare knows a bit of c++ and knows how loops and conditions work and such. Just google + python might be enough to solve some easy puzzles

Astrobytes: That's why I suggested here first if he's relatively comfortable with it

MSmits: yeah

Default avatar.png TipuTare: sprkrd dont risk getting banned just for me man

Uljahn: https://learnpythonthehardway.org/python3/

Astrobytes: Isn't edx better than coursera? (I'm not sure either way)

MSmits: i think the most important part of learning to code is not giving up. Motivation is everything here

Default avatar.png TipuTare: should i the courses here on codingame?

Astrobytes: Yeah. Be curious. Break stuff, fix stuff, make things.

eulerscheZahl: no one will get banned for recommending Coursera

Default avatar.png TipuTare: ok guys thanks

MSmits: except infinite bob

Astrobytes: InfiniBob gets banned for existing.

MSmits: yeah

Default avatar.png TipuTare: See ya

Default avatar.png TipuTare: byeee

eulerscheZahl: is that a user I missed?

MSmits: bye :)

eulerscheZahl: bye

MSmits: trust me, you won't miss him

Astrobytes: Bye TipuTare :)

Astrobytes: Yeah. InfiniBob has infinite accounts you know.

MSmits: he called Astrobytes a retard :shock:

eulerscheZahl: https://cg.spdns.eu/index.php?search=InfiniBob&title=Special%3ASearch&profile=all&fulltext=1

eulerscheZahl: "There were no results matching the query."

Astrobytes: it was earlier this afternoon.

eulerscheZahl: oh, then i have to wait until tomorrow

MSmits: Astrobytes did a deep removal

MSmits: all trace of infinite bob are gone

Astrobytes: And InfiniBob is not his username. Just one I have assigned to him.

MSmits: yeah because he said he had infinite accounts

sprkrd: eulerscheZahl Yeah I know, it was a joke because I know some people don't like learning from videos :joy:

MSmits: i really dislike learning anything with coding from a video

MSmits: I need to be able to copy paste stuff

MSmits: I dont like being stuck to the pace of a video also

Astrobytes: It was BobTschigerilllo, BobTschigerillo, BobTschigerilo, BobCigerilllo etc etc

eulerscheZahl: that bob said hi on #de yesterday

eulerscheZahl: oh, he came back today and i missed it :(

MSmits: oh so he was already mad because you banned him there

sprkrd: MSmits https://www.youtube.com/watch?v=VLZjd_Y1gJ8

sprkrd: https://www.youtube.com/watch?v=VLZjd_Y1gJ8

sprkrd: sorry

sprkrd: got something messed up in my clipboard

eulerscheZahl: ban

sprkrd: I was saying that I mostly dislike learning from videos too, but I enjoy some videos for the ideas rather than for the code

MSmits: ahh ok

MSmits: yeah some are nice

Astrobytes: I like some lectures and stuff too if I'm learning new things.

sprkrd: then I copied the link for an example video and deleted my original message :joy:

MSmits: this is the best tutorial site i know: https://catlikecoding.com/unity/tutorials/

eulerscheZahl: if i'm completely new to a topic, a video tutorial is fine for me

MSmits: all written

eulerscheZahl: if i have some understanding already, i get impatient, skip forward and miss the part i was looking for. wasting more time than when watching in normal speed

Astrobytes: Yeah, I'm guilty of that

sprkrd: that happens a lot with machine learning stuff, when they re-explain the same thing in every single video

MSmits: same

sprkrd: like what is overfitting, what is underfitting, etc etc

MSmits: yup. I also think 95% of people watching ML videos never get beyond the basics. People are interested in it, but when you get into the real stuff, it's hard work

sprkrd: because it starts with linear regression videos, and people's preconceived idea usually comes from the movies

sprkrd: "what's all these math things you're trying to teach me, i want sci-fi stuff!"

AllYourTrees: ML is interesting because the frameworks make things so "easy" now, but its still at the point where no one really understands why things work so you still need in depth knowledge to set hyperparameters effectively

Astrobytes: and other media

Astrobytes: (re. preconceived ideas)

Wontonimo: that is an overstatement about noone knowing why things work. Also, the idea that ML is a black box is very overstated

BlaiseEbuth: It's a blackbox... If you use a plugin that do everything

BlaiseEbuth: *lib

Wontonimo: so true

MSmits: it's more that we understand the parts and not the whole. a NN has a lot of emergent behavior. Like a biologer will understand what cells do, but it's hard to translate that to the workings of the entire organism

MSmits: the complexity just gets very high. it's supposed to. There's a reason we replace a game state evaluation with a neural network. It's exactly because the complexity of the game got too high for us to grasp all at once.

MSmits: that doesnt mean we don't "understand" neural networks

MSmits: it's that if we could split the inner workings into parts and understand them separately, we wouldn't need a neural network in the first place

MSmits: because we could have come up with the parts ourselves and stick them together (like a normal minimax eval)

MSmits: the lack of "understanding" in the traditional sense is by design

therealbeef: kind of like chaos theory

Wontonimo: There was a paper (I'll post it if I find it again) in which it compared the effectiveness of a completely random multi layer Dense NN with a final linear regression layer vs a traditional multi layer Dense NN that used backprop for training

Wontonimo: The conclusion was that with a wide enough random DNN + just linear regression you can achieve state-of-the-art (circa 2016 ish when the paper came out)

sprkrd: Wontonimo The Extreme Learning Machine's paper?

Wontonimo: and the followup statement that if the wide random DNN is just a random feature generator, then with enough random features then linear regression is enough

sprkrd: https://en.wikipedia.org/wiki/Extreme_learning_machine

sprkrd: I studied that method way back when i was doing the master's

sprkrd: There's quite a bit of controversy around it (assuming it's the one you mean)

Wontonimo: nice quick link. Thanks. That may be it

Wontonimo: I remember a key point being that it needs to be very wide to be effective

sprkrd: maybe it's not the one you meant, the paper is from before 2016 (although you said circa)

Wontonimo: 2016 ish

sprkrd: the controversy is due to a plagiarism matter,, not about its effectiveness

Wontonimo: oh, plagiarism. tisk tisk on them

sprkrd: and well, at the end of the day random weights for the first layer are an interesting idea and may give you ok results sometimes for the classical datasets, but i wouldn't bet in it taking us too far

sprkrd: the authors say they didn't plagiarize anything, and blah blah blah. I'd say it's probably a case in which they didn't have any idea of previous similar methods or didn't care enough to see the connection.

Wontonimo: let's say your hardware was such that you couldn't really update the weights, but you could have 100x as many (but random) than some other hardware.

Wontonimo: if you could make each of your layers 100x as wide, then you'll cover probably all the meaningful combinations of weights

Wontonimo: now take a look at photonic interference NNs, whereby the convolution is performed by interference pattern of light scattering from one printed filter to another

Wontonimo: anyway, i digress. my original point was with enough random features you can reduce the problem to a linear regression

sprkrd: Just to know that we're on the same page: are we talking about the same thing? A hidden layer connected with random weights to the input followed by an output layer with weights tuned via linear regression on the random features of the hidden layer?

Wontonimo: I'm expanding it to multiple layers

sprkrd: I don't know... I wouldn't bet on it working for segmenting 1024x768 images, for instance

Wontonimo: and since I can't find the original source, I can't say if multiple layers was in there.

sprkrd: In ELM I think they do shallow networks with just one hidden layer, but maybe you had in mind a different paper that expanded on this premise

Wontonimo: Here is a related paper (not the one I was thinking of which focused on DNN) that address your image question https://arxiv.org/pdf/1911.13299.pdf

Wontonimo: it states that a large random RESNET-50 image network has highly effective subnetworks in it that perform as well as RESNET-34

Wontonimo: now i'm on a quest to find that original paper ! :D

sprkrd: yeah... it's a bold claim, but the work seems highly exploratory

sprkrd: they achieve good results in CIFAR10, and say that the results are not so good on ImageNet (although they find a "promising trend")

sprkrd: the problem is that CIFAR10 is a kid's problem, so to speak, for classifying images into 10 categories

sprkrd: It's not segmentation really

sprkrd: anyway, the claim is interesting, and I don't mean to contradict it, but it seems to me that there's a long road ahead and I don't quite see it as a promising direction

jacek: wide enough layer, like n-tuple?

jacek: and why RoboStac is resubmiting oware bot? :scream:

RoboStac: testing caching nn lookups

jacek: oh my

RoboStac: gives much better performance later on, but slightly worse on early turns

jacek: the pair thing?

RoboStac: no, just having a hashtable for gamestate -> nn results

jacek: ahh this. its just TT for NN

RoboStac: yeah

RoboStac: makes a massive difference on C$

jacek: no transpositions in oware until the end

RoboStac: but I oware states don't transpose as often

RoboStac: they transpose a lot more than I was expecting though

jacek: more transpositions in breakthrough or checkers

Default avatar.png Myrky: Hello

Default avatar.png Myrky: A little question guys

Default avatar.png Myrky: If I try to do a puzzle in JS/TS there is a method named readline()

Default avatar.png Myrky: But I cannot run that method in a browser

Default avatar.png Myrky: As in, copy the code locally and try it on my IDE

jacek: in console?

jacek: readline() reads from input. its how it get data for puzzle. in C it would be i.e. scanf

RoboStac: yeah, I believe js doesn't have a synchronous one by default so CG add one to make the code simpler. I think there are implementations on the forum you can add to run locally

Default avatar.png Myrky: aha... oh well, then I will just code a solve() function in my IDE and use unit tests without invoving the console

jacek: or instead of x = readline() do x = "test case input"

Wontonimo: +1 for simplicity

sprkrd: you know... for these things I've always thought that Javascript is kind of a lousy language for anything not-web related

jacek: and web-related as well :v

BlaiseEbuth: :thumbsup:

sprkrd: jacek I didn't want to be harsh and come to that, but I'm glad you did :D

struct: robo destroyed me :(

RoboStac: sorry :(

struct: its fine :p

RoboStac: just need to find a way past smits now

struct: I dont understand why my bot struggles so mnuch vs you

struct: much*

Default avatar.png Myrky: @jacek well, I could do that, but then I wouldn`t have a suite of unit tests for easy testing, much faster than on an IDE

Astrobytes: AllYourTrees: Liking the 'cold war' we have going on in BT :D

AllYourTrees: haha yeah slowly but surely

AllYourTrees: you are almost in the 20s nice!

Astrobytes: Indeed. I'm trying to squeeze as much as I can before I implement some other bits and pieces.

AllYourTrees: nice, whats your approach?

Astrobytes: my usual alphabeta

AllYourTrees: oooooh nice, did you come up with a custom eval fn?

Astrobytes: Yep. That's what I'm tweaking

AllYourTrees: cool!!

Astrobytes: Once I fixed that silly bug the other day it gave me a chance to play around a bit.

AllYourTrees: what was the bug??

Astrobytes: I can't remember lol, something in the movegen, was doing some invalid moves

struct: still need to start bt

AllYourTrees: ohhh ya i remember now

struct: my goal is to beat robo

Astrobytes: It was a really easy fix too

struct: :)

Astrobytes: Where is he wrecking you struct? C4 I presume?

struct: yes

struct: but im done with c4

struct: im not gonna waste time on it

Astrobytes: "I'm done with <insert multi>" yeah, yeah :D

struct: its not healthy to stare at leaderboard

Astrobytes: That is true.

struct: at least I still have the rank 1 screenshot :D

Astrobytes: Stare at the code instead. Usually more productive

Astrobytes: hehehe

Marchete: :eyes::bar_chart:

Astrobytes: hey Marchete, your Oware AZ tech.io article is excellent, thanks

Marchete: and at least I have 1 peer review, jolindie_n was able to reach top 5 with it

struct: After I finish reading the book ill read your article

struct: otherwise Ill probably wont understand it

Marchete: My article is TLDR

Astrobytes: oh wow, so he did

Astrobytes: struct, actually I'd recommend it now

Marchete: no complex formulas or thoerical stuff

Astrobytes: Well, it's light on the matter, but explains the processes well

Marchete: :thumbsup:

Marchete: glad you liked

struct: but i still dont understand how NNs work

struct: so i might need to read the book fits

struct: first*

Marchete: NN is a function approximation to me

Astrobytes: ^

Marchete: at least how do I use it

jacek: isnt it what is it

jacek: NN for me is extended eval with much more tweakable params to tune

jacek: while in classical eval you could tune by hand or semi automatic, in NN you need (almost?) exclusively use gradient descent based on data

Marchete: yea

struct: but I still dont understand the layers part well

jacek: and meh, when you two fight with me in bt, i lose points :c

Marchete: like a massive coeff paramtuning

Astrobytes: still sounds like function approximation :D

AllYourTrees: NN is just matrix multiplications

struct: anyways my eta for NN is 2025 so plenty of time

Astrobytes: 2025 NN or delete eh

AllYourTrees: M A C H I N E L E A R N I N G

Marchete: 2025 will be anything else

Marchete: 2021 is NN year

RoboStac: surely he'll have deleted for some other reason by then?

Astrobytes: Possibly robo :D

struct: :(

Marchete: are you improving your NN even more, RoboStac?

RoboStac: maybe

RoboStac: I made it worse first

RoboStac: but I think it's now at least as good

AllYourTrees: Marchete have you tried your implementation on C4?

Marchete: that'd be my next multi

Marchete: but as I have a baseline

Marchete: I want to explore all ideas before moving to C4

AllYourTrees: gotcha

struct: if you need help with the sim feel free to ask

Wontonimo: (raises hand)

struct: I might even share with you how i update the moves ;)

AllYourTrees: :O

Marchete: I was thinking about reusing either pons's code, or fhourstones88, to be true

Marchete: update is adding a bit, isn't it?

Marchete: but I need to reuse NN between states, maybe

AllYourTrees: you need a small NNUE

Marchete: it seems updateable at first layer

Marchete: yes

jacek: both you and jolindien use C# :thinking:

struct: its a wrapper isnt it?

Marchete: he posted a comment on tech.io

Marchete: so I assume he used it

RoboStac: yeah, he's said in chat he used it

AllYourTrees: i love it when i introduce a bug and get 3 million rollouts

jacek: i think struct meant if c# was wrapper for c++

struct: maybe I have the same bug AllYourTrees

jacek: c# being 3rd in leaderboard, noice

Marchete: it's a wrapper, yes

AllYourTrees: lol your magical code is a mystery to me struct

Marchete: https://github.com/marchete/CGZero/blob/master/src/ENCODER16k.cs

struct: if you think on how you can update moves without clearing and setting a bit it makes sense

AllYourTrees: ohhh

jacek: by... xoring!

Marchete: board |= move?

AllYourTrees: i think i just added that to my BT bot actually

AllYourTrees: board has 2 bits set and xor like jacek said?

AllYourTrees: well idk if you need two for c4

struct: no

jacek: dunno i never saw his code

struct: also i dont need ctz to get the bitindex this way

struct: i guess ill just share it

struct: since im done with c4

AllYourTrees: will you regret this tomorrow lol

Marchete: http://cgstats.magusgeek.com/app/multi-oware-abapa/RoboStac

struct: ok then maybe i wont

struct: :p

Marchete: seems better...

jacek: :F

RoboStac: it should be slightly better, it's the same but generally faster as far as I can tell (first turn gets less nodes created as it has the least transposition, but after that it gets better)

jacek: maybe it handles loppy endgames better

RoboStac: yeah, the endgame stats look much better

struct: your c4 also seems better now

struct: at least if i make my ai play worse I no longer win

RoboStac: c4 I'm actually still training

struct: :scream:

RoboStac: oware I'm just porting improvements from c4

struct: so the c4 is the same ai?

RoboStac: I had a slow nncache on C4 before as when I was trying convolution it helped a lot, but I made it much better and it's now fast enough to be useful on oware too

AllYourTrees: whats your nn structure robo?

RoboStac: but I did forget that gamestates aren't unique per player on oware

Astrobytes: Oh good job on Oware robo

RoboStac: which is why it looked to help so much but made it play worse originally

RoboStac: AllYourTrees on c4 or oware?

AllYourTrees: c4!

jacek: :bomb:

RoboStac: 63x3 inputs -> 256 -> 9/1 outputs

jacek: one hots are hot topic now

RoboStac: I'd always have one hotted c4

Marchete: 9/1 means you get 10 and then you do something to split, or there are 2 outputs?

Smelty: yes

AllYourTrees: interesting ty!

Marchete: I've tried 9+1 and "separate" in loss function

Marchete: didn't get any better

Marchete: well, 6+1

RoboStac: yeah, 10 outputs from the same dense layer with softmax on 0-8 and tanh on 9

darkhorse64: how do you choose size and number of hidden layers ? Guess work ? Voodoo ?

Marchete: I was unable to do it

Marchete: voodoo mainly

RoboStac: in training they're separate networks ( 256 -> 1 and 256 -> 9 ), I just combine the weights afterwards

Marchete: ahhh

RoboStac: darkhorse64 - yeah, pretty much.

AllYourTrees: 256 is divisble by 4 so amenable to simd at least

AllYourTrees: #math

RoboStac: yeah, everything has to be divisible by 8

RoboStac: or it gets messy

Marchete: AVX2 -> 8 floats

AllYourTrees: :facepalm:

AllYourTrees: yeah i *totally* knew that

AllYourTrees: >.>

RoboStac: my 10 output layer is technically doing 16 values

RoboStac: I just pretend they're not there

AllYourTrees: oh seriously? is that that much of a speed up?

Marchete: sometimes up to 6x

jacek: impossibru

Marchete: you can code "normally" and sometimes the compiler optimizes it

BlaiseEbuth: Nani?!

AllYourTrees: holy cow

jacek: you killed the chat eh

AllYourTrees: rip indeed

Marchete: :skull_crossbones:

Astrobytes: I just wasn't in chat, nothing to do with AllYourConversations here

AllYourTrees: AllYourWords

Astrobytes: :D

MSmits: RoboStac if your NN caching only helps in late game. Just generate an endgame book

MSmits: takes 500 ms to get a 9 seed one

Illedan: Where is the fun in that?

MSmits: it's fun for me :P

Illedan: :D

RoboStac: caching pretty much helps all the time, it just gets better endgame

MSmits: ahh ok

RoboStac: plus if I use 500ms then I definitely lose a lot of turn 1 sims

RoboStac: but yeah, it'd probably be a better idea

RoboStac: though less useful for other games

MSmits: for bandas it's awesome

MSmits: better than oware

MSmits: ah but nvm, it's hardcoded in bandas

MSmits: takes too long to generate

RoboStac: I've got a lot of spare bandas codespace

MSmits: you need your codesize

MSmits: oh

MSmits: then its possible, i need only like 25 kb

MSmits: for a size 12 endgame book

MSmits: (3x4, 4x3 etc.)

RoboStac: it's seems to be a game where the eval doesn't need a massive network and performance matters

MSmits: i wouldnt know

MSmits: but i get now why the caching helps

MSmits: it doesnt help for me in any games, because my evals are fast

MSmits: but if you are bottlenecking hard on eval, it does make sense

Marchete: caching is probably game agnostic too

Marchete: so less time for implementing it

RoboStac: yeah, my oware one should be (just have to write a == and a hash function for each game)

RoboStac: my c4 one wasn't because I forgot the turn / player are encoded in the gamestate there

Marchete: but your nncache is simply a hash check?

MSmits: what do you mean encoded in the gamestate?

RoboStac: as in you can never have the same state with different players to move

MSmits: thats true i guess

RoboStac: in oware you can

MSmits: after turn 1

MSmits: (when steal has happened or not)

MSmits: yeah you can, except turn 1, which is only ever one side

MSmits: also if a side doesnt have an empty pit, it cant be p2

MSmits: i mean it cant be the player not to move

MSmits: actually around 20% or so "possible" states in oware arent possible because neither player has empty pits

MSmits: i tried to get this fact into my endgame book to make it more compact, but it was too hard to turn it into an index function

MSmits: so i just have dead spots in the book that are never used. Pretty common to endgame books

AllYourTrees: Marchete do you have new MCTS per turn, or MCTS per game in your CGzero?

MSmits: do you mean if he reuses tree?

MSmits: also are you asking during training or in the actual CG games?

AllYourTrees: yeah

AllYourTrees: training

MSmits: ahh ok

MSmits: oh wait, do you mean a single tree for both players?

MSmits: like, a single process playing itself with 1 tree?

MSmits: I do this in meta mcts

AllYourTrees: i guess theres a couple ways it could be. 1. new MCTS instance per turn 2. MCTS instace per player that is reused on each turn 3. one MCTS instance for both players that is reused on each turn

MSmits: i see no reason to use 1 over 2, unless you like the simplicity of it

MSmits: it shouldnt matter that much

MSmits: 3 is a different thing though, it's more efficient, but it could maybe have side effects

AllYourTrees: :shrug: 1. cause thats what the pseudocode for AZ did

Marchete: https://github.com/marchete/CGZero/blob/master/src/CGZero.cpp#L1865

Marchete: I changed it to use it in selfplay too

Marchete: too complicated

Marchete: maybe I'd go the simple way

Marchete: big array and when it's almost full, reset it

MSmits: do you reuse?

Marchete: yes

MSmits: but do both players use the same tree in training?

Marchete: no

MSmits: thats a different way to reuse

MSmits: if it's selfplay, it might not matter

Marchete: selfplay players aren't the same sometimes

MSmits: it does matter if you are pitting different versions

MSmits: ah right

AllYourTrees: i have same version so it wouldn't matter for me i guess

MSmits: It always worked ok for me, to do it this way

MSmits: it saves me from having two processes both using a huge chunk of memory and waiting on eachother

AllYourTrees: i can't think if there'd be any bad side effects? like if you have a single tree then both players can look further, which means policy is more accurate?

AllYourTrees: search policy*

MSmits: yeah I cant see any either, but maybe there are

RoboStac: there some exploration differences as the AZ noise is only added to the root

Marchete: that's true

AllYourTrees: hmmm ya

MSmits: what would that do though?

RoboStac: but it does work fine

Marchete: add noisy noise

AllYourTrees: previous searches may influence current search maybe?

MSmits: thats always the case with reuse

MSmits: the reuse is just stronger

RoboStac: if you have too many mcts iterations it can cause the noise to be entirely irrelevant because the nodes have so many visits

Marchete: it's true, I forgot the dirichlet noise...

MSmits: ahh right, but thats a problem with reuse in general

RoboStac: yeah

MSmits: you want to control the number of iterations, then you cant reuse

MSmits: or i guess, at least you have to stop at 200 or whatever

MSmits: so if it already has 100 visits, you stop at another 100 that urn

MSmits: turn

RoboStac: yeah, theres some debate about whether it should do x extra iterations or stop once the root has x visits

AllYourTrees: robo have a link? would be curious to read further

MSmits: x visits makes more sense to me

RoboStac: https://github.com/leela-zero/leela-zero/issues/1156

MSmits: it should not matter in which turn the visits were obtained

MSmits: this doesnt affect the tree

AllYourTrees: ty

RoboStac: except we're back to the noise being on the root so you are lowering exploration

MSmits: hmm ok

MSmits: well then thats just another thing to experiment with :)

RoboStac: yep

Marchete: I added the tree reuse on selfplay

Marchete: but I'm in doubt now

Marchete: I think I may add some noise on the function too

Marchete: tree reuse function*

MSmits: I think the benefit or damage to your bot by making one choice or other in this is too small to properly research

Marchete: only game diversity

MSmits: some things just only matter a little

Marchete: so many little things

MSmits: yeah

Marchete: and don't start with the damn cpuct

AllYourTrees: lol

Marchete: a constant that isn't a constant

AllYourTrees: ikr, i still have mine as a constant

Marchete: based of on smth?

Marchete: or just guessed?

AllYourTrees: the az c4 article

MSmits: well... I don't think you have to do everything the same as the actual azero algorithm

MSmits: maybe other things work better in CG constraints

Marchete: I was using leela chess zero as some reference too

RoboStac: yeah, the leela calculation is much more complicated

Marchete: i've seen documents with cpuct 3, 4, 2,1, 0.5

Marchete: I mean any possible number

RoboStac: yeah, not helped by people having different ranges for the output value

Marchete: yes, the 0..1 range in AZ

RoboStac: but thats no different to standard mcts articles I guess

Marchete: true

**dbdr celebrates getting back the #1

Marchete: congrats

Marchete: where?

RoboStac: asteroids?

Astrobytes: oh nice

dbdr: https://planetoids21.kattis.com/standings

Marchete: CoC?

dbdr: yeah

RoboStac: nice

Astrobytes: oh you're also 1st on CG now too, I have been away too long indeed

Marchete: yes, good job

dbdr: I lost the lead by 50 points, now I took a lead of 4K. still too much time left

Astrobytes: Much more significant lead than earlier on asteroids

Marchete: how's the planetoid game?

MSmits: huh wow dbdr, how did you get 1st on CG

MSmits: i didn't know you were that close

dbdr: probably the smart thing now would be to sleep :)

Astrobytes: How long you got tomorrow?

dbdr: until 9pm CEST

Astrobytes: (in terms of your available time I mean)

dbdr: planetoid is underspecified, so it's partly reverse. and usual optim

dbdr: I'll make time :)

Marchete: you played with advantage on this, a seasoned optim+multi player

Marchete: ;)

Astrobytes: hehehe, in that case, sleep sounds good but you know you're gonna try a few things beforehand :D

dbdr: yeah, but I guess i'm not the only one. not sure about that crowd

dbdr: NinjaDoggy is there

MSmits: don't let him ninja your swag bag

Astrobytes: I'd be expecting late submits

dbdr: I just did try a few thing, and eventually one was fruitful :)

Astrobytes: In that case then sleep while the going is good :D

dbdr: the seeds are secret though, so late submits might be risky

RoboStac: is there any point to late submits as you can't see what others are doing / have no idea what the validators are ?

Astrobytes: Interesting

Astrobytes: I didn't realise that, my bad

dbdr: I guess only a psychological point

dbdr: let others think they are safe

MSmits: and then nab the swag bag

dbdr: you're obsessed about the sawg :D

MSmits: I know :P

dbdr: I'm more interested about going to Moscow ;)

Astrobytes: Smits is a burglar by night and teacher by day

Marchete: I hope you win dbdr, you are the master on optims

MSmits: yup

Astrobytes: Yeah, hold on to that lead man

dbdr: thanks!

MSmits: oh thanks again dbdr

MSmits: 28th -26th from that bug you spotted

dbdr: calm?

MSmits: yea

dbdr: cool!

MSmits: i mean from the cp

MSmits: it was the C# update

MSmits: no more mono trick

Marchete: no mono trick for codegolf

MSmits: no it was that think where you restarted main with some arg

Marchete: or what trick do you mean?

MSmits: or something

Marchete: ahh

MSmits: that crashed my bot and i was 167th legend

MSmits: now 37th or so

Marchete: I think they added release mode

MSmits: yeah so i hear. I didnt realize what that would do to my bot

MSmits: i dont much code C# these days, just some local windows forms stuff

struct: my c4 bot is dead :(

struct: time to move on

BlaiseEbuth: All dead. All dead. All the dreams we had...

Marchete: RIP

Astrobytes: Rust In Peace

ja_fica: jacek, you there?

ja_fica: or robostac

RoboStac: hi

ja_fica: Hi, you use NN in C4?

RoboStac: yes

ja_fica: You train it with regular DRL or data generated from MCTS

ja_fica: Im trying to do a c++ convoluiton neural network, but Im having trouble to generate good data to fit in the first place

RoboStac: it's alphazero based, so does self play with a fixed number of mcts runs per turn and trains a value against the gameresult / and a policy against the vistis

RoboStac: I also gave up on convolution as I wasn't getting good results

ja_fica: you output the action or the evaluation ou both?

ja_fica: *or

ja_fica: Thats odd, conv patterns seems a good fit for C4

RoboStac: https://adspassets.blob.core.windows.net/website/content/alpha_go_zero_cheat_sheet.png

RoboStac: conv was fine except the performance is so low that it keeps falling into traps

RoboStac: it's a good fit for the connecting 4 part but struggles with the endgame movecount part i think

RoboStac: as a pattern that gives you an easy connect 4 can be entirely broken by one extra piece on the opposite side of the board changing where moves are forced

ja_fica: You train it in c++?

RoboStac: the actual training is python based, but generating training data is c++

RoboStac: https://tech.io/playgrounds/58137/alphazero-like-implementation-for-oware-abapa-game-codingame/alphazero-like-implementation-for-oware-abapa-game <-- article by marchete who has a similar setup

ja_fica: thanks

ja_fica: you use the prediction multiple times or just 1 per turn?

RoboStac: multiple times - think of it as mcts but the rollout is replaced with a NN evaluation

Default avatar.png Hudie: :expressionless:

ja_fica: I'm going to try it

ja_fica: I have already succesefully created the matrix multiplication with bias and relu

ja_fica: in c++, just not the training, thats a little too complicated for me, specially with otpimizers

ja_fica: With NN it seems too costly, how many rollouts can you do?

ja_fica: It defnitly works doe

RoboStac: I get about 20-25k nn evaluations per turn. It's costly but as it guides the tree search / is a more accurate value it ends up working

RoboStac: my conv network was less than 5k evaluations

RoboStac: which I think was the main problem

Wontonimo: ja_fica are you going to use a lib like pytorch or tensorflow for training?

Wontonimo: wow, how are you possibly doing C4 without conv? That's amazing

ja_fica: i was going to use keras

Wontonimo: that must take an insane number of training steps

ja_fica: 126 inputs is enought

ja_fica: yes conv look like faster

ja_fica: ate least in training

ja_fica: *at

RoboStac: it's up to 800k games played and still seems to be improving, not sure if that counts as insane or not :)

Wontonimo: and do you save those games or just generate a new one every time?

RoboStac: it does a batch of 4000 games, then trains on the data. Keeps a history of the last 10 million samples (game turns) to train from

Wontonimo: Here is a training schedule called "The biggest loser". I'd be super interested in how it improves / hinders your NN

Wontonimo: the idea is to only train on the worst 10% (or 20% whatever) of a batch. so if your training batch is 1000, then check them all for error, and only actually use the worst 100 for training

Wontonimo: How hard would it be for you to try that out RoboStac?

Wontonimo: The huge benefit this algo has is that from my experience it helps train the network much faster, like 2 to 10 times faster,

Wontonimo: and it catches outlier cases a lot better, and doesn't spend most of it's training on things it already knows well

RoboStac: depends if I need to find the worst 10% of the whole history or just the 10% of the samples to train on (I take many sets of 2048 samples from my history for training)

Wontonimo: just from the sample.

Wontonimo: do you use tensorflow?

RoboStac: yeah

Wontonimo: http://chat.codingame.com/pastebin/56e1f785-8c0a-4d3c-a637-93fb2fe9ad20

Wontonimo: where k is the number of samples. If your batch is 2048, then a k of 512 would be 1/4th

Wontonimo: no other change to your architecture is needed

RoboStac: I'll have a play with it when I get bored of this current C4 training

RoboStac: need to get the final 0.02 trueskill to get past smits

RoboStac: :)

Wontonimo: if you do, Please let me know how it goes. Congrats on getting so so very close !

RoboStac: I'm 99% sure I could just resubmit and be top, but going to leave it running overnight to see if it improves further

Wontonimo: i suspect he is beating you on those edge case, which I think worst_k loss function will help you with

Wontonimo: *finish him* lol

Wontonimo: I don't know what your loss function is, but if it isn't categorical_crossentropy, then just replace the categorical_crossentropy part of worst_k

RoboStac: yeah, it's a bit more complicated as it's two outputs (value/policy) but shouldn't be a difficult change

Wontonimo: if you are using a dual head network, you can specify a loss function per head like so

Wontonimo: model.compile(optimizer="adam",

 loss=[customLossA, customLossB],
 metrics=[['mse'], ['accuracy']]   

Wontonimo: if not, then it isn't as straight forward

Hudie: https://www.codingame.com/clashofcode/clash/18386440f701e6505ee26c193f42b3f6c7f5de3

Hudie: come on baby

Wontonimo: nice job at getting to First RoboStac

Wontonimo: that is no small lead

Wontonimo: ja_fica, what's your architecture for C4 ? You are climbing

ja_fica: very smart rollouts

ja_fica: each rollouts average +32 plays

ja_fica: I choose to back 1 before in case of a play that is a lose

ja_fica: Also AVX helps

ja_fica: helps arround 55% more visits

ja_fica: Ofc, if the rollouts are too smart, I will have too low rollouts, so I set as an hyperparmeter how much to go back

ja_fica: I choose 3 for the current sumbition

struct: I pushed robo

struct: Now I cant lose many points vs him

struct: :D

ja_fica: good thinking :)

struct: Wontonimo if you want to do connect 4

struct: feel free to ask for help

struct: ok found a better version

struct: now im fully done with c4

struct: time to do breathrough

Wontonimo: Thanks struct, I appreciate the offer and will probably take you up on it later

struct: np

struct: im not the rank 1 bot but I can still give a few tips

struct: but grats to robo for making a great bot

Wontonimo: your bot is VERY impressive

struct: thanks

Wontonimo: ja_fica what do you mean "I choose to back 1 before" ?

ja_fica: I have a function that predicts the places where I can put a piece without directly losing

ja_fica: so I test my possibilities to see if any the current move leads to it

ja_fica: If it does, then the enemy can win

Wontonimo: I've heard a couple people saying that smart rollouts work well for this, which is very different than UTTT

ja_fica: so I roll back a play

ja_fica: yes it is

ja_fica: UTTT probably benifits a way more from neural networks

Wontonimo: are you almost doing a minimax for every move?

Wontonimo: when doing 3 for example

ja_fica: MCTS solver is based in minimax

ja_fica: It sure backs my algorithm

ja_fica: solver > non-solver

struct: solver seems like always an improvement

struct: it was on uttt

Wontonimo: the question was more about your rollout, and the rollback of 1 or 3.

struct: I dont rollback at all, he does

ja_fica: rollout 3

ja_fica: *rollback 3

ja_fica: Its a tradeoff, the smarter the rollouts, the less I have

Wontonimo: for sure

struct: early game seems important

Wontonimo: late game too lol

ja_fica: this smart rollouts help in the first moves

struct: dont think so

struct: sometimes I solve 30+ moves before game is over

ja_fica: solver helps mid-game

Wontonimo: wow, yeah makes sense

struct: this happens if most of the moves are forced moves

struct: it doesnt happen everytime

struct: sometimes is hard to solve

Wontonimo: it's game over once MTCS solver finds the move

struct: yeap

struct: at least now i have someone to put up a fight against me on contest

struct: :D

struct: from my country I mean

ja_fica: yes, I will be there :)

Wontonimo: ᕦ(ຈل͜ຈ)ᕤ

ja_fica: I didn't know how cool contests were before

ja_fica: Now I am CG addicted

struct: I wonder if next will also be a board game

struct: I hope its something fresh

Wontonimo: cheers to that

struct: Is not that I dislike board games, but there is so much that can be done

struct: ok i kinda dislike board games, but not all of them

ja_fica: board game are way too deterministic

ja_fica: ate least the turn-based full-state

struct: well that happens more on games that always have same starting state

struct: This is why when I ported amazons

Wontonimo: i see you've been on the platform for a few years ja_fica

struct: I made the positions random

struct: https://www.codingame.com/multiplayer/bot-programming/amazons/leaderboard

struct: I still have to make a bot for it

struct: if you check the replays you will see that the positions are random

ja_fica: When I started CG I just played Clashs, I did get to rank 6

Wontonimo: haha, make a multi but don't make a bot

struct: But with a few conditions

struct: Wontonimo I ported 4 games

struct: I dont have a bot for any of them

ja_fica: sounds interesting

struct: jacek has a bot that beats his current bot by 90%+ win rate

Wontonimo: I was thinking it would be a good candidate for CNN eval

ja_fica: C4 looks perfect for CNN eval

ja_fica: the problem is the slow prediction phase

struct: The problem that the random has is that I dont know if positions are balanced

struct: but 2 games are played from each position so it makes it fair

ja_fica: as every thing random, with enough games it should go upwards the balance

struct: you play one game as white and one as red

struct: black*

Default avatar.png cognivore: is there a filter to never play shortest code challenges? they yield bad habits and are unwinnable in rust or any other language where tthere are a lot of ceremonies.

struct: no cognivore, its only available on private clashes

Wontonimo: but we just don't get that many games ( ͡ಠ ʖ̯ ͡ಠ)

struct: What do you mean Wontonimo?

Default avatar.png cognivore: well, I guess I'll play everything as a speed clash haha and skip shortest code ones

struct: cognivore submit always 1 char on shortest

struct: you wont lose as many points

Default avatar.png cognivore: @struct, I don't understand

struct: if people get 0%

Default avatar.png cognivore: There's ELO? :thinking:

struct: you will place above tem

struct: them*

struct: yes

struct: But dont care much about it

Default avatar.png cognivore: Gah, I was so happy that I started winning :D

Default avatar.png cognivore: But I guess it just placed me into the abyss

struct: its not really elo

struct: you get matched vs any player

Wontonimo: i like that Amazons is 2 games in a row to make it fair. The alternative of just running lots of games to make up for the randomness with the 2 game mirror is just out of our hands and not good cost/benefit anyway

struct: its not elo based matchmaking

struct: true, i stole it from re curse chess

Wontonimo: oh man, the 1 char submit is so evil. i've never done that

ja_fica: get 100% on shortest mode

ja_fica: its still training

struct: that also works

ja_fica: And many shorstest are not finished

struct: but if he just wants to skip it he should submit 1 char

ja_fica: just playit like a fastest

ja_fica: yes

Wontonimo: good night, i'm falling asleep on the keyboard

struct: gn wontonimo