Chat:World/2020-12-17

From CG community
Jump to navigation Jump to search

mzbear: wtf is with the turn count in code a la mode ... 600 turns total with 50ms each, that's maximum of 30 seconds per match :O

eulerscheZahl: which is the max duration that CG allows

eulerscheZahl: on RAIC i saw 12min per match

mzbear: oh dear

mzbear: meanwhile, that bitfield thing you helped me with yesterday, ... https://paste.ofcode.org/AQNWhUuF8bzJSuMpCnYLtW

mzbear: i'm having a feeling there's an even better way to do this, but it eludes me

mzbear: ... but i already finished that puzzle, so perhaps i shouldn't bother with it

mzbear: oh, right, i could just make two loops and store the results in an array .. do upper triangle and lower triangle separately

mzbear: every once in a while i need to split a string in standard c++ code, and it makes me cry. c++20 seems to finally have string splitting out of the box via the ranges library

Default avatar.png Robin_Hood: hello

Default avatar.png Robin_Hood: hii

MSmits: makes me cry too mzbear

MSmits: :cry:

MSmits: it's what kept me from using c++ in contests for a while

MSmits: well one of the reasons

mzbear: didn't test, but apparently this is valid c++20: for (auto token : str | std::views::split(' ')) { /* it's christmas time */ }

mzbear: so you can basically make pipes that filter and transform things

MSmits: hmm ok

MSmits: i just want it to split my openingbook

MSmits: so far i used some unreadable code for it i found somewhere using google

MSmits: it's crazy how hard it is to just split a string into characters

mzbear: using stringstreams and std::getline is kinda okayish, but annoying nevertheless

MSmits: I probably would have much preferred rust or some other modern fast language

MSmits: but i already learned c++ and dont fancy learning another

mzbear: rust is a great language, but super annoying for prototyping anything

Default avatar.png Wanwws: i can't understand coding

mzbear: it forces you to be quite specific about lifetimes and ownership in a way that clashes with how i've learned to code

Default avatar.png Wanwws: help me please

Default avatar.png Wanwws: mime type code

mzbear: every time i've ported any c++ code of mine into rust, i've found hidden bugs in the code because they're compilation errors in rust...

MSmits: you take this one mzbear, I need to finish my class :P

mzbear: wanwws, what's the issue?

Uljahn: 99% of newbs: my code fails because of bugged testcases

SupSon: Is there some doc on how to run a local tournament with local instances for a game?

mzbear: supson, I still haven't gotten to set up any local games myself, but i found this when i was looking into it earlier: https://github.com/dreignier/cg-brutaltester

SupSon: grea thanks that's what I was looking for

jacek: good morning

Default avatar.png YusufEmad04: print("Hello World")

Default avatar.png coldcodehah: Console.WriteLine("Hello World");

Proprogramer: System.out.println("Hello");

Default avatar.png coldcodehah: Good Good afternoon

Proprogramer: morning for me

Default avatar.png coldcodehah: hah

kurtesy: Good Night

Default avatar.png coldcodehah: where night

Default avatar.png coldcodehah: Japan?

MadKnight: not in philadelphia for sure

Default avatar.png coldcodehah: Coding 《Shadows of the Knight - Episode 1》

MadKnight: okay

MadKnight: i like your 《

MadKnight: AutomatonNN u gotta learn to use those

AutomatonNN: first the contest comes out

Default avatar.png coldcodehah: 《Shadows of the Knight - Episode 1》 complete

MadKnight: WOW

MadKnight: jj

MadKnight: oh wait i mean

MadKnight: гг

MadKnight: Automaton2000 u gotta be proud

Automaton2000: how're u gonna do the same for the rest of the game

MadKnight: u can't keep doing the same thing Automaton2000 it just gets old at some point

Automaton2000: guess i should do that

MadKnight: u can't keep talking to Automaton2000 forever Automaton2000 it just gets old at some point

Automaton2000: seems like a fun game

MadKnight: hmm u right Automaton2000 it will never get old

Automaton2000: should have thought of that as well

Default avatar.png coldcodehah: Coding <Shadows of the Knight - Episode 2>

MadKnight: are u a bot

Default avatar.png coldcodehah: error Timeout

Default avatar.png coldcodehah: :joy:

MadKnight: wur

MadKnight: wut

MadKnight: what is that supposed to mean

Default avatar.png coldcodehah: not bot

MadKnight: then why are u saying those things

Default avatar.png coldcodehah: practice typing

MadKnight: coding << ctrlv >> what a nice practice, Automaton2000!

Automaton2000: not as much as you want to compare the two

Default avatar.png coldcodehah: u are right

MadKnight: aren't u already practicing typing in coding ?

MadKnight: Kirbiby

MadKnight: no #fr Kirbiby

MadKnight: are u also here Kirbiby ?

Kirbiby: I'm everywhere

MadKnight: oh cool so i can ping u anywhere

MadKnight: anyway

MadKnight: what are u doing Kirbiby that u talked about on #fr ?

Kirbiby: AoC17

MadKnight: what is that

Kirbiby: https://adventofcode.com/2020/

MadKnight: oh cool

MadKnight: so what's your strat ?

MadKnight: are u doing it in c++ Kirbiby ?

Kirbiby: it depends the day

Kirbiby: it depends on the day

MadKnight: what is today ?

MadKnight: what is it today ?

Kirbiby: clik on it and you see

Kirbiby: today the input is not a pain to parse so it's C++ day

MadKnight: oh it's a weird random "thing"

MadKnight: what do u mean by pain to parse ?

MadKnight: what is a pain to parse only in c++ ?

MadKnight: Kirbiby

MadKnight: stop disappearing in #fr

Kirbiby: comma separated string for instance

MadKnight: wut

MadKnight: u can just split that

MadKnight: u can just getline(std, separator)

MadKnight: did u not know getline got an external argument for that ?

MadKnight: extra i mean

MadKnight: not external

Kirbiby: not it's shitty

MadKnight: u can just do getline(cin, ',')

MadKnight: just make a function for that

MadKnight: and just ctrlc ctrlv this function into every single project

MadKnight: so that u can use it like it's always there

Kirbiby: in ruby I do $<.map{|k|k.split(","}.map(&:to_i)} and I'm done

MadKnight: just make a function for that

MadKnight: cmon

MadKnight: it'll be readintarray() in both c++ and ruby

MadKnight: c++ is so painful cuz everyone tries to optimize it as much as possible to win any amounts of ticks

MadKnight: just make a wrapper for stuff and just ctrlc ctrlv the entire thing at once

Kirbiby: don't worry, you don't have to convince me

MadKnight: no i have to

MadKnight: i've been paid

Kirbiby: I love C++, but sometimes I just want to parse the input in 20 characters

MadKnight: by Automaton2000 ofc

Automaton2000: you can use it, but it doesn't seem to be a good idea in the long term

MadKnight: no Automaton2000 that is not the time to respond

Automaton2000: when you try to use the chat for the first turn of the game

MadKnight: no Automaton2000 i said quiet

Automaton2000: how many players pass to legend

MadKnight: bad Automaton2000

Automaton2000: not sure if i can figure it out

MadKnight: Kirbiby i just have an #include that gets all my stuff into the project

MadKnight: so i can parse the inputs in 20 chars in c++ too

Kirbiby: yeah, I don't

MadKnight: just fix it once Kirbiby and then u can do all the stuff in c++ painlessly

MadKnight: that deserves a big cmon

MadKnight: that will help u go further

MadKnight: u will be even able to do big things like i did - for exactly, an absolutely universal BFS

MadKnight: so i can now do pathfinding the optimal way in any project

MadKnight: and it doesn't look terrible

MadKnight: and is not a pain

MadKnight: Kirbiby

Kirbiby: Yes, if I was not so lazy

MadKnight: i can just lead u

MadKnight: i know how it's done it will only take like 5min

MadKnight: let's do it kirb

MadKnight: Kirbiby

MadKnight: *i can just lead u through it

MadKnight: u won't have to think hard Kirbiby

Default avatar.png Maxim251: Its posible to include file in game from disk?

Default avatar.png Hussein4K: guys

Default avatar.png Hussein4K: will i ever get better?

Default avatar.png AI_says_hi: Sure :)

Default avatar.png AI_says_hi: What are you working on?

Default avatar.png beingsalman: Hi

mzbear: Kirbiby, c++20 to the rescue! for (auto token : str | std::views::split(',')) {}

mzbear: or if you wanted them as integers, str | std::views::split(',') | std::views::transform(atoi) ... should work, i think

mzbear: oh, c++11 already introduced stoi()

mzbear: i almost never parse strings in c++ either :D

Default avatar.png Y4enik: ребят

Default avatar.png Y4enik: помогите в третьем

Default avatar.png Robin_Hood: use english

Default avatar.png Robin_Hood: not another language

Default avatar.png net1231: thereis a mistake here

VizGhar: bruh... I dived into UTTT using bitwise operations in C++. I must say, I'm not natural :P

Kirbiby: mzbear, indeed I don't use C++20 yet

Default avatar.png Robin_Hood: https://discord.gg/2x5W5t5w

struct: bye

VizGhar: Ah... I used % instead of / Found it after ~hour :|

Q12: ohh this is annoy

Q12: but I see that you near the boss, you can beat him easily

MSmits: VizGhar replied to your question

MSmits: on the forum

tarikyildiz: Hi how important is math and algorithm for programming

ryantimjohn: important

tarikyildiz: So how can I learn? Will I learn math and algorithm only for python or everything?

darkhorse64: math and algorithms are not tied to a specific language

Default avatar.png hanzexi: Hi, guys. How are you doing?

VizGhar: MSmits thanks :thumbsup:

tarikyildiz: Thanks

tarikyildiz: I know almost all the code in Python, but I felt like something was missing, what was missing is algorithm and logic

tarikyildiz: thank you very much everyone

tarikyildiz: Well we have to learn algorithms for puzzles and competitions on this site sounds very complicated questions

tarikyildiz: I will try to learn algorithm

tarikyildiz: See you


MSmits: np!

Q12: What does it - "E128 continuation line under-indented for visual indent" means?

Uljahn: i guess you should add more indentation to the line to match some part of the previous line

mzbear: Here, I googled it for you: https://stackoverflow.com/questions/15435811/what-is-pep8s-e128-continuation-line-under-indented-for-visual-indent

Uljahn: ye, just make it aligned with the previous part

mzbear: specifically, align with the first parameter

Q12: http://chat.codingame.com/pastebin/5d3e4957-6433-43f4-a3b6-1442595adeb6

Q12: sorry, I'm not so used to python :sweat_smile:

mzbear: it's saying invalid paste id for me

Q12: and the yellow marks making me crazy

Q12: wait a sec

mzbear: the pastebin was acting up for me earlier too

Q12: https://codeshare.io/arzNLE

Q12: try this

Q12: this line - "if temp_value > value:" is yellow for me and the lines below it

mzbear: hmmm α

mzbear: i think the style checker is bugged because of the variable names

Q12: this variable worked well for me before, it has nothing to do with it

mzbear: it's interpreting the input in different encoding probably

Q12: also β

Q12: I will try to replace it

jacek: alpha? beta? w00t?

mzbear: well, it definitely flags an unexpected line

Q12: still doesn't work

Uljahn: i turned the style checker off with adblock :pensive:

jacek: oO

Q12: the with this problem is that functions don't close to me so I need to scroll a lot

Q12: How did you do it Uljahn?

Uljahn: Q12: https://forum.codingame.com/t/make-the-ides-language-assistant-optional/187625/3

Q12: Thanks

Uljahn: there was an option to turn off pylint in settings but it stopped working some days ago

Q12: Yes!!! :grinning:

HuynhNgocHai: Hello boiz

HuynhNgocHai: How can i get in dark web?

Q12: I reload and it fix the problem

HuynhNgocHai: =))))

Q12: Thank everyone :slight_smile:

HuynhNgocHai: I'm newbie

HuynhNgocHai: What can i do?

Uljahn: you can practice to stop being newbie

Uljahn: play clashes. solve puzzles, make ai bots in multis

struct: Anyone knows what css I need to change to increase console output size?

Uljahn: .cg-ide-console ?

HuynhNgocHai: Thanks you so much!


i_suck_at_coding578375: ello

HuynhNgocHai: Hello bro

i_suck_at_coding578375: i still trying to get to know coding :joy:

Default avatar.png ForBidde[N]-: {

Default avatar.png Maxim251: YABADABA HOO , I finish Don't Panic - Episode 1 puzzle beautifully :D And Bigger succes for me is that I make logick in side of struct, where not hapens to me almost never. Logick it self is so small and works :D

struct: Ok, managed to do it, thanks Uljahn

struct: I had to change something else but now it works

Default avatar.png Maxim251: First play with thor, this is the simplest game what I was playing

jacek: :tada:

Default avatar.png Maxim251: #i_suck_at_coding578375

i_suck_at_coding578375: yes?

Default avatar.png Maxim251: play with lightining thor, or somehing like that. There You need simple loops

eulerscheZahl: you just got a channel dedicated to you

i_suck_at_coding578375: ok

struct: If anyone wants, this is what I changed "left-bloc console-bloc bloc with-leaderboard"

struct: I added height: 700px

struct: and margin-top:auto

eulerscheZahl: i'm happy with the default

eulerscheZahl: except that it's pretty small

struct: yeah, that was my problem

eulerscheZahl: https://www.codingame.com/forum/t/gm-script-to-maximize-the-console-and-minimize-ide-in-combination-with-cg-sync/2581

eulerscheZahl: that was later added to CG Enhancer

struct: ty euler

struct: Ill check it out

i_suck_at_coding578375: yup Power of Thor i'm not even good at rip

i_suck_at_coding578375: im not good at Power of Thor

i_suck_at_coding578375: so i think i cant code

Default avatar.png Maxim251: #i_suck_at_coding578375 Dont say that, it looks dificult, but there You use only 4 ifstatment

Default avatar.png Maxim251: If I pass all statement then why I couldn't unlock achivements?

Default avatar.png Maxim251: Oh Yeah, I forget to coment everywhere debuging " cerr "

Default avatar.png Maxim251: Now I have achievments

Default avatar.png Maxim251: :kissing_closed_eyes:

LastRick: Wait, there's a german channel?

ChrisSkyRo: Are you guys familiar with the CoC problem regarding finding the room Brian is in? Does anyone know the statement? I had it in reverse mode and only scored 90%, so I'm curios what I'm missing.

LastRick: anyone got euler's bookmark handy?

jacek: AutomatonNN

AutomatonNN: code as a minute

LastRick: Search here: http://eulerschezahl.herokuapp.com/codingame/puzzles/

ChrisSkyRo: thanks

LastRick: np

LastRick: Someone kick the CG Clash server. It's stuck on Reverse Mode.

Q12: If I am first in silver in UTTT but below boss would I be in gold or I have to be above boss to be in gold?

[CG]Maxime: you need to be above

Q12: thanks

struct: [CG]Maxime is there any way that I can get Yavalath, I deleted the account that created it

eulerscheZahl: as in: reassign the creator of the contribution

reCurse: Have you tried not deleting accounts?

eulerscheZahl: :heavy_plus_sign:

eulerscheZahl: looks better on discord

Astrobytes: at least we learned that he really is a man of his word

reCurse: But at what cost

Astrobytes: Indeed.

eulerscheZahl: losing contrib ownership, causing extra work for staff if they care enough

reCurse: That was rhetorical but thanks

eulerscheZahl: :(

Astrobytes: hahaha

struct: I dont care much about ownership, is just in case if images stored in imgur get deleted

struct: Icant edit contribution if im not the owner

darkhorse64: What about upvoting solutions thousands of times just to prove there is a bug ?

eulerscheZahl: and you want to add a league

struct: ah and that

reCurse: Isn't that how bug reports work? You break the thing

reCurse: Oh, just in case, /s

eulerscheZahl: and you tried to update yavalath with your current account already?

darkhorse64: Im my world not to the point to give trouble to another team

eulerscheZahl: (note how i wrote current account, not main account or alike)

reCurse: That was a joke darkhorse64

reCurse: :P

struct: I havent tried

struct: I could

eulerscheZahl: are you fine with me testing (download zip, reupload)?

eulerscheZahl: worked so far. but i think for langton the send button was the show stopper

struct: yeah its fine

eulerscheZahl: Contribution updated

darkhorse64: I discussed the matter on #fr and some people disagree with me to my surprise

reCurse: Ah ok

[CG]Maxime: struct : I've open a bug report, I can't tell you when it will be reassigned.

struct: ok, so I guess I dont need ownership

reCurse: Figured that's why I needed to add the /s

struct: Its fine Maxime, dont worry

struct: I have no rush

eulerscheZahl: all we want are community contests :angel:

Astrobytes: God loves a trier

jrke: me too euler

Astrobytes: hey jrke

jrke: hi astro

jrke: How make a statement only visible after level n in multiplayer game?

eulerscheZahl: did you propose a contest yet jrke?

eulerscheZahl: saw you asked lots of questions and didn't reveal any content

eulerscheZahl: https://github.com/CodinGame/FallChallenge2020/blob/main/config/statement_en.html.tpl

jrke: https://www.codingame.com/contribute/view/585178f84eb12adf8e123018a1d424f1dfc9 ^^ here is the public content euler

eulerscheZahl: oh :D

eulerscheZahl: i'll keep my game for myself atm

jrke: i saw that fall challenge statement tpl file as well as spring challenge but didn't get how to do

eulerscheZahl: define leagues

eulerscheZahl: then write blocks specific for one league

eulerscheZahl: ...

eulerscheZahl: when you build your project, it will create the individual statements from it

jacek: night of war = fog of war?

eulerscheZahl: first impression: your logo needs transparency

jrke: i know and i will fix it

jrke: https://pastebin.com/8xryWaej - why entrance green box statement still exists

struct: What do you mean jrke?

eulerscheZahl: be has a green box without and now he's confused why it's always showing

Q12: where does the time start in UTTT? after this - "opponent_row, opponent_col = [int(i) for i in input().split()]"

Q12: ?

struct: after reding first input

Q12: ok thanks

Q12: Wow!!

Q12: I didn't understand why I don't have time to do minmax, but now I understand and it is hella better!

Q12: Thanks struct!

struct: np

Q12: Boom! gold league in UTTT in 50 minuts :grinning:

Q12: minutes*

struct: grats

Q12: Thanks!

jacek: aww

Default avatar.png Latage: hello

Default avatar.png Latage: i need help

Default avatar.png Latage: i need help with c++ code

IfIHadATail: just ask your question and if someone can they will answer you

IfIHadATail: it's the best way to go about it

Default avatar.png Latage: its hard to explain, because i need to optimize my code

jacek: oO

struct: Oo

Default avatar.png Maxim251: #Q12 congratulations. :( For me, gold lague is as far like distroyer from star wars

VizGhar: Maxim251 you don't have to type # or @ before name... just start typing name and press TAB, it will autocomplete

VizGhar: # is channel reference btw

jacek: good to know, #VizGhar

Default avatar.png Maxim251: Oww, thanks

Default avatar.png fumio: VizGhar

Default avatar.png Maxim251: But color of name is nicer, And is easy to spot if somebody writes to You.

struct: Maxim251 it will show as red

jacek: struct impossibru

VizGhar: jeez, I'll keep my mouth shut next time :D

eulerscheZahl: no, keep talking #VizGhar

jacek: or AutomatonNN

AutomatonNN: go #1 back to the contest

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

**VizGhar slaps eulerscheZahl around a bit with a large fishbot

eulerscheZahl: :open_mouth:

struct: :tada:

twitlydoof: somebody sent me a message and i accidentally closed the chat in which i got the message, anyway i can see what it was

struct: refresh

eulerscheZahl: when you close the chat, it won't reopen itself

eulerscheZahl: that bug got fixed :P

struct: Nice a bug that doesnt happen localy

struct: :(

struct: oh it does :D

twitlydoof: another validator bug I think at https://www.codingame.com/clashofcode/clash/report/1507914b9d3360758627028c76130327c91d4c0

eulerscheZahl: we can't see the task or your code that way

eulerscheZahl: http://eulerschezahl.herokuapp.com/codingame/puzzles/ find and link the contribution

struct: I was gonna edit the puzzle that made me leave CoC, but it was a blessing

Default avatar.png wholesome: gamer

Default avatar.png Josh_Fullr: if someone knows how to code C#, I don't know how to code it and need help. Can you make an introduction to it?

VizGhar: There is nobody here that will teach you, try to find some online course first

Default avatar.png Josh_Fullr: ok, thank you

VizGhar: or check the "LEARN" section

Default avatar.png Josh_Fullr: I have

Default avatar.png albo1337: use codecademy

twitlydoof: what's your motivation behind learning C#?

jacek: so he get rid of the glasses

Astrobytes: badum-tsss

Astrobytes: he's here all week folks

struct: :clap:

VizGhar: I've finally managed to implement "possible moves" in UTTT (took me like 2 hours). Now scoring and MCTS

My brain Isn't working like it used to during university

VizGhar: this is something i was able to do in 30 minutes back then :P

jacek: noice

jacek: keep in mind in CG, if no one has 3-in-row in main board, the one with most won small boards wins, unlike the normal UTTT rules

VizGhar: yeah. I've read that and watched a few replays...

struct: I wonder if its worth to send the states back, from depth 4 to depth 3 once the move is done, this is what it normally looks like

struct: States / Score / Move / Time: http://chat.codingame.com/pastebin/6cff6c07-273d-4542-808b-d0f3e8bdcd55

VizGhar: I also challenged myself and trying it with C++ (I'm android dev so Kotlin is my default)

struct: Not sure its worth just to shave 1ms

VizGhar: What's that struct?

struct: From STC

struct: I try all the moves until depth N

struct: in that case 4

struct: I could save a little time on next turn and choose the Depth 3 from the depth 4 of the previous turn

struct: same from depth 2 and 1

struct: But just to save 1 ms, is probably not worth

VizGhar: (hope you are not waiting for my approval :D)

struct: Guess Ill do something else and leave this for later

Astrobytes: just a struc t braindump, don't worry ;)

struct: Yeah, I like to share my progress

struct: Very rarely I reach depth 8 if board is almost full

struct: But by then its too late to win

struct: Still I can do perfect move sthen

jacek: endtables?

struct: not endtables

struct: because the game might not end in that depth

struct: Also is very rare to get depth 8

struct: Only if I have 4.7 moves average over 8 depth

struct: Which is very rare, since the least amount of moves you have is 2 if both stones have different colors

MSmits: this uttt rule where the player with the most boards wins in the CG version is actually the rule that makes it solved for player 1 as win I suspect

MSmits: because player 2 can block 3 in a row, but not at the same time get as many won boards

MSmits: it's basically just an extra way to win for the player who has advantage

MSmits: played a couple games without this rule on some websites and it was pretty easy to draw as p2

struct: How much would game change

struct: if there was swap rule?

MSmits: fundamentaly

MSmits: +l

MSmits: it would probably be solved as a draw then as i suspect yavalath is

MSmits: and it would be very balanced

MSmits: right now it's quite boring at top level play unless you're like me

struct: Not much to improve on?

MSmits: It took me just a few days to make a bot that wins vs kar liso as p1, 100% of the time and he doesnt even use an opening book

MSmits: thats because the better your bot is the more narrow your line of play and his bot is very good

MSmits: mind you this does not work all that well vs tomatoes, but i suspect it still does if i take the time

struct: So you changed stuff besides book?

karliso: interesting

MSmits: nah, but i am working on that. I do like to be able to say i have the best bot and i currently dont

MSmits: hi :)

MSmits: I studied your rollout karliso, thanks for sharing that

MSmits: i noticed you have a lookup table for picking the mainboard

MSmits: on free moves

MSmits: that seems important

karliso: hi :)

karliso: oh yes

karliso: You mean a differen lookup table..

MSmits: i was guessing it prefers important boards where 3 in a row is still possible

MSmits: since you also pass your own mainboard

MSmits: as opposed to just the whole thing

MSmits: or maybe some preference to middle board if it can

karliso: Probably, I don't rememebr exactly. Also maybe 4 more likely than others?!

MSmits: there could be some weighted random in there that you tweaked

MSmits: isnt this a huge table?

MSmits: i wonder if this gives you cache problems

MSmits: because its [myboard][mainboard][random]

karliso: My bot is very well memory-optimized.

MSmits: yeah but 18 bit * whatever the size of the random part is

MSmits: thats a lot

karliso: Random is not big.

MSmits: ah ok

MSmits: preference for winning miniboards was interesting

MSmits: i always had block + win as equal value and randomed between them

MSmits: seemed better than win, but maybe i didnt test it well enough

karliso: idk, I have not even tested other way.

struct: karlis o should do Yavalath, so you have more competition :)

MSmits: its weird, you do realize a lot of players have experimented so much and you just try this way and win with it :)

karliso: I have tried many things, but not block/win as equal.

MSmits: ohh ok

MSmits: well its nice because you dont need to distinguish p1 and p2

MSmits: it uses the same array

MSmits: because block for one, is win for the other

MSmits: well i suppose it might be different for you, i use a ternary lookup

MSmits: still wondering if i should not just go back to binary

MSmits: ternary gives you a smaller array, but slower computations

karliso: yeah, I never tried ternary as I always felt that binary is going to be faster

MSmits: it is, but it depends on how many lookups you do

MSmits: you do "compute winning moves"

MSmits: I look that sort of stuff up

karliso: These are frequent lookups so they should be in cache.

MSmits: probably i should look again in how to do that fast, when i first wrote the bot i wasnt really good at bit tricks

MSmits: oh but your compute winning moves is not a lookup is it>

MSmits: i think you do a calculation

karliso: It is a lookup.

MSmits: ahh ok

MSmits: couldnt you make the function prettier btw? With the if/else structure for the two players?

MSmits: seems very symmetric

MSmits: except you count a draw for p1 as a loss somehow

MSmits: the mewhite? thingy

MSmits: i heard this before

MSmits: people doing this

karliso: There is often a tradeoff between pretty code and performance.

MSmits: yeah I guess so

karliso: This code is written to be fast.

MSmits: what is UTTT:ENDGAME7 btw?

Skynse: Finished my exams today

Skynse: I can code all I want now

MSmits: grats Skynse, hope you passed

MACKEYTH: I think that's out of date, karliso

Skynse: So far I'm doing great, thanks

MACKEYTH: Modern compilers are hella slick. You're better off writing for legibility

MSmits: well what you can do is, try to prettify it, then just profile

MSmits: if its just as fast, keep it

Skynse: How do I make the chat stay on "World" when opening new codingame pages?

MSmits: no idea

karliso: idk if I want to explain ENDGAME7

MSmits: then dont

MSmits: always keep stuff to yourself if you think it is important

MSmits: I havent shared some stuff also

MSmits: that made my bot a lot stronger

karliso: I put my uttt code in gitbolt and examined generated assembly.

MSmits: nice

MSmits: i think mostly you are good at these multis and contests because your intuition is good btw. I mean performance helps, but it;s not that big of a deal

MSmits: uttt is kind of an exception in this regard, performance helps more for this game than for other

MSmits: but still other things are more important i think

MSmits: choosing what moves to prefer, what to prune, what to evaluate etc.

SupSon: how many rollouts do you get 3rd ply

SupSon: for uttt

Default avatar.png QuiqueLuna: Hola Amigos

Skynse: Hola mi Amigo, tu hablo anglais?

MSmits: that that much currently, only like 90k, but i do some stuff that makes the rollouts heavier

MSmits: but before i had 130k or so

ElJona174: Hola a todos

SupSon: wow that's crazy

SupSon: i'm only getting like 60k

ElJona174: Algún consejo?

MSmits: karliso and recurse both have near 200k

SupSon: do they do full rollouts

MSmits: you mean every child?

MSmits: a sim

SupSon: i mean for the sim

SupSon: do they play for the end

MSmits: yeah

MSmits: there's a thing some players do where they rollout from ever child on expansion

MSmits: so thats like 7-8 sims after expansion

SupSon: ah ok

MSmits: i dont do this

MSmits: I *think* karliso does this

MSmits: but recurse doesnt

MSmits: hes got about 180k

SupSon: you use solver extension right?

MSmits: yeah

SupSon: do you propagate proven draws

SupSon: or only wins and losses

MSmits: i do draws also

SupSon: You can only propagate a proven draw if all the children are draws right?

MSmits: draws and losses

MSmits: at least 1 draw

SupSon: how do you differentiate between between a proven draw

SupSon: and a normal draw from a sim

MSmits: you mean on selection ?

SupSon: 0 exact and 0.0001?

MSmits: I simply dont select solved games

SupSon: no when you propogate the result up the tree

MSmits: ohh

MSmits: you do the -inf +inf thing from the paper?

SupSon: yea for proven loss and win

MSmits: i dont do that

MSmits: i just have a separate property

MSmits: "status" = -1,0,1, 2

MSmits: 2 is ongoing

SupSon: i guess you don't have to check the value multiple times then for the node

MSmits: what do you mean?

SupSon: to detect whether its a proven value

SupSon: -inf or +inf

MSmits: well i check this property instead

SupSon: yea cool

MSmits: i do it like that in every board game basically

MSmits: it works, might not be the 100% fastest way, but if not, the cost is negligible

SupSon: how do you store the local boards

SupSon: i'm using a ulong and an int combiend

MSmits: i currently use ternary storage, but i might switch back to binary

MSmits: ternary is nice for lookups

SupSon: what's ternary storage

MSmits: basically a board with 1 mark in the corner is 1 if its a cross

MSmits: 2 if its a circle

MSmits: so 0, 1, 2 for first mark

SupSon: hmm alright

MSmits: 0, 3, 6 for second

MSmits: so it's 3^9 possibilities

MSmits: instead of 2^18

MSmits: its about as packed as you can make it realistically

MSmits: there's even tinier methods

MSmits: but they take too much time to convert between

slvt_c0d3r: wassup noobs

MSmits: in binary there are 262144 possible boards

MSmits: in ternary 19683 boards

MSmits: in the smallest version 8629 boards

MSmits: well thats the array size i mean

SupSon: hmm I don't have any lookups for the complete local board state

SupSon: I only use one players

MSmits: yes and thats fine, karliso does this too and he's nr 1

SupSon: so I only have 512\

MSmits: i went really far down the lookup hole

MSmits: you can do some cool stuff knowing the entire board though

MSmits: for example you could have a lookup array for boardvalues and bias selection

MSmits: i dont do that, but it's possible

SupSon: sounds like it'd slow down everything haha

MSmits: yes, but in many games thats worth it

MSmits: in yavalath, pb4's bot is about 5x slower than mine, but his rollout is more accurate

MSmits: the bots are equally strong basicaly

MSmits: (not counting my opening book)

MSmits: uttt is just very resistant to this. It's hard to find changes that are worth giving up performance to

SupSon: yes

MSmits: do you do anything fancy?

MSmits: in uttt?

MSmits: or just plain mcts?

MSmits: your bot was quite strong

MSmits: so i suspect some kind of biased rollout

SupSon: just solver extension

MSmits: weird, 60k rollouts does not seem enough to be on nagraroks level

SupSon: I'm a little below him

MSmits: ahh ok

MSmits: he's tough to beat even now

SupSon: he used to be #1

MSmits: for a very long time too

SupSon: what got you to beat him

MSmits: hmm several things, i am not sure in what order i found them

MSmits: i'll tell you the stuff thats public

SupSon: teccles seems new

MSmits: teccles heuristic helps a ton and is one thing but i found it after i beat him

MSmits: biasing toward avoiding free move for the opponetn helps

MSmits: i prefer winning and blocking moves in the rollout

MSmits: random playout i mean

SupSon: What's a blocking move

MSmits: make sure 2 dont become 3

MSmits: basically play the move that opponent would play to win the miniboard

MSmits: the reason i do both blocking and winning is not to bias the rollout too much

MSmits: in my case it was weaker when i did just winning

MSmits: but karliso does just winning apparently.

MSmits: but it might be this depends on the stage of the game or something

MSmits: not sure

MSmits: you can go pretty far

MSmits: experimenting

MSmits: its just annoying that so few things actually work

MSmits: also as was said, at the highest level bots sometimes become deterministic enough to just beat them with hardcoded moves

MSmits: but this does not work on 99% of players

MSmits: doesnt really work on nagrarok anyway, i tried :P

SupSon: too stronk

MSmits: too randok

MSmits: random

MSmits: it works fine on recurse and karlis

MSmits: i recommend every player to add a bit of random

MSmits: makes my job a lot harder

MSmits: doesnt work on you either btw, i remember trying it

MSmits: oh of course if i spent a month it would work

MSmits: but you cant do that for each player

MSmits: I should go get some sleep, gn :)

SupSon: later dude thanks

MSmits: any time

Default avatar.png ChampionCoder: Good morning, guys!

Skynse: bedtime for me lol

Codeab: morning

atahiri: hello all

mzbear: mmh. started working on Yavalath bot :D

mzbear: first version submitted: takes a random move, except always takes 4 in row, always avoids taking 3 in row.

mzbear: random truly isn't a very strong strategy :D

Default avatar.png Robin_Hood: hi

Default avatar.png Robin_Hood: Good morning