From CG community
Jump to navigation Jump to search

Default avatar.png DuongCongSon: who is play game now?

Default avatar.png DuongCongSon: who is playinh game now?

Default avatar.png fuckboiiii: me

videxx: hi

Default avatar.png ArKeDominate: hi

WINWINWIN: Hi ArKeDominatem, videxx

NotForrest: people who use python are legit hitler

DinuBrat: Why?

NotForrest: too fast :(

DinuBrat: oh, man don't care

bad-Trevor: Hey Michael

nitekat: Python not always fatest in all cases, so don't worry

Default avatar.png ArKeDominate: Fast is relative.

LelouchV: Ruby and Python are usually hard to beat in shortest

LelouchV: And they're fast to code in because you have to write less code

Default avatar.png ArKeDominate: Run fast not the most important

tutubalin: JS beats Python sometimes

Cybgy: That's true

Default avatar.png fuckboiiii: fake game

tutubalin: Usually you don't need to convert string to number in JS, and when you need it can be done with just plus sign

Default avatar.png ArKeDominate: JS beats Python sometimes !

Default avatar.png fuckboiiii: i use binary code

Cybgy: The point is you understand what to code and can make it efficient then any language will work for you

Default avatar.png ArKeDominate: java The best in the world

Default avatar.png ArKeDominate: :grinning:

Default avatar.png Steane: the sponsored puzzle by codeingame, 'reverse engineering'... have i missed something?

Cybgy: ?

Default avatar.png Steane: it seemed way to easy?

Default avatar.png Steane: like 3 mins easy

tutubalin: In shortest mode CoC usually I start with Python, if I have time I port it to JS then choose what is shorter

Default avatar.png ArKeDominate: on JS , ‘var’ is interesting

tutubalin: One time I had to port to Ruby (which I don't know at all) because shortest Python solution had beed already submitted by another player.

nitekat: I'm facing security check to show I'm not a bot when I enter CoC everytime today, why??

TheSpiffiest: anyone here work @ Google? I have questions...

tutubalin: nitekat your account is new. when you get more exp, you will not get captcha

tutubalin: TheSpiffiest what's the question?

NotForrest: just use bytecode 4head

nitekat: @tutubalin really? but I start play about 2-3 weeks ago, no security check pops out until today

tutubalin: nitekat probably too many CoCs played.

NotForrest: does clash of code even have assembly

nitekat: T_T

tutubalin: nitekat when i started on CG i got captcha pretty often just find out that all my opponents are bots

tutubalin: such an irony...

Cybgy: That's might due to heavy traffic from your IP

nitekat: tutubalin security check is annoying but still ok.. just dont want to be considered as a bot

Cybgy: Consider clearing the cookies

Cybgy: That works fine for me

nitekat: Cybgy playing too much in short time? maybe, time to take rest lol

Cybgy: :expressionless:

nitekat: Cybgy I will try to clear cookies thanks a ton

Cybgy: :pray:

jacek: ohai

Uljahn: meowrning

Cybgy: :smiley_cat:

tutubalin: nitekat actually there are bots in CoC: MathieuGanesan, BitWolf, Tychkorg, KaneyklovAleck, AlkhilJohn, BSoD, NoopatJntsu, LannertvSeveir, SuperMuppet, JayEm94, Natchhood

tutubalin: and when you pass capctha to prove you're not a bot and see one of this guys there, it's emm...weird

TheSpiffiest: how would a bot work in CoC?

Cybgy: WOW :scream:

Cybgy: :fearful:

TheSpiffiest: If someone made a bot that solves code problems I'm unemployed. ;)

Cybgy: Get ready then

tutubalin: it just gets some random score at some random time.

tutubalin: just to make sure that you can't be #1 with 0 score

Cybgy: Be ready with a next job in 2022

Cybgy: :grin:

Cybgy: Don't blame me that I haven't warned you before

TheSpiffiest: I should have enough saved to not worry about that if my interviews go well. Amazon & Google at the moment.

Cybgy: That's great then

Cybgy: :upside_down:

Cybgy: Who want those giants if you can have your own

Cybgy: But BSod may not be a bot

tutubalin: with 66,254 CoCs played?

Cybgy: He just scored a 100%

tutubalin: and lvl 7?

Cybgy: in CoC

tutubalin: sometimes they do.

tutubalin: once on that bots made 100% in Fastest on 0:24 or something

TheSpiffiest: interesting. Translating the requirements into code is a better challenge. Is there a list of challenge questions, or does it figure things out on the fly?

tutubalin: they don't solve the problem actually

Cybgy: They simply copy and paste

TheSpiffiest: Oh - like the reverse program?

Cybgy: No not like that

tutubalin: they are CG bots. so they have ways

TheSpiffiest: answer['testcase']='testanswer'; print(answer[input()]) ?

Cybgy: lol

TheSpiffiest: I did that before. It does work :)

Cybgy: they may be translating the pseudocode into any language of choice

Cybgy: :grin:

Cybgy: The pseudocode => the soln we post for our CoC puzzle

tutubalin: they work even in new puzzles which were never played before

TheSpiffiest: and what's the goal? Programming challenge or do they spam something?

Cybgy: Every puzzle that exists in CG esp in CoC have a sol

Cybgy: See if you have someone better

Cybgy: you compete and level-up

tutubalin: so i suppose there's something like bot.submit().at(randomtime(15*60)).with(randomscore(100))

Cybgy: thus to invite coders CG use it

Cybgy: And that's a pretty good way to improve and learn

TheSpiffiest: what's a sol?

TheSpiffiest: solution?

Cybgy: :smile: sol=>solution

Cybgy: yeah was reading chemistry

Cybgy: so typed that

TheSpiffiest: just checking. Being explicit is in our nature of course. :)

RoboStac: theres a blog post on how the bots work -

Cybgy: Thanks, for your research work!

Cybgy: That

Cybgy: is great

TheSpiffiest: ah interesting and disappointing.

TheSpiffiest: I was thinking natural language processing to logic / code generation

RoboStac: I think if they'd solved that problem it'd be a bigger deal than clash of code bots :)

Cybgy: Why not create one like that

TheSpiffiest: yeah, I could make a browser extension capture any posted code and index it by problem description hash for any given language.

TheSpiffiest: Because then I *actually* would be out of a job. :)

Cybgy: :grin:

TheSpiffiest: but conceptually it's very difficult

Cybgy: that NP-hard

Cybgy: and a true AI if plausible

TheSpiffiest: yep

Cybgy: (Somewhere) Aliens: Let it be there! :smile:

TheSpiffiest: but saving code from anyone who clicked "Share Code" I could absolutely do

WINWINWIN: At the moment, no system can accurately translate between languages.

TheSpiffiest: I actually do that often to learn languages better.

Cybgy: That's the fun

WINWINWIN: All clash puzzles go through a contribution phase wherein the creator publishes a solution.

Cybgy: i used to write the same code in multiple langs to practice

Cybgy: right WIN

TheSpiffiest: For code golf, I solve things in python, then translate to ruby.

TheSpiffiest: gotta save them bytes

Cybgy: I dream of a language

Cybgy: for which we just have speak and put the constraints

Cybgy: then the code is automatically generated

Cybgy: To speak or to draw

WINWINWIN: Speak in pseudo code? Or english?

Cybgy: In any language you prefer

TheSpiffiest: consider the simple case - "I'm going to give you twenty numbers. I want you to tell me the sum of the numbers after I give them to you. [list of 20 numbers]"

Cybgy: yeah like that

TheSpiffiest: I got it - I'm saying try doing JUST a sum program

WINWINWIN: Seems like a crazy hard NLP program :)

TheSpiffiest: there are so many ways to word that

TheSpiffiest: even your simplest case is almost impossible to even consider how to design

Cybgy: kinda imagine drawing the game logic on a screen put the constraints and voila

Cybgy: you get the code

tomatoes: im not always sure what i want 😌

lyrics: hi

Cybgy: :grin:

TheSpiffiest: so scratch?

Cybgy: yea

Cybgy: but still that's a codeblock

Cybgy: not even close

LelouchV: :o

TheSpiffiest: right... you might like to investigate the old "cyc" project

TheSpiffiest: it's an attempt to capture a classification of all things... kind of

Cybgy: but here's a catch

Cybgy: if someday you wrote a code like that

Cybgy: true AI is finally there

Cybgy: and who want to share it with companies

TheSpiffiest: So - there's a possible solution if CodinGame will give me access to all their data

Cybgy: As if they will :grin:

TheSpiffiest: You could train a machine learning model from the problems and all solutions

TheSpiffiest: but I doubt this site is big enough to give any answers that make sense.

TheSpiffiest: But in theory your validator is a Gan, except it's not enough detail to learn from

Cybgy: that model will still be limited

Cybgy: Ah! those validators

TheSpiffiest: Right. AI only works when you can tell the computer exactly how wrong it is

Cybgy: Exactly you got that

TheSpiffiest: So it goes from 0.001% to 0.02% of a solution

Cybgy: cheers

Cybgy: that's like teaching a baby

Cybgy: And many great minds are working on that only

TheSpiffiest: Yeah, I would love to use tensorflow on some of these but I would have to recode a the game itself :)

Cybgy: use UNITY for that :grin:

TheSpiffiest: well I like coders strike back, but I can't get out of gold league without some better algorithms

Cybgy: And I recreated the same game for my high-school CS project

Cybgy: yeah! it was both fascinating and disappointing

MSmits: TheSpiffiest some board games here are extremely simple to recode

MSmits: maybe do a tensorflow for one of those, others have, or at least they've done a NN, not necessarily using tensorflow

Default avatar.png SabertheLost: anyone know whay I cannot use IntStream in java? what java version is running?

struct: Oracle JDK 1.8.0 / OpenJDK 11.0.2 (depends on played game)

Default avatar.png SabertheLost: seems Chuck Norris is running java 7? There is no streeams at all.

Default avatar.png SabertheLost: Ok, streams. but why not IntStream.

struct: Chuck norris seems to use 11

struct: import;

Default avatar.png SabertheLost: ok, thanks.

jrke: hey

Cybgy: Sounds interesting

VinhDaDen: :((((

VinhDaDen: 40%

Default avatar.png Bube: (:

Astrobytes: nice RoboStac

jacek: :F

ElViejo: Good Morning. I am new to coding. How do you approach a problem like this.

jacek: to being a new to coding?

ElViejo: A few months

struct: What problem?

ElViejo: Code Clash

struct: I would not recommend Clash to learn

ElViejo: What do you recommend?

struct: puzzles or multiplayers

ElViejo: I find most of the stuff on this site too hard.

Astrobytes: The site is more for practicing what you've learned rather than learning to program

ElViejo: I have tried and have earned 190 points.

Hjax: good morning

Astrobytes: morning to you Hjax

struct: hi

Hjax: robo pushed me above eric lol

struct: oh he beat dbdr

RoboStac: you've got a habit of doing one move at the end that completely wrecks my predictions :(

Hjax: no, he drew with dbdr many times

struct: ah right is a draw

struct: I forget to check the numbers

Hjax: my win against robo is super funny

Hjax: robo was above 99%


RoboStac: yeah, it does appear my end game valuation is slightly off

Hjax: here comes the new robo submit

Hjax: choo choo

RoboStac: same but with mcts solver to try and help with the above

jacek: mcts solver isnt the 'default' by now?

Washier: RoboStac, assuming you are the same RoboStac as on kaggle

Hjax: my mcts isnt solver

jacek: :gasp:

Hjax: the only paper on solver i saw was terrible, and i didnt feel like trying to work out how to do it correctly

RoboStac: I don't think so Washier - I've looked at kaggle but afaik never registered or done anything

jacek: well it might be tricky for othello with passing moves and draws

Hjax: like i understand propagating the absolute results up the tree, but i dont understand how to decide when to do UCT selection of absolute nodes and when to ignore known losses

Hjax: ive seen paper suggest that always ignoring known losses means youll overestimate the position

jacek: they lying

Hjax: are they?

jacek: i just ignore known losses

tomatoes: if its your win return, not yours - skip

Hjax: well that makes it easier then

Sylte: How is my rank decided?

Hjax: ranked by number of codinpoints you have, which are computed based on the formulas here

Hjax: i like how robos submit is weaker, not because its actually weaker

Hjax: but because it doesnt get its draw vs dbd r anymore

RoboStac: yeah, I appear to not handle draws properly in the solver part

RoboStac: and never noticed as I've only used it on oware where they are very rare

Hjax: well with solver you went from 92% to forced loss in one move

Hjax: not sure if thats any better :P

RoboStac: testing it offline it needed 3800 visits to solve as a loss and only got 3200 :(

Washier: what do you guys mean by solver?

Hjax: its mcts that propagates absolute game results up the tree

Hjax: so it can prove the value of positions just like minimax

Washier: aah ok, got you. i do that with 13 empty squares left. suppose i need a get a lot more to compete

tomatoes: i had compare uttt with and without solver and solver had ~5% higher winrate

Washier: thanks

Hjax: ? no you just always do it while you search

Hjax: if you see a definite win or definite loss, you dont need to explore that part of the tree anymore

Hjax: mcts's probabilistic nature means it doesnt deal with tactical situations well, where one bad move means it suddenly loses

Hjax: but with solver you can avoid that pitfall

Washier: yes, i understand. I meant when there's 13 squares left, i can set my minimax depth to 13 at not time out. rest of the game i only manage 5 depth

Hjax: you should do iterative deepening

Hjax: you search depth 1, then 2, then 3, etc, until you run out of time

Washier: yes, i know thanks. still struggling to figure out how to code it

Washier: also fiddling around a lot with eval function, and looking at prob-cut(which looks tricky)

Washier: maybe i should just port to C, and search more of the tree :)

WINWINWIN: Hjax, wouldnt you waste time on searching lower and unwanted depths?

Hjax: not if you have a transposition table

Hjax: which stores the results of the low depth search, and uses it to inform the high depth searches

jacek: in practice minimax(n-1) is tiny comparing to minimax(n)

jacek: and with TT you can sort and save more time considerably

WINWINWIN: Understood, but why not start with depth = 3?

Hjax: you can, it doesnt really matter

Hjax: depths 1 and 2 are basically instant

WINWINWIN: Understood, and you can use the transposition table to make up for any lost time.

Hjax: usually with iterative deepening and a tt, searching depths 1-n is as fast as searching just depth n

Hjax: but with the added benefit of you being able to stop at any time and return the best move youve found so far

WINWINWIN: So the benifit is that you can reach higher depth in more constricted scenarios?

Hjax: yeah, you search for like, 95% of your time, and then stop and return a move

Hjax: you get to use all of your time

Hjax: rather than fixed depth which wastes time

WINWINWIN: 5% is enough of a buffer? I have been using 15% for HS :)

WINWINWIN: Probably enough only for C++?

RoboStac: depends on your language / how often you check

RoboStac: anything with garbage collection tends to need a bigger buffer

Hjax: im using a 5 ms buffer with rust right now, which is like 3%

Hjax: i could probably go smaller even

Washier: good info peeps. thanks

WINWINWIN: Would that help much? With Iterative Deepening, you might not be able to search a depth in 2-3 ms.

jacek: iterative deepening is cool even without TT. it is more dynamic, i.e. in chess where there is check there are only few legal moves. you can search deeper this important part of the game

WINWINWIN: So you can examine higher valued nodes to a larger depth?

Washier: makes sense. so more interesting part of the gametree is searched.

WINWINWIN: Back to transposition tables, what information is stored in it? It has to make up for the amount of time spent in searching the table for each node right?

jacek: chess legal moves are about 35 by average, about 150 maximum. with fixed depth, to not timeout you would need to prepare 150 legal moves always happen, so search shallower every time. what a waste

Hjax: im doing MCTS WINWINWIN

WINWINWIN: Why is that better in Othello?


Hjax: if you are doing iterative deepening dont you also want to store the depth and best move

Hjax: because you dont want to use a low depth search in place of a high depth one

Hjax: you just want to use it for your move ordering

WINWINWIN: Thanks Jacek, Hjax, so I assume that if you are storing alpha beta values you empty the transposition table each game turn?

Hjax: no, absolutely not

Hjax: thats valuable data for your next search

WINWINWIN: But wouldnt it get too memory intensive?

WINWINWIN: Storing an object followed by a couple of integers each turn?

Washier: that's what i also wonder.

Hjax: it can, theres various schemes for deciding what entries to remove

Hjax: tt entries are pretty tiny though

Washier: the wiki article does confirm you need to store the depth and lower\upper bound flags in the TT

WINWINWIN: Hmm. Maybe in Othello you can remove entries that have a lower number of pieces than the current gamestate?

Washier: good idea. simple

struct: what do you mean WINWINWIN?

struct: Having lower number of pieces can be benefitial

Hjax: chat is back from the dead

Hjax: you probably dont need to remove pieces at all, you have enough memory for millions of entries, the game will end before you run out of memory

WINWINWIN: Yeah, seems pretty useless to check the whole table just to remove a few entries.

WINWINWIN: @struct I meant that states with 5 or 6 pieces can be eliminated once the actual game is at a state wherein there are 7 pieces.

Hjax: my node pool is 10 million nodes, and i dont run out

Astrobytes: You hash into the table you don't iterate over it WINWINWIN

struct: ah

tobk: Huh, CoC progress shows 340, but CoC Badge meter shows 329/500... any idea why?

struct: I guess its only updated daily

tobk: (In fact, I think that last number is lower than it was a few days ago, when it was just 2 or 3 off)

WINWINWIN: Thanks Astrobytes, was AFK :)

NaughtyCoder: Would somebody like to teach me how to make "Coders Strike Back" better?


NaughtyCoder: Wow, thank you.

Hjax: i love how i always win a game against robos submits

Hjax: its very amusing

struct: He will push you to the top

RoboStac: nah, he only wins 1 out of how ever many we play

Hjax: but winning even one is a personal victory

struct: dbd needs to resubmit to fix his score

dbdr: why do you think it's broken?

struct: you got a bit lower due to ties

struct: ah you still tie

struct: I thought it didnt happen anymore

dbdr: many draws, but no loses, interesting

RoboStac: we only ever play 2 different games - if I'm p2 we draw otherwise you destroy me

dbdr: ah ok

jacek: so random

jacek: and nondeterministic

dbdr: not the same game

dbdr: looked at 2 draws at turn 30

dbdr: one was 22-12, the other 23-10

dbdr: sorry, maybe i'm wrong

dbdr: cg player being funny with scrollbar

dbdr: total must be the same when no pass

jacek: woo new puzzle of the week

Astrobytes: Has Paper Soccer been puzzle of the week yet?

jacek: yes. when there was contest :(

Astrobytes: Ah. Not very helpful;

Astrobytes: *helpful.

struct: if (owner === 'struct') continue;

dbdr: yeah, that was bad timing :(

Astrobytes: ewww javascripty quality

Astrobytes: *equality

struct: Yeah I have been writing javascript

struct: It hurtrs

struct: hurts*

Astrobytes: I don't envy you

nickarshadi: 很高兴见到你

nickarshadi: took me some time to learn chinese

jacek: odd looking opening book

struct: Nice, I have been learning it for 6 years

Astrobytes: lol

nickarshadi: awesome

MSmits: hey astrobytes I think I found a bug in my oware bot

Astrobytes: What is it? Bitboard-related?

MSmits: it was in this line:

MSmits: int evalScore = SCORE_VALUE * (child.scores[0] - child.scores[1]);

MSmits: first part of my eval

MSmits: it looks fine, but

MSmits: scores is a uint8_t :P

MSmits: or was

Astrobytes: lol good shout

MSmits: it didnt do a whole lot when i fixed it, but i got a slightly better cg bench result, might be nothing

MSmits: tried to refit params a bit, that didnt do anythign either

Astrobytes: I did something similar with my Othello bot at some point, w as getting these really strange values lol

MSmits: yeah it's a common mistake

MSmits: I think I might be working on othello in a day or two. Just finished coding my oware meta mcts

MSmits: so othello is next

Astrobytes: Cool. You'll be up against robo now as well as dbd r

MSmits: robo has a NN again?

Astrobytes: Yes he does

MSmits: cool

MSmits: does dbdr use an opening book or just really good eval? Minimax I assume?

dbdr: no book yet. I'll do one if I'm forced to ;)

MSmits: leaderboard sure has evolved. I remember when the fox was ahead of everyone by far

Astrobytes: are you using the n-tuples thing now dbdr?

MSmits: if I can make a good othello bot, you'll be forced to. I only do a book when I have a good bot

Astrobytes: Or still just the probcut-based?

dbdr: probcut

Astrobytes: k

MSmits: whats probcut and n-tuples

Astrobytes: I'll resist the urge to lmgtfy

dbdr: MSmits has not been paying attention ;)

MSmits: nah, been coding hard, this oware meta was really hard to write

MSmits: too many moving parts

Astrobytes: hehehe

Astrobytes: n-tuples:

Astrobytes: probcut you'll find on chessprogramming and similar

MSmits: ah ok thanks

MSmits: but dbdr bot is minimax right?

dbdr: yes

MSmits: and jacek also

MSmits: and robo is nn, tric trac is minimax

MSmits: renard minimax, toma toes i dunno

dbdr: hm, I think jacek is MCTS with eval

MSmits: hmm ok

dbdr: so TS :)

Hjax: tomato is mcts with ept / eval

MSmits: ah ok, so both ways seem to work here

Hjax: yes

MSmits: it's nice when multiple approaches work

Hjax: im also mcts with ept, but my eval is literally only mobility

MSmits: mobility seems important, I read

dbdr: you ditched the rest Hijax?

Hjax: everything else was worse

MSmits: I'll start with that too

Hjax: i want to do some n tuples eval, but thats a weekend problem

Hjax: are you starting othello now smits?

MSmits: yeah, maybe i'll start coding today, maybe tomorrow

MSmits: dont expect a good bot any time soon. Will be on vacation at some point

eulerscheZahl: i see an opening book coming

MSmits: for oware yes, but will need to get the bugs out first

MSmits: well i hope they are out, but experience teaches otherwise

MSmits: I noticed my own oware bot is already extremely deterministic

MSmits: I guess because of EPT with no random rollouts

MSmits: it's like a weird minimax

Hjax: thats what tomato is doing in othello

MSmits: yeah I'll be doing that too

Hjax: my ept is depth 6 random rollouts

Astrobytes: but 10 x more obsessively :P

MSmits: probably :)

Hjax: havent experimented too much with other depths

Hjax: i dont think 0 depth is very strong

Astrobytes: People thought that in Oware too

MSmits: Hjax my experience with this is that as your eval gets better, your ideal depth gets lower

Astrobytes: ^

Hjax: yeah my eval is hot garbage lol

Astrobytes: :)

MSmits: it's possible that no eval exists that is good enough for depth 0 in othello

dbdr: yes, with perfect eval, depth 1 is enough :)

MSmits: well yes, but thats a different depth definition

dbdr: I know

Hjax: ill try a depth 0 submit and see how it goes

MSmits: did you fit it properly? Try 100 games against a few opponents for each depth value?

dbdr: inb4 Hijax top 3

MSmits: it's easy to fit because it's an integer. There are only a few possible values

Hjax: i havent fit anything lol

MSmits: aha

Astrobytes: MSmits - totally OT, but did you watch El Camino? (not sure if I asked you before)

MSmits: well submits are poor tests

MSmits: yes i did

Astrobytes: Damn good eh

MSmits: I enjoyed watching it I think, but somehow I dont remember much of it

Astrobytes: Just wrapping up Jesse's story

MSmits: yeah i remember that part

Astrobytes: I'm rewatching Breaking Bad after BCS and that, with a fresh perspective. You really notice how bad Jesse gets it

Astrobytes: Anyway, back on topic, sorry :)

MSmits: yeah I noticed that the second time i watched the whole series as well

Hjax: i predict my depth 0 rollout will be dead last

MSmits: get a good eval first I'd say

MSmits: this n-tuples thing seems super easy at first glance?

Astrobytes: Yep, eval is 100% needed for depth 0

eulerscheZahl: i watched El Camino 2 or 3 weeks ago. call saul season ended and i realized there is a movie

MSmits: wait no i am looking at the wrong thing

Astrobytes: jacek is using the n-tuples

Hjax: converting the two binary numbers into base 3 seems kind of hard, do i just use a 2d lookup table

MSmits: it's a weird title, not that obvious

Astrobytes: with some TD learning, and some supervised stuff I think

MSmits: ahh ternary, i did that for uttt

Astrobytes: *some other supervised stuff

Astrobytes: Told ya to ask MSmits about ternary Hjax ;)

MSmits: const uint16_t triMoves[9] = { 1,3,9,27,81,243,729,2187,6561 };

MSmits: 9 places on the miniboard

Hjax: a lookup table is probably fine for what i need, its only small ternary numbers

Hjax: ok depth 0 is a lot less bad than i expected


MSmits: dunno why the iteration is backward and I am using j instead of i, but it works :P

Hjax: probably faster to just precompute though

MSmits: sure, i dont think I do this a million times in a turn, this is more like something i only use in precalc

Astrobytes: "ok depth 0 is a lot less bad than i expected" - other than the fact I'm beating you Hjax :P

Hjax: yeah but im beating ninja!

Hjax: also symmetry seems annoying

Hjax: maybe i just dont bother with it

Hjax: but the space saving is enticing

Astrobytes: ninja times out and makes invalid actions all the time

Astrobytes: Really really annoying to test against

MSmits: not as bad as the rusty guys I'm sure

Astrobytes: I don't even bother testing against them lol, no point whatsoever

Hjax: besides symmetry i understand how to score using n-tuples

Hjax: i dont think i understand the math to train it though

Astrobytes: Ask jacek about it, he was just learning it the other day

dbdr: MSmits: I rather wonder why you are not using recursion ;)

MSmits: lol

MSmits: missed opportunity I suppose

Hjax: ill try to get something n tuple-y together this weekend

Hjax: i want to experiment with pure self play vs training with a database of downloaded games

Hjax: i found a file with ~150k logistello games

MSmits: oo nice

Astrobytes: jacek combined the two didn't he?

Hjax: no he said he only did selfplay

Default avatar.png FLQ4: ok

Astrobytes: No, after he did selfplay with TD I think he said he did something else

MSmits: TD?

Astrobytes: I can't quite remember

Hjax: yeah, he did a depth 2 search on positions

Hjax: and used that to update

Astrobytes: Temporal difference

Hjax: rather than just before/after

MSmits: oh ok

Astrobytes: Aha that's it, thanks Hjax

struct: cant scroll the chat

struct: hmm

eulerscheZahl: "TD?" MSmits asking the question i'm asking myself for at least a week

MSmits: you're welcome, hope I didn't spoil anything

Hjax: if i do n tuples i get to use a new BMI2 instruction

Hjax: PEXT

MSmits: it's not that new though, some of us put that into yavalath over a year ago

MSmits: but very cool

MSmits: my checkers bot also uses it

MSmits: and oware as well somewhere I think

Hjax: ok im convinced that depth 0 is worse for my bot

MSmits: oh right, with the harvesting

Hjax: at least until i write a real eval

MSmits: yeah you need a good eval

Astrobytes: pext is the parallel extraction one right

MSmits: yes

Hjax: yeah

MSmits: basically you pick a pattern out of a bitboard and compress it

Astrobytes: yep, I remember

tomatoes: temporal difference

MSmits: pdep is the opposite, you put it back where you found it

Hjax: pext is exactly what i need to index into the weights table for n tuples

Astrobytes: I still think bextr has a use somewhere

MSmits: yeah you can use it for a lot of things

MSmits: in yavalath, the board fits into 64 bit, you can take for example a diagonal line out of the board and use that for a lookup or something

Hjax: it gets annoying with rotations though

Hjax: depending on how you orient the board, the low order bits will be on the wrong side

Hjax: for your lookup

MSmits: probably less so on squares than on a hex board :P

Astrobytes: lol

MSmits: yavalath has 12 symmetries, 6 rotations, then mirrorflip it, then another 6 rotations

Hjax: ouch

Hjax: yeah othello has 8

MSmits: 4 rotations and mirrorflip, same deal, just fewer corners

Hjax: whats the magic trick to rotate a bitboard

MSmits: but indexing is far easier

MSmits: hmm

MSmits: for yavalath I use a transformation array, it's super slow

MSmits: but I only do it to read opening book and in my meta mcts

MSmits: so it's allowed to be slow

MSmits: i basically transform every bit with a lookup

MSmits: means 61 lookups

Hjax: ew

MSmits: yeah

MSmits: but its no bottleneck

Hjax: yeah i cant do that in my eval function though

MSmits: problem is that the board rowss get wider and thinner

MSmits: so it's hard to come up with a tricksy approach

MSmits: Hjax no you cant

Hjax: if i dont do symmetries, i have less efficient storage of weights

MSmits: instead of flipping the bitboard itself, can you flip what the function does?

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

Hjax: i guess i can have an array of masks for PEXT that are pre rotated

MSmits: something like that

Astrobytes: ┬─┬ノ( ◕◡◕ ノ)

MSmits: hi Scarfield

Astrobytes: Scarflip

Scarfield: hi fellas :)

Hjax: i do need to keep track if pext is going to put the bits in backwards or not

Hjax: and flip them if it does

Scarfield: for yavalath couldnt you arange your bitboard with the circumference together, and make the symmetry part easier?

MSmits: yeah I thought about that, but that would mean redoing the whole bot


MSmits: for something thats not a bottleneck

MSmits: but it's a good idea

Astrobytes: Interesting approach

MSmits: might have other unexpected benefits

Hjax: i like that my bot occasionally beats tric

MSmits: tric trac has an opening book now doesnt he?

MSmits: but I wonder if it is a serious one, in yavalath he just did the first 2 moves

Astrobytes: it's not a big one

struct: its disabled

Scarfield: hardly a book, more like an opening note

Hjax: yeah hes not printing book anymore

Astrobytes: Oh ok

MSmits: ah ok

dbdr: eh ok

MSmits: depending on the game, the first moves may be far harder to find than later ones

MSmits: with later ones, you're nearer to end games and your search could be more accurate

MSmits: in yavalath, the first moves are super hard, I still dont know for sure what the best 3rd/4th moves are in many instances

dbdr: you sound like you *almost* solved Y

MSmits: I solved 2 out of 9 opening moves

dbdr: wow

MSmits: if someone picks them I know how the game ends

dbdr: are they easier than the others to solve?

MSmits: the others are way hard because they go beyond the initial minefield of traps and that means they probably go to turn 50-60

MSmits: yeah they are easier

dbdr: ah ok

MSmits: yavalath has a trappy-start and then its just about filling the board efficiently

MSmits: minimax is better at the trappy start and mcts is better at "feeling-out" what efficient board fills are

Astrobytes: Are you still running your Y solver when you have Oware/whatever g ame downtime?

MSmits: I am running it this last week or so yes, because I improved the database I am using

Astrobytes: The C# thing

MSmits: yeah

Astrobytes: nice

MSmits: I can go up to 2 billion nodes now, before I kept it all in RAM, which meant maybe 10-20 million max

MSmits: but 2 billion will probably take up like 60-70 gb, I dont really want it to be bigger than that anyway :P

MSmits: and it will take years

struct: just download ram

MSmits: :)

Astrobytes: Y'need a botnet :P

MSmits: i had a serious issue with oware btw, remember how i made my 15 seed book go 180 turns deep?

struct: he needs a pc just for this

MSmits: somehow it seems a really bad opponent can make you go below 15 seeds in less than 20 turns P

MSmits: :P

MSmits: so i had to stretch it to 185 turns, which meant i was about 1% below the max memory size of an array

MSmits: my c++ bot would accept this and my C# program wouldnt

MSmits: so i did a persistent dictionary just to convert this monster which takes many hours :P

MSmits: but it's a one time job... thankfully

MSmits: but yeah a pc just for this struct :)

Hjax: whats that computer? oh thats my yavalath computer. how about that one? oh thats my oware computer

MSmits: if only I could do that :)

MSmits: I usually run 1 meta mcts in the background. Sometimes 2 if I am not doing anything heavy on my pc

struct: do you use multiple threads?

MSmits: no, I have a 4 core PC, so it's just 1 core running the C++ bot and some minor calculations on the main C# program

MSmits: the C++ bots use a fair bit of memory too, because of the node pools

Astrobytes: I think you should distribute a trojan to all your students, create your botnet to run your meta-MCTS's

MSmits: hehe yeah that would be fun

Astrobytes: :grin:

MSmits: I think it's most fun for Yavalath because you can look at the board and learn what good moves are. I doubt it will be that way for oware. Looking at 12 numbers doesn really ring a bell strategy-wise

struct: MSmits without realising became the best Yavalath player

MSmits: I think i'd be reasonably good with all the time i stare at this program :P

Astrobytes: You should contact the author

MSmits: i wonder if theres a free online game version of Y

MSmits: like you can find for uttt

MSmits: what would i talk to him about Astrobytes ?

Astrobytes: Solving Yavalath positions!

MSmits: oh ok

struct: There seems to be an android app

struct: of it

MSmits: the 3 3 and 4 4 moves seem pretty easy to solve though, i',m sure he has done that

inoryy: with a parallelized setup you can probably rent a bunch of GCUs for peanuts and get the same results in minutes rather than months while freeing up your computer?

MSmits: hey inoryy

inoryy: hey

MSmits: I dont fully automate it though

Astrobytes: I suggested this did I not MSmits?

MSmits: I do a lot by hand, choosing moves for the the program to focus down

inoryy: oh, ok

MSmits: because I counter specific players

MSmits: I also use good opponent bots and explore their moves, to solve some branches

darkhorse64: Catching up on the chat, is there a way to generate efficiently moves for checkers? I mean avoiding lists of moves. I know how to find efficiently if there are jumps or moves but I wonder if there is a way to store multiple captures efficiently

MSmits: yeah

MSmits: I did that. My bot sucks, but performance is great

Astrobytes: lol

MSmits: lots of pext and pdep to generate moves and jumps in parallel

Astrobytes: AllphailSpeedo

Astrobytes: Didn't do checkers yet, was thinking of Breakthrough next

MSmits: argh, my checkers bot makes my head hurt

MSmits: it's worse than any other bot

MSmits: here's one line:

MSmits: uint32_t opponentBitRemoved = _pdep_u32(_pext_u32(bit, MOVE_DIRECTIONS[direction]), MOVE_DIRECTIONS_REVERSED[direction]);

Astrobytes: a capture?

MSmits: yeah

MSmits: you have 3 positions

MSmits: where you came from, where you went to and in between

MSmits: i somehow do something with that in parallel

MSmits: on moves it's easy, you do all diagonal up moves left, also right and for kings another two of those

MSmits: basically 4 steps to do all moves

MSmits: in parallel

MSmits: for jumps its a lot messier

struct: wow, some machines are actually very cheap to rent

Astrobytes: I got a massive headache when I got to that part in checkers before so I binned it

MSmits: I should get back to checkers at some point. I wrote a simple eval, then spent a lot of time getting TT to work and it never did. Then ragequit :P

darkhorse64: OK. I'll think about it but maybe I'll first write something simple. While looking for othello stuff, I stumbled on a python checkers bot written for hackerrank. With a few hacks, it runs on CG with a fairly decent ranking. Moving to C++ and bitboards should improve it a lot

MSmits: yeah

MSmits: mostly I dont really know how to write a good eval

MSmits: i just counted pieces

darkhorse64: The eval is kings + pawns

Astrobytes: Don't mention TT's to me right now :(

darkhorse64: #37

Astrobytes: nice

inoryy: struct CPU and RAM is incredibly cheap now, yeah

MSmits: I think I'm at #8 with counting pieces

struct: any site that you recommend inoryy?

MSmits: but it's mcts

Default avatar.png FredRides: All code size clashes: (1) python (2) Javascript (3) C++ (4) Java

MSmits: oh I'm 6 now

darkhorse64: But generating moves will be the bottleneck. Moves are OK but storing multiple captures will be costly. ab with iterative deepening

darkhorse64: Royale is trying to consolidate his lead by harvesting points

MSmits: ah well, gotta have a hobby

darkhorse64: #1 CP war is on !

MSmits: I try to get some CP sometimes, but it's a lost cause, I always get stuck on some game or other

Astrobytes: lol euler just got back to #1 the otehr day

Astrobytes: *other

struct: FredRides list seems wrong

struct: I think euler just need to get legend on CSB

Astrobytes: He is legend on csb

MSmits: a high legend

MSmits: it does help

Astrobytes: Legend, then Legendary.

inoryy: struct probably not the best person to answer that since I work for one of the providers :)

Astrobytes: :)

struct: ah sorry :p

struct: I did not mean to throw you under the bus

MSmits: google cloud all the way

dbdr: you didn't notice inoryy's sales pitch earlier? ;)

inoryy: :grimacing:

Astrobytes: Subtle yet obvious, you switching to marketing? :P

inoryy: shhh

Astrobytes: :zipper_mouth:

darkhorse64: euler should improve his UTTT bot otherwise he has barely nothing to improve

MSmits: is that where he misses the most points?

darkhorse64: Overall, I feel I am in a better position: so many things to play left

MSmits: well if euler wants some pointers he should pm me. I want him to stay at nr 1 :)

darkhorse64: Yes and BOTG

Astrobytes: I just cannot get into botg

struct: He needs yavalath bot

struct: 1000 points+

MSmits: so basically, the things he lacks are the only things I spend time on?

struct: yeah

MSmits: botg seems fun somehow, but everyone says its bad

Astrobytes: Sounds like fighting talk :D

darkhorse64: I think he has to switch to C++ or Rust for these

MSmits: yeah he does

Astrobytes: MSmits once I finished the Wood leagues, all 500 (well, 6 or whatever) of them I was done

MSmits: and he can. I think he's better with c++ than I am

MSmits: but I am just more obsessed at squeezing out performance

MSmits: Astrobytes ah i never got that far

Astrobytes: Yup euler can C++, but I don't think he likes it much

MSmits: it's impossible to like it much when you work with C#

MSmits: well one thing i like

MSmits: if(i & 1) "do this"

MSmits: instead of if ((i & 1) > 0)

MSmits: a lot less explicit type conversions in c++

MSmits: less code to write

Astrobytes: That's a double edged sword if you're nto careful ;)

MSmits: i know

MSmits: thats why C# causes me a lot less bugs

Astrobytes: :)

MSmits: i can write hundreds of lines of code in C# and it just works

struct: Wish I could say the same about javascript

darkhorse64: i can write hundreds of lines of code in C++ and it just works after some hours debugging

Astrobytes: I can do that in C++. It usually works, sometimes just not the way I thought it might

MSmits: if you're using a windows machine, get VS and learn C#. Makes life easy

MSmits: darkhorse64 right :)

Astrobytes: lol exactly darkhorse64

darkhorse64: But it finally works

MSmits: I have never given up on a bug in c++, always found it so far. But sometimes it took days :(

darkhorse64: I fixed a bug in my PCR bot last week; it has been there for months; #11 -> #9

Astrobytes: Most bugs in C++ just turn out to be silly things, that you can do in C++ but absolutely ruin whatever you're trying to do

MSmits: if (x = 3) do...

LoGos: vector<int> v; if(v.size() - 1 > 0) cout << ":)"; else cout << ":(";

inoryy: fyi if you use things like asan you can avoid majority of the foot-guns in C++

Astrobytes: advertising again eh

inoryy: :no_mouth:

MSmits: mmh isnt that to avoid pointer stuff?

MSmits: most of my problems are not pointer related

inoryy: any memory related issues basically

MSmits: yeah

MSmits: it's more that my obscure bit stuff is so hard to read that I just dont see the bugs

Astrobytes: For memory stuff I can usually catch it in the memory viewer of VS

MSmits: and with mcts it is always sign errors

MSmits: this one is fun too: for(int i = 0; i > 5; i++)

darkhorse64: And now you have pass nodes for othello mcts. It ruined my bot

inoryy: lol MSmits

MSmits: why are pass nodes problematic?

Astrobytes: lol

MSmits: just add 1 extra child with the same board

Astrobytes: Yeah I don't get why it's so problematic either

MSmits: oh right you need to keep track of whether both guys passed?

MSmits: that might be annoying

Astrobytes: Annoying but not too hard I don't think

MSmits: nah it's doable probably

darkhorse64: Combined with a solver which does not explore all nodes, your tree sometimes hangs in the void

MSmits: othello seems just like oware, bandas, checkers. They all have some annoying thing or two in their move generation

Astrobytes: It's the solver that's messing things up then right?

darkhorse64: Sort of, yes

MSmits: what part causes problems/

tomatoes: i made pass move as usual move

MSmits: i guess you can no longer count the number of pieces to guess which turn it is

MSmits: and games can have more than 64 turns

Astrobytes: afk for a bit

darkhorse64: It's a problem mostly in the endgame. When you solve, some moves are left unexplored and multiple pass moves chain may lead you to one of these unexplored nodes. I reset the tree in this case and let the solver find its way to victory or defeat

darkhorse64: again

MSmits: hmm multiple pass moves?

MSmits: how many can you do?

struct: in a row?

darkhorse64: 2,3

darkhorse64: yes

struct: I saw more than 3

struct: I saw 5 I think

darkhorse64: This is why mobility is sensible

RoboStac: the main issue I had was my tree reuse was working by trying every valid enemy move to find which one matches the new state, which doesn't work when the new state is multiple moves away from the old state

darkhorse64: EXPERT mode ?

struct: 4 passes

struct: Cant remember where I saw 5

RoboStac: I may not have read the description carefully enough to know about that

IdiotIdiotIdiotIdiotIdiotIdiotId: Does anybody have the answer to cgx formatter in C#

darkhorse64: with EXPERT mode, you get opponent moves

RoboStac: (though I do now, and if there are multiple ;'s in the enemy move I just restart the tree)

darkhorse64: ^

RoboStac: probably should actually use it properly

struct: Why reuse?

struct: restart*

RoboStac: because I'm lazy and if I'm passing it's probably not a game I was going to win

darkhorse64: After several passes, there are not many nodes left to reuse anyway

MSmits: hmm why would the state be multiple moves away?

RoboStac: because you don't get your pass turns

RoboStac: so the enemy has done 3 moves since your last turn

MSmits: oh, I see

MSmits: well thats painful

darkhorse64: Sparing several days of debugging for you MSmits

MSmits: yeah thanks for this

MSmits: It's seems to always be like this with RoboStac, he doesn't talk much, but when he says something here it's always saving you hours of time

MSmits: that's my experience anyway

RoboStac: :)

MSmits: and as we speak I am passing on uttt knowledge i got from you 2 years ago to other people by PM

Astrobytes: This place is a fountain of knowledge if you ask the right questions I've found

MSmits: yeah

MSmits: and sometimes when you dont ask any question

Astrobytes: Yep. I really should consolidate all my 'useful stuff' txt files

MSmits: might be a good idea

MSmits: i do favorite everything you guys link about games. I occasianlly have to sift through hundreds of these

DomiKo: that knowledge is really powerful ;)

Astrobytes: Yeah I'm due a clearout and save of those too

Astrobytes: Right, early CG termination for me tonight, talk to you all later, take care

inoryy: "by PM" do you mean post portem?

Astrobytes: DM I think

DomiKo: yea

Astrobytes: anyway, bye :)

DomiKo: bye :)

inoryy: meh, why not post mortem :(

MSmits: personal message

darkhorse64: :sleepy:

MSmits: bye Astrobytes

_Royale: darkhorse64: guilty ! I did some Checkers :)

darkhorse64: and made some progress also ... We, mere mortals, are watching the clash of Titans

MSmits: yay i can print the board

MSmits: baby steps :)

darkhorse64: Same here. For C++ debugging :wink:

MSmits: right

MSmits: hardest part is next, that might take me a day

MSmits: move generation

MSmits: i always start by generating all the moves and make a random-move bot that doesnt crash

darkhorse64: With Google, I realized that there are decades of programming experience for Othello. Othello move generation is nearly inside Wikipedia

MSmits: ah, but i dont just want something that works, I want the fastest way

MSmits: isnt AVX possible here?

MSmits: read this somewhere

darkhorse64: I should have written "efficient move generation is in Wikipedia". I found several instances of the same bitboarding on various Web sites

MSmits: this?


RoboStac: I used

MSmits: looks more useful yeah, thanks

RoboStac: and then rewrote it to be avx based because it looked easy

darkhorse64: Yes, this is my boss code

MSmits: ah see, avx after all

MSmits: finally I get to use it somewhere

darkhorse64: 8 directions ...

MSmits: yeah

RoboStac: shame we don't have avx512 :(

RoboStac: the better part is its 4 left shifts and 4 right shifts so fits perfectly

MSmits: in 512 or in 256?

RoboStac: 256

MSmits: well thats good

NotForrest: when the clash was so hard you win by just outputting "ERROR" kappa

Default avatar.png bmalbusca: hello! I'm struggle at Scatter and Gathering exercise - I need help

Uljahn: Automaton2000: what's that?

Automaton2000: it feels like you could do

Uljahn: can't find the link, Automaton2000

Automaton2000: that's what i do too

Default avatar.png bmalbusca: someone knows MPI?

Uljahn: that's not CG related innit? better ask at

NotForrest: can some1 help me out with a c++ problem real quick

NotForrest: nvm got it

NotForrest: thought substr was the same in java and c++

Default avatar.png RedSponge_b978: hi

struct: grats Zenoscave

1XC: how tf you hide this chat box

etkgjt: click the |> button

Zenoscave: thanks struct

struct: What search are you using?

Zenoscave: negamax no a/b

struct: Nice, top is quite hard

Zenoscave: Yeah might need avx

struct: dbd r uses prob count

Zenoscave: prob count?

waze: hi

Default avatar.png Ravon: du?

waze: wie ghets

Zenoscave: Like just plain statistic?

Default avatar.png Ravon: yeah

struct: probcut*


struct: jace k has Tuples


Default avatar.png Ravon: virus? lol

waze: nien its wiki

struct: Dont think so

Zenoscave: waze warum Deutsch? This is an english channel

Zenoscave: thanks struct

struct: There seems to be a lot of stuff on othello

waze: okey

waze: have a nice day

Default avatar.png HoangThien: Haiit99 ib me