Chat:World/2020-06-26

From CG community
Jump to navigation Jump to search

Hjax: jacek why are you awake

Hjax: i see you submitting to othello

etkgjt: ai là người Việt Nam thì để avatar lá cờ VN đeeee

HDit: !

Default avatar.png css2st: căng

Default avatar.png css2st: =))

TeddyMienTay: kkk

EMG21: i never have to do a recaptcha lul

Default avatar.png tanmaycodernovice: is the site slow today?

Tim_McSim: Hello! :)

Arphnut: Hi!

SleptKing: holla

TyLuu: ae hay onl giờ nào vậy

Default avatar.png Gavster: YO!

TyLuu: hello VN guys

Default avatar.png CodeMonster0214: hello

Default avatar.png CodeMonster0214: what guys

TyLuu: Viet Nam

Default avatar.png JErin: Hello VN


AntiSquid: join #vn for vietnamese chat

AntiSquid: or speak in english on this channel

Default avatar.png CodeMonster0214: ok

no39mz: hello

Default avatar.png Zerp: what heuristics do you guys use in gitc? this is all the info i have access to so far https://www.codingame.com/share-replay/474665606

Default avatar.png Zerp: under gameinfo

WINWINWIN: read the feedback and strategies thread, always a goldmine of valuable info

Default avatar.png Zerp: where is it?

Default avatar.png Zerp: wait i think i found it

Default avatar.png Zerp: were you referring to this page?https://www.codingame.com/forum/t/ghost-in-the-cell-puzzle-discussion/2644/33

Astrobytes: Zerp: https://www.codingame.com/forum/t/ghost-in-the-cell-feedback-strategy/2634

Default avatar.png Zerp: just found it through google xd

Default avatar.png Zerp: oh wow, didnt know you had to add a extra turn for every factory in the shortest path

Default avatar.png Zerp: makes a huge difference

Default avatar.png Zerp: makes finding shortest path a bit more complicated though

Default avatar.png Zerp: not sure if it's enough to add a +1 in here

Default avatar.png Zerp: dist[i, j] > dist[i, k] + dist[k, j] + 1

caubeloatchoat24: Hello how to choose game mode in public game bro. Help me :(( . Hate Shortest :((

Uljahn: game mode is random

Uljahn: but you can choose the game mode in private clashes

Default avatar.png Zerp: just spend so much time fixing bugs and adding new features yet my new bot cant defeat my old bot that used broken code and random variables xd

caubeloatchoat24: :sweat_smile: Okay mate @Uljahn

Default avatar.png Zerp: shouldnt i be able to do List.Add(object) for a list of objects?

Default avatar.png Zerp: wait nvm it was scope issue

Uljahn: Automaton2000: that's a feature

Automaton2000: didn't know you could have a look at that

Default avatar.png Zerp: automaton2000: shouldnt i be able to do List.Add(object) for a list of objects?

Automaton2000: i am just a beginner

Astrobytes: :D

MSmits: hey Astrobytes

Astrobytes: hey MSmits, how's it going

MSmits: I am still fitting oware params. Looks like I found a version thats anti-Agade :P

Default avatar.png Zerp: didnt automaton use to ping random ppl

MSmits: http://chat.codingame.com/pastebin/4178732d-5891-4eeb-bfcf-9948aeefd9d2

MSmits: for some reason increasing my 1-seed param from 300 to 400 does this :confused:

Astrobytes: Nice! And it's not dreadful against the others either

Astrobytes: lol

Astrobytes: Those damn parameters

MSmits: yeah, i only increased it from 300 to 400, so other values might be better

MSmits: and still have many other params to try

MSmits: so i guess Agade's bot might not actually be better than recurs e or Robo.. it's just how the params are fitted

MSmits: all 3 are good bots

Astrobytes: That they are. I've been concentrating on Othello recently, haven't tried to see which params work against Agad e

MSmits: the only reason i do this is because i have the end game database now. My bot is different, so it needs refitting

MSmits: i wouldnt refit the whole thing just to beat Agade

Astrobytes: I always tweak to see what affects whom in what way, don't necessarily change my bot though

Astrobytes: Gives you a feel for what they're prioritising

MSmits: that takes so much time though, i try not to fit against any specific player, thats why i pick all 4

Astrobytes: Yeah, it's something I do when I'm killing time or bored :P

uvBoss: yelo

Astrobytes: grene

uvBoss: nyone got ideas on how i could use neural network for bot programming ?

uvBoss: xD

uvBoss: anyone*

uvBoss: not using algorithms but neural network

uvBoss: or gentic algorithms would laso be fine

uvBoss: help

Uljahn: yes

uvBoss: lmao tell me then

uvBoss: how do i train??

uvBoss: coz u only play once

Snef: yes

uvBoss: do i adjust the weights manually or something?

Astrobytes: Download replays. Train offline.

uvBoss: and how do i download replays??

Uljahn: GA could be used online with a simualtion

Astrobytes: https://tech.io/playgrounds/53705/contest-tools-and-workflow/introduction

uvBoss: okay

Astrobytes: And yeah, you can use GA online as Uljahn says

uvBoss: omg @Astrobytes

uvBoss: dat link

uvBoss: t so much

uvBoss: ty

tomatoes: and submissions has 100kb limit

MSmits: 100k character limit

MSmits: = 200kb

MSmits: 16 bit per character

MSmits: hi tomatoes

uvBoss: oke ty guys

uvBoss: im trying that now

tomatoes: hello

MSmits: grats on your uttt bot, I submitted yesterday, got goot results vs your awesome bot, but I draw too much vs others

MSmits: goot = good

wlesavo: got bot

tomatoes: have some troubles with O too. thought about trying to make draw from beginning

MSmits: karlis o beats p2 Hard

MSmits: if i try a CG bench against everyone with me as p2, I have about 50% against everyone except karlis o, which will be < 10%

wlesavo: MSmits if you dont mind sharing, i remember you saying random rollouts is bad, can you give a hint of what can be used instead?

MSmits: random rollouts is not bad

MSmits: it just depends on the game

wlesavo: i mean for uttt

MSmits: in uttt they perform quite well

MSmits: ah

wlesavo: oh ok

wlesavo: maybe it was out of context

MSmits: well I prefer blocking and winning moves in the rollout, but it was only a small impriovement and maybe it no longer is, if i test it now

MSmits: I also tested avoiding moves that give the opponent a free move, but that was bad

MSmits: mostly because near the end of the game there is no avoiding it and you'll just play badly

MSmits: though maybe i should try it again, just up to a certain turn nr.

wlesavo: oh thx, that bothered me for a while :slight_smile: i probably heard you taking about another game and just assumed it was uttt

MSmits: probably, I talk a lot

tomatoes: i use only ucb, if no visits yet then parent values as placeholder

MSmits: parent values?

tomatoes: wins/visits

MSmits: mmh but wont that give every child the same value?

MSmits: btw, we were talking about the random part, not the selection

Snef: when you select on child they all hame same parent so same score..?

Snef: one*

Snef: have*

tomatoes: random selection removed

MSmits: ahh ok

MSmits: i just select the first unvisited child

MSmits: i break out of the loop

Snef: ^

MSmits: there is a bias from this ofc

MSmits: but i never found it to matter

wlesavo: from what i know random rollouts should be quite bad in general, because it is basically off policy method whithout accounting for sample ratio, but yeah, not much fast alternatives

MSmits: the problem with uttt is that it doesnt have very good heuristics

MSmits: there are a few, but they arent perfect either and putting them in also slows your sim

MSmits: like the teccles-heuristic. It works great, until late game (20+ plies)

MSmits: if a board is still empty then, you might allow an opponent to send you to a bad board

MSmits: because he has 8 choices to pick from

MSmits: and one of them is going to be bad for you

tomatoes: im using heuristics only as small tips to mcts

MSmits: you mean you have weighted probability?

wlesavo: i think you can use soft heuristics on selection, but not on rollouts

tomatoes: kinda hey, check this, should be fine

wlesavo: for uttt that is

MSmits: tomatoes you mean you have priors in UCB, bonuses for good moves so they get explored sooner?

tomatoes: yes

MSmits: yeah i tried that, some of those do work

MSmits: it's a lot of trial and error

MSmits: wlesavo you can indeed use heuristics on rollouts

MSmits: I do this

MSmits: for a small improvement

MSmits: I have it so that if blocking and/or winning moves are always preferred if they exist

MSmits: blocking and winning being equal in this regard

MSmits: Robo came up with that. It is at most a few % winrate boost, but it worked

MSmits: of course this hinges on you being able to know fast which moves qualify. If you spend too much time calculating, performance drops hard

wlesavo: MSmits well i meant not too complicated, i use smth like that as well, as somebody suggested to increase a probability of such moves

MSmits: nah, probability based random rollouts wont work i tink

MSmits: tried it, was too slow

MSmits: weighted random is hard to pull off

MSmits: anyway, gotta go. Sad to go when we're talking about uttt :(

wlesavo: MSmits i prepopulated pull of possible positions, so there would be twice as much winning moves

tomatoes: i tried probabilities rollouts in othello. better than pure random, but still bad

MSmits: prepopulated?

wlesavo: this way it does not hurt at all

MSmits: why twice as much?

MSmits: do you mean you precalculated an array where you look up if either player has a winning move?

MSmits: and it's twice as much because 2 players?

wlesavo: MSmits for a current miniboard i have possible moves, so the ones that can close it just appear twice in this array

MSmits: ohhh

MSmits: funny way to do it

MSmits: but sure, could work

wlesavo: twice because this way you have smth like discrete probability

MSmits: yeah

MSmits: allright ttyl guys!

Astrobytes: laters

Astrobytes: I'm out for a bit too

wlesavo: gl

MSmits: yay train wifi works. Who's up for more uttt talk :grin:

wlesavo: lol

MSmits: i'm off to visit colleagues house to say goodbye to schoolyear, its almost done now

wlesavo: will next year start remoutedly for you or is it not known yet?

MSmits: should be starting normally. The agreement is that the students dont have to social distance except they have to stay away from the teachers

MSmits: but 2nd wave will change things obviously

MSmits: might be as soon as october

MSmits: i'll still be using some remote learning stuff I have been using though, some of it was an eyeopener

MSmits: like letting students photograph their homework and handing it in so i can quickly see if they're doing the work

wlesavo: yeah, we basically done with self isolation, everything open already, except for boarders, not very long for second wave as well

MSmits: really? seems fast. Russia got a late start on the epidemic

MSmits: The US opened too soon and now they are screwed

MSmits: but maybe it took less time in Russia if the outbreaks were smaller

MSmits: it helps when you can look at other countries and learn from their mistakes

wlesavo: yeah, people tired, and with our mentaility nobody cares anymore, and there is a constitution changing for putin to rule another 2 terms, so the goveerment is interested in pulling that earlier

MSmits: why does he even bother, cant he just let an underling take over for a bit like he did before :P

MSmits: I think most Russians know he is their dictator dont they?

MSmits: they're not stupid

wlesavo: maybe it is not enough for him anymore :slight_smile:

eulerscheZahl: the savior

MSmits: is it safe as a Russian to be critical of the government on media like these? I know in China you cant do that

wlesavo: well some are ok with that, and there is an effective propaganda as well, many people truly believe that he is a savior

MSmits: that doesnt surprise me at all

MSmits: if people are able to follow trump with all of the obvious :poop: he pulls, Putin would indeed be a savior

wlesavo: nah, it is ok while you not posting it on social media, and even if you do nobody cares until you make some troubles. but it can be indeed used against you

MSmits: ok so as long as you're relatively anonymous, it;s fine

MSmits: don't leave your tea unsupervised, just in case

tomatoes: no need to do something to be guilty in russia

eulerscheZahl: we will just interpret some criticism into your lines if you don't praise him

MSmits: hey euler

MSmits: did you also do Othello?

MSmits: maybe just your basic minimax you always do on these board games?

eulerscheZahl: let's go private

Default avatar.png NgonTran: HELLO

MSmits: oh, sure, i dont have that much time though

Hjax: good morning

eulerscheZahl: good afternoon to you as well

Hjax: i got my othello working last night :D

MSmits: cool Hjax

MSmits: minimax also?

Hjax: mcts

MSmits: ohh

MSmits: is it good?

Hjax: its ok, i wrote it in java, so its not quite as speedy as it could be

Hjax: i plan to port it to something faster

MSmits: ahh right

MSmits: they say mcts is inferior on othello

MSmits: havent tried yet so i dunno

Hjax: yeah but i hadnt written mcts before

Hjax: i wanted to try it

Hjax: ive done minimax lots of times

MSmits: weird to start on a game where its known to be bad :P

MSmits: coulda done a uttt, easy sim and you get legend + cp

Hjax: i could still do that

Hjax: i already have the search

MSmits: yeah

Hjax: just need a board representation

MSmits: 10 ints is basic

Hjax: and i wrote one in C++ a while ago, so i can probably port it

MSmits: 9 per board + 1 for bigboard

MSmits: dont save state on node

MSmits: save moves

MSmits: thats about it

MSmits: there are other ways, but this what everyone starts with

Hjax: why is saving moves better?

MSmits: train arriving, gtg hf

Hjax: kk cya

MSmits: sorry 1 more stop lol

MSmits: saving moves hm

MSmits: because your gamestate will be too big to put on every node

Scarfield: you need a large object pool, and the nodes will take up less space if only storing the move.

MSmits: othello is 2x uint64_t

MSmits: uttt = 10x uint32_t, so 2,5x the siz

Hjax: i tried to do the node pool thing people have mentioned

MSmits: moves are cheaply applied

Hjax: and it didnt make my java mcts any faster

MSmits: nah its better for c++

MSmits: node creation becomes a bottleneck when your speed allows you to make millions

Hjax: right now i think im spending most of my time calculating UCT

MSmits: its expensive, try fast inverse squareroot

Scarfield: not doing rollouts?

MSmits: there are some approx roots also some simd functions i think

MSmits: but c++ first

Scarfield: i mean, rollouts is not your bottleneck?

Hjax: my board representation is really fast

Hjax: when i benchmarked it last night, i think rollouts and uct were roughly tied

MSmits: same for me i think

MSmits: a bit more on the rollouts

MSmits: but uct still a minor bottleneck

MSmits: allright thats it gtg for real now.

Hjax: bye MSmits

Scarfield: :wave:

MSmits: bye

Hjax: this boss is something else

Scarfield: are you using fast log, fast sqrt?

Hjax: no i used the normal java methods for sqrt and ln, i was tired and just wanted it to work

Hjax: i definitely can optimize it

Scarfield: for UCT the log is root 10, not ln though

Scarfield: oh wait im wrong

Scarfield: http://chat.codingame.com/pastebin/97401218-8625-421e-ac20-a06631a6ec44

Scarfield: these functions are for C++ but they can be rewritten for java i suppose

Hjax: i wonder how much faster they are than the native java methods

Hjax: ill do some benchmarking later

Hjax: how does your bot work? it beat me a lot last night

Scarfield: for UTTT?

Hjax: othello

Scarfield: vanilla MCTS for both

Hjax: ah so same as me

Scarfield: bit boards, but am not getting many full rollouts, so will try and optimize, or change to minMax at some point

Snef: how much rollout Scarfield ?

Scarfield: 1k ish +/- the first turns (exluding the very first turn)

Snef: oh ok

Scarfield: i expect this should be Much higher

Snef: random rollout ?


Scarfield: yea full vanilla :p

Snef: it should be faster then :p

wlesavo: fix it :slight_smile:

Scarfield: yea, the way i determine legal moves is my bottleneck by far, but still havent had any good ideas for improving. Am close to start searching the net for answers, but like the process of figuring it out :)

Snef: aaah i see

Snef: are you doing them one by one ?

Scarfield: yea

Scarfield: would like to do it faster, but havent figured out da way

Snef: i'm not gonna spoil it then :p

Scarfield: xD

Hjax: ah yeah, mine determines all of the legal moves at once

Hjax: its quite fast

Hjax: Snef i beat you a few times last night :P

Hjax: youre still better though

Snef: Hjax we have same code just with different rollcounts

Snef: ofc you'll beat me :p

Snef: that's same with me and the boss

Scarfield: had a feeling you should be able to do that, might start asking for tips soon :p

Hjax: my rollouts arent super fast yet

darkhorse64: Scarfield: google "bitboard methods for games". It has been shared multiple times on this chat so it's not really a spoiler

Snef: darkhorse64 i think he said he like to search by himself first

Hjax: darkhorse64 your boss beat me up and took my lunch money

Scarfield: sure ty

Hjax: i went like 0-12 vs it

tomatoes: yea, very nice pdf

Hjax: ive never read this pdf, but i think i know how to bitboard

darkhorse64: Sometimes, you get by with a little help from your friends

Snef: well it's not that hard, you just need to get into it :p

Hjax: right now i get about 7000 rollouts on the second move, but my search was kind of thrown together last night when i was tried

Hjax: i think i can optimize it a lot

Hjax: tired*

darkhorse64: Honestly, this is a nice introduction (a bit outdated though) and it's not like your bot writes itself after that

Scarfield: you should beat my bot then, about 7x fster

Hjax: i had a bug for a while last night where i forgot to reverse the scores i was propagating up the tree

Hjax: somehow it was still playing decently

darkhorse64: I got interested in bitboarding when doing bandas

Hjax: which i found very confusing

darkhorse64: mcts debugging is difficult

Scarfield: yea bandas was what got me started as well, but othello is not as straight foreward i think

Default avatar.png tanmaycodernovice: @ludowsky hey bro

darkhorse64: finding what pawns you can push vs what pawns are surrounded is not that different

Hjax: i still have a bunch of improvements i can make, mcts solver, tree reuse, optimization

Hjax: not sure if all of those things combined will put me above the boss

Snef: i think it'll

Scarfield: yea i remember you mentioned that, never improved my bot from a loop there either xD

Hjax: what are you doing right now Snef? do you have tree reuse?

Snef: Hjax no

Snef: i haven othin but basic mcts

Snef: nothing*

Hjax: i see

Snef: i want to get to 40k roll out before

Scarfield: thats a nice improvement though, and you can get the opp moves as input, so much easier for othello

Snef: but i don't feel motivated rn

Hjax: i also need to clean up my code a lot

Hjax: theres a lot "i want it to work before i sleep" code in there

Hjax: because i really wanted to get something submitted last night

Scarfield: thats basicly my whole UTTT code xD

Shagufta_Siddique: is there anybody else who can help me

Shagufta_Siddique: i need to solve the puzzle how time flies by c++ , its my project but dn't know how to solve it ,please if someone can help me

Uljahn: jeez, Automaton2000

Automaton2000: how can i share my code

TyLuu: the same name with my boss

TyLuu: sorry. mistake group

Scarfield: lol have checked the pdf, the legal moves for othello seems so obvious after reading it

darkhorse64: The boss awaits

Hjax: the boss is a a monster

Hjax: 100% winrate against me right now

Astrobytes: Hi Hjax, got it working I see :)

Hjax: i did!

Hjax: its not super optimized yet, only getting about 6k rollouts on turn 2

Hjax: mostly because my UCT isnt fast

Astrobytes: Well that's the toughest part out of the way at least! Precalculating?

Hjax: precalculating what?

jacek: yes

Astrobytes: sqrtLog and invSqrt

Hjax: ah im just using the native java methods for now

Astrobytes: Precalc will help a lot

Hjax: i just wanted it to work so i could sleep last night

Astrobytes: lol, cleanup time

Hjax: yep

jacek: to be frank from my quick tests, othello is one of those games that dont really benefit from mcts solver

Hjax: ive seen a few games where my bot just gets eliminated while reporting a 25% win chance

Hjax: solver would at least prevent those dumb losses

Hjax: tree reuse will be a much bigger gain for me

darkhorse64: Against the biggies, the game is decided between move 30-35.

darkhorse64: Usually in 4 plies, my eval drops from 50% to 5%

Hjax: how would i recompute the sqrt part? isnt there too many possibilities?

Hjax: precomputing the log part is straight forward

darkhorse64: There is no consensus. I don't do that

darkhorse64: because it means huge table, overflows check

tomatoes: rsqrt should be a bit faster

darkhorse64: Yes

struct: Hi

AntiSquid: hi

Astrobytes: Hi

jacek: :B

Astrobytes: That's a new one