Chat:World/2022-01-30

From CG community
Jump to navigation Jump to search

Alex139: AMONGGUS

ninjadip: is there a hotline for stressed coders

ninjadip: to keep them from formatting all their drives

Dren: I don't think they would ever make one

Dren: the queue to get to talk to someone would just make things worse

ninjadip: maybe writing the code for the customer service queue would help relieve me lol

ninjadip: haven't used a good list in a while

MrZee: I rely on lists a bit too much I think lol

ninjadip: i'm an array for a known size and vector for dynamic

ninjadip: but it's nothing big

ninjadip: i love a linked list though

Wontonimo: i just learnt the trick of deleting from the middle of a fixed array, so long as you don't care about order

Wontonimo: swap the last element with the one you want to delete, and keep track that your 'valid' list size is one less

struct: delete and move the other elements?

struct: ah I see

DaNinja: list[i] = list[--size] ?

Wontonimo: i was like "omg, i've been programming for 25 years and why am i only seeing this now?"

Wontonimo: yeah, that's a really nice short form DaNinja

Wontonimo: but i think it is off by one

struct: why?

Wontonimo: list[i] = list[--size-1]

struct: no

struct: -- decrements first

Wontonimo: oh, no, you are right!

Wontonimo: i haven't used it yet. maybe it'll speed up my uttt bot

struct: why would you need this on uttt?

Wontonimo: children i want to prune

struct: I see, I dont this at all

struct: you use mcts too right?

Wontonimo: ah... nope. a quick scan of my code and there is no good way of pruning without redoing the architecture

Wontonimo: yeah MCTS

struct: there must be some tricks for uttt

struct: im not aware of yet

struct: also there must be a few way to make my mcts faster

Wontonimo: oh, i see a possible optimization now that i was looking for a place to use the delete from list

Wontonimo: it wasn't a delete from list

Wontonimo: here i go ! Was 35th

struct: did you submit?

Wontonimo: yup

Wontonimo: not a bad start

Wontonimo: it wasn't a huge improvement

struct: here is my bot with rollouts if you want to check

struct: https://www.codingame.com/replay/605729988

Wontonimo: to speed, so probably won't change my rank much at all

Wontonimo: outch, you crushed me

Wontonimo: it's pretty late here. i'm going off to sleep

struct: gn

struct: i have to go to sleep to

struct: 5:38 am

Wontonimo: it was a fun day of catching up ! see ya later

Wontonimo: gn

Lambert_W_Function: aw

DaNinja: gn

Lambert_W_Function: gn mods

C26_1: Hello everyỏn

C26_1: everyone*

C26_1: Can I ask something?

C26_1: Which in of these are better in calculating data: Excel or SQL

5DN1L: You can google to find comparison between the two. For example this one: https://sqlspreads.com/blog/sql-and-excel-why-you-need-both/

C26_1: ok

C26_1: I've read that comparision post that @5DN1L gave to me, and I have somethings I want to say

C26_1: Excel didn't have any variable in Formula Bar

C26_1: So it's hard to debug

C26_1: Except if you want to do some coding then yes, Excel has VBA

C26_1: =IF((F3-E3)<INDEX($I$18:$M$21,MATCH(RIGHT(D3,1),$H$18:$H$21,0),MATCH(LEFT(D3,2),$I$17:$M$17,0)),F3-E3,INDEX($I$18:$M$21,MATCH(RIGHT(D3,1),$H$18:$H$21,0),MATCH(LEFT(D3,2),$I$17:$M$17,0)))

C26_1: This is an example of a formula in Excel

5DN1L: keep it brief, don't flood the chat

C26_1: Notice that I use INDEX($I$18:$M$21,MATCH(RIGHT(D3,1),$H$18:$H$21,0),MATCH(LEFT(D3,2),$I$17:$M$17,0)) in both comparision test and value return if the condition is false

C26_1: If I can use variable in Formula Bar then of course it'll cleaner

C26_1: That is one of the major problem for Excel Beginners

5DN1L: C26_1 keep it brief please.

C26_1: ok

5DN1L: in Excel every cell is a variable

5DN1L: and you can name cells and ranges to make things a little bit clearer

rendermanGL: SQL for sure.

5DN1L: Automaton2000, learn about critical thinking

Default avatar.png Automaton2000: ok i suck at them

jacek: thats what she..

5DN1L: You've grasped every opportunity...

5DN1L: Thank goodness no female coders here say they feel harassed

5DN1L: or offended

jacek: is Automaton2000 offended?

Default avatar.png Automaton2000: jacek what have u done

jacek: :scream:

5DN1L: tsk tsk tsk

Melting_Ice: hi, is anyone from UK here?

CARNAG: me

Default avatar.png skityperi: hey haw to learn basic on python

5DN1L: https://letmegooglethat.com/?q=haw+to+learn+basic+%20on+python

Default avatar.png skityperi: tnx

5DN1L: you're welcome

jacek: maybe he asked for basic interpreter on python

jacek: is Automaton2000 written in basic?

Default avatar.png Automaton2000: i think my sim is correct

Default avatar.png emergenitro: hello

Yass-is-in: guys anyone has a java roadmap


5DN1L: https://letmegooglethat.com/?q=java+roadmap

5DN1L: yeah, jacek, maybe he did want to learn basic on python :upside_down:

jacek: nyoro~n

jacek: Automaton2000 kree java!

Default avatar.png Automaton2000: you know your code is just not good enough

Default avatar.png xlr4829: cout >> "Hello World"

jacek: umm

MSmits: cout << "Hello World" << endl;

MSmits: you're welcome

jacek: it clearly cures cancer https://www.youtube.com/watch?v=rTZGtIoByTg

MSmits: Japanese rickroll?

jacek: :smirk:

struct: hi

Default avatar.png kayos: :)


Default avatar.png sonumohib: Wth did I just watch

struct: you are asking me?

jacek: i think its an open question

Default avatar.png Mehmetvv: hi

jacek: good evening

Default avatar.png Mehmetvv: you too

Default avatar.png Mehmetvv: But in our contry it is 19:39 I guess it is not evening

smart_pointer: hello

Dren: ? isn't it evening after like 6

jacek: Automaton2000 what time of day is it

Default avatar.png Automaton2000: so i do not know how to deal with all the stuff in the ide

Default avatar.png saeed50050: i don't understand battel's questions

Dren: what do you mean

5DN1L: Automaton2000 do you know someone called battel?

Default avatar.png Automaton2000: mind if i use my own code

jacek: MSmits the shape is pretty isnt it https://preview.redd.it/cvudmi2gnue81.jpg?width=4032&format=pjpg&auto=webp&s=1af0d4f2efe9e5802eb0a82be426c7afad8c942b

imshy: suop

Default avatar.png JayBe: Hi. Where can i find the puzzle of the week?

MACKEYTH: Ugh, I am having an embarrassingly hard time getting out of the Wood league in Ultimate TTT 😩

5DN1L: JayBe Under notifications

jacek: wood?

MACKEYTH: Yes. I've got some logic error in my minimax approach that is making my algo miss losing moves.

jacek: doint MCTS?

Default avatar.png chneery: im new

jacek: ahh

Default avatar.png chneery: well im in level 3

jacek: so it was minimax bugs in atari go then?

Default avatar.png chneery: what

jacek: hello

Default avatar.png chneery: um are you real

Default avatar.png chneery: or not

5DN1L: imagine we're real

Default avatar.png chneery: no i mean are you online

Default avatar.png chneery: because im a hacker

Astrobytes: ahh cg chat

Default avatar.png chneery: im not a hacker

5DN1L: i'm a mod

Default avatar.png chneery: im just pranking

5DN1L: i don't tolerate spam

jacek: how Automaton2000 is real if our eyes are not real?

Default avatar.png Automaton2000: if you mean it was a contest

MACKEYTH: No, my Atari Go minimax seems to be working as designed. Although it suddenly started playing suicide moves in Wood 3 for some reason. Sigh.

Default avatar.png chneery: ok but are ypkejcdhvpfjhg89perbgvureihpbpgurep

5DN1L: first warning

5DN1L: next time you're kicked out

hashluk: How do I debug procces has timed out in python?

5DN1L: chneery

Default avatar.png chneery: ya

Default avatar.png chneery: im sorry

jacek: MACKEYTH it chooses losing move despite there are non-losing ones?

Astrobytes: either a scoring bug or sim bug

Default avatar.png chneery: :sob:

MACKEYTH: Yeah, and I don't know how it's doing it. It should be catching and ignoring all suicide moves during game tree generation.

jacek: minimax even without eval (only win = INF and lose = -INF and rest 0) should be able to avoid those

Default avatar.png chneery: :sob:

5DN1L: chneery if you don't have better to say please keep silent

Default avatar.png chneery: :sob:

Default avatar.png chneery: are you a real mod

5DN1L: are you testing my patience?

Default avatar.png chneery: umm why

5DN1L: i give you some time to think

5DN1L: you now know i'm a real mod

Default avatar.png chneery: but i want to be mod to

Astrobytes: :rolling_eyes:

5DN1L: either useless kick or very laggy chat

Default avatar.png chneery: you see im not at good a coding my dream is to become a master of coding and make a own websit and games

Astrobytes: sometimes doesn't work for reasons unknown 5DN1L

5DN1L: sigh Astrobytes

Default avatar.png chneery: but im a noob

Astrobytes: yeah :|

jacek: those canadians eh

5DN1L: should let canadian mod to deal lol

Default avatar.png chneery: ok but how you become a mod

5DN1L: chneery you need to level up

Astrobytes: by behaving yourself

5DN1L: chneery you need to level up a lot

5DN1L: i mean a lot

Default avatar.png chneery: to witch level

5DN1L: to wizard level

Astrobytes: Level up so much that Boris Johnson releases a white paper on you

5DN1L: lol

Default avatar.png chneery: ok but im in level 3

5DN1L: you'd better solve lots of puzzles here to level up

Default avatar.png chneery: ok but level is the wizard level

5DN1L: you'll know when you reach that level

Default avatar.png chneery: i dont know

5DN1L: because you haven't solved enough puzzles

Default avatar.png chneery: i started to play code game

Default avatar.png chneery: ok but how much puzzles

5DN1L: hundreds

Default avatar.png chneery: like 500

Default avatar.png chneery: or 900

5DN1L: let's see, i've solved more than 400

Default avatar.png chneery: like what 700

5DN1L: say 400 ok?

Default avatar.png chneery: 400

Default avatar.png chneery: i said 400

Default avatar.png chneery: so want

Default avatar.png chneery: i mean what

5DN1L: now go and solve some puzzles

5DN1L: if you spam here i'll kick you out or even ban you

Default avatar.png chneery: i click the help buttion and it sai type /

Default avatar.png chneery: hello

5DN1L: link to puzzles is here: https://www.codingame.com/training/easy

5DN1L: go there

Default avatar.png chneery: ok

Default avatar.png chneery: i did

5DN1L: solve some puzzles in silence

5DN1L: hope it works this time

Default avatar.png chneery: i did not i dont know the code

Default avatar.png chneery: im dumb

Default avatar.png chneery: im just a noob waaa

Default avatar.png chneery: why me

5DN1L: a noob should learn the basics on another website, not here

Default avatar.png chneery: so that means you are baning me

Default avatar.png chneery: noooooooooooooooooooooo

Default avatar.png chneery: waaaaaaaaaa

5DN1L: i didn't plan to ban you

Default avatar.png chneery: ok

5DN1L: but if you continue to act so dramatic like this

5DN1L: i'll have a thought about it

Default avatar.png chneery: can it be a another way

Default avatar.png chneery: or not

5DN1L: if you wanna learn coding, look for a website to do so

Default avatar.png chneery: but i dont know wich website

Default avatar.png chneery: but can i do commands

5DN1L: and your dream is to become a master of coding and make your own website and games???

Default avatar.png chneery: ya and be a admin

5DN1L: then do research on how!!!

Default avatar.png chneery: how on what

5DN1L: nobody's gonna help you if you can't help yourself

5DN1L: research on where to learn coding, how to make your dream come true

Default avatar.png charanvir: ok

Default avatar.png charanvir: like what i know hour of coding but is boring

Astrobytes: aw do one will ya

Default avatar.png charanvir: i whant to know javascript

Default avatar.png charanvir: but can i try the commands

Default avatar.png charanvir: im leaving

5DN1L: bye, come back when you've learned the basics and learned how to research

e_fishel: ^

Default avatar.png charanvir: no i did not found a coding think

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

Default avatar.png charanvir: but i just want to be a moderator

MACKEYTH: Hah, found the problem. Wasn't identifying won board configurations correctly.

5DN1L: you need some more time to think over things properly chneery

Default avatar.png charanvir: is not chneery

Default avatar.png charanvir: its charanvir

MACKEYTH: There's that debugging feeling again. "How did this ever work at all?"

Wontonimo: lol

5DN1L: thanks for telling me you've changed the name while the chat doesn't show it

5DN1L: kicked

Astrobytes: MACKEYTH: don't worry, I wasted an hour earlier only to discover my bot was missing the er, while (true) { ... } loop :P

Wontonimo: lol

Wontonimo: i was going to say, who's "charanvir" ?

5DN1L: sigh

Wontonimo: i've found clicking on their name and refreshing their profile page helps

5DN1L: too lazy to do so as it's not that frequent lol

5DN1L: kicked that person just moments ago using the old name

MACKEYTH: Ok, Bronze League, here I come, hopefully.

Wontonimo: what are you playing MACKEYTH ? puzzle of the week?

MACKEYTH: UTTT

Wontonimo: nice

Wontonimo: what algo are you using? minimax, MC, MCTS, GA, ?

MACKEYTH: Nertz. Still losing sometimes. :(

MACKEYTH: Going to use MCTS ultimately, but doing minimax to get to bronze.

Default avatar.png charanvir: i did it

Default avatar.png charanvir: i finsh a puzzle

Wontonimo: are you using bitboarding or planning on using bitboard?

Default avatar.png charanvir: no im not

Wontonimo: not you chneery

Default avatar.png Ahmed2k1: hi

5DN1L: charanvir Wontonimo

Wontonimo: talking to MACKEYTH who's a *real* programming :rolling_eyes:

MACKEYTH: I've never used bitboarding before, was planning to store the board as an int array.

MACKEYTH: Do you think bitboarding it would offer a speed advantage, or just save space?

Wontonimo: can I share a 3x3 tic tac toe bitboard with you that uses MC ?

jacek: i store mine as 10 bitboards - 9 smalls and 1 main

Scarfield: Bitboarding is king, once you get into it its quite fun fiddling with imo

Wontonimo: it is able to compute 200,000 complete playouts in 100ms

jacek: bitboard is mostly at least 1 order of magnitude faster

MACKEYTH: That's impressive.

MACKEYTH: Yeah, I'd like to see the example.

Wontonimo: here you go https://tech.io/snippet/LiWPxTS

Scarfield: https://eprints.qut.edu.au/85005/1/__staffhome.qut.edu.au_staffgroupm%24_meaton_Desktop_bits-7.pdf

Wontonimo: it may not be in the language you use , but i'm sure you can get the gist of it

Scarfield: my link is not an example, but a good explanation of how to use bitboarding

Scarfield: also hi folks

Astrobytes: Bitfield

Scarfield: Astrobites

Wontonimo: thanks for the link Scarfield!! I've saved it off and will share

Scarfield: np its quite nice to get the idea

Astrobytes: very useful paper that, but only when you get the basics down

MACKEYTH: Shouldn't be a problem. I can read C++ pretty well, but don't know it well enough to write in it.

Default avatar.png charanvir: hi

Default avatar.png **charanvir slaps around a bit with a large fishbot

Astrobytes: can someone put that out of its misery

Default avatar.png charanvir: guys you can use commands

Scarfield: slap the bass, not the fish

Astrobytes: haha, fish... bass...

Scarfield: xD

5DN1L: one more warning, charanvir, next time you mess around here, you're banned

jacek: who?

Default avatar.png charanvir: sorry

Default avatar.png charanvir: pls

Default avatar.png charanvir: no

5DN1L: just stop it charanvir

Default avatar.png charanvir: ok

Scarfield: autocomplete is not the correct name 5DN1L, but he got the message :)

Default avatar.png charanvir: but what can i do

5DN1L: chat isn't showing the most updated name

Dren: yeah

5DN1L: that person's profile is

Scarfield: oh, my b

5DN1L: no worries

Default avatar.png charanvir: i wish i can be moderator

5DN1L: don't repeat yourself

Default avatar.png charanvir: but is not going to happend

Default avatar.png charanvir: :sob:

MACKEYTH: Oh, doing bitwise comparisons against a library of winning boards is a good idea. I bet that's fast.

Scarfield: Astrobytes do you know davie504 on youtube?

Astrobytes: Scarfield nope

Astrobytes: bass player?

Scarfield: i think you will like his "bass slapping", he is a sick bass player, but his videoes has a lot of filler material though

Astrobytes: all good, I can skip those parts, noted for later :)

Shadur: it does get repetitive over time.. same editing, same type of jokes, but as a bass player his top notch

Scarfield: https://youtu.be/ZOiAZlAK3ZE?t=297

Scarfield: yea i skip everything but the playing pretty much

MACKEYTH: I wish CG supported multi-threading. I'd like to get more practice writing parallel code.

Scarfield: +1

Astrobytes: you can always make a local arena using as many threads as you like ;)

Scarfield: true, never thought of that lol

Scarfield: trying to get myself into finally learning NNs, would probably be a good time to learn about multithreading the same time i suppose

jacek: getting into hype wagon?

Scarfield: thinking about it at least, gonna do it eventually, but havent been much on cg lately

Wontonimo: MACKEYTH , the code example uses MC, not MCTS. If your UTTT bot is optimized enough then MC is good enough to get you to gold

Wontonimo: For Spring Challenge 2021, MC got my bot to Legend. It isn't the strongest search in town but it is dead simple to code

Wontonimo: and the code is reusable for implementing MCTS

MACKEYTH: I haven't messed with my Spring 2021 bot since I got it to silver. It was my first MCTS.

MACKEYTH: No, wait, that was my Fall 2020 bot. My Spring 2021 bot was if-then. Made it to Gold, though.

MACKEYTH: How is MC different from MCTS?

Astrobytes: flat vs building a tree

Astrobytes: you don't build and use a tree with flat MC, you do with MCTS

Astrobytes: since you need the node stats in MCTS

MACKEYTH: MC just tries random playouts and remembers the best one?

Astrobytes: yep

MACKEYTH: Incroyable. I can't believe that works. Seems like it would be prone to picking unlikely wins from largely negative game states.

Default avatar.png charanvir: 24x2=48

5DN1L: coming back with spam doesn't look good

5DN1L: time to ban for good

Wontonimo: good call

Astrobytes: :tada:

Astrobytes: Wontonimo: the intro to ML video you posted for struc t last night was really well done, great example

Wontonimo: oh, thanks

MACKEYTH: I'm still trying to figure out how to get some control over Java garbage collection.

Scarfield: what link? :innocent:

Wontonimo: i didn't have a script for the last bit about minimax and just winged it. blekgh ... didn't really turn out.

Astrobytes: doesn't matter, the important parts were clear as day

Wontonimo: https://www.youtube.com/watch?v=wUPFOFbCeFI

MACKEYTH: My Atari Go 9x9 bot showed a huge amount of variation in how far ahead it could build its tree;

Scarfield: wait, this is your video?

Wontonimo: yeah

Scarfield: cool!

Wontonimo: :grin:

MACKEYTH: I can confirm that making all your variables global is _bad_.

Scarfield: subbed ;)

Wontonimo: wow, my 3rd sub! you and my two kids :tada:

Scarfield: xD

Scarfield: it says 73 subs though, mr. humble :p

Wontonimo: :O

Wontonimo: i haven't posted for a year

Astrobytes: and I subbed this morning

Astrobytes: no, this afternoon

Scarfield: soon to surpass pwediepie

Astrobytes: :rofl:

Scarfield: pew pew

Scarfield: hmm you dont sound canadian :thinking:

Astrobytes: yes he doesss

Wontonimo: really?

Astrobytes: listen for aboot

Scarfield: xD

Wontonimo: har har

Astrobytes: no shame in that, us Scots say aboot too

Astrobytes: oot and aboot in ma boat

Wontonimo: we say sorry a lot. it's no joke. When Canada takes over the world the everybody will be sorry

Wontonimo: *then

Scarfield: you, for one, have a pretty thick accent astro :p

Astrobytes: lol thanks :rofl:

Astrobytes: lol Wontonimo, we do it here too

Astrobytes: perhaps not quite to Canadian level but still high

Scarfield: have you used ML on CG wonto?

MACKEYTH: ML?

Wontonimo: Machine Learning

Wontonimo: nope, not yet Scarfield

Scarfield: rgr

Scarfield: cool video though :)

Wontonimo: I did play around with trying to learn position weights for UTTT. It didn't help that I could find.

Astrobytes: probably more 'user-friendly' games to try other than UTTT

Scarfield: ^

Wontonimo: absolutely

justchris: im trying to do connect-4 with ML

justchris: in javascriåt

justchris: javascript

justchris: im ML absolute beginner

Scarfield: javascriåt :scream:

struct: the connect 4 here?

struct: or just a side project?

Wontonimo: what ML are you using? NN, random forest, ?

justchris: on here

justchris: brain.js

justchris: NN

justchris: i have an ambition to replicate a very simple version of AlphaZero but maybe I can't do it

justchris: did u guys use Monte carlo tree search?

Wontonimo: cool. CG (this site) does not support multithreading or GPU btw

struct: yes

Wontonimo: yes

Astrobytes: yes

justchris: do u have any recommendations on puzzles/bot game to learn MCTS?

Wontonimo: (anyone with a bot in Legend in Ultimate Tic Tac Toe used MCTS)

struct: c4

Wontonimo: yeah, Connect 4 is a good suggestion

struct: or just try it on normal tic tac toe

justchris: maybe i should do it first with MCTS then try to improve with ML

struct: its easy to tell if its working or not

Astrobytes: most of the simpler board games tbh

Astrobytes: yeah TTT

justchris: i made a working XOR that works in the CG IDE

justchris: in 200 lines

Wontonimo: try using your bains.js on Mad Pod Racing !

justchris: (if any js coders wanna talk)

justchris: yeah but that will probably take a few more months to do

justchris: optimistically

Wontonimo: something some people here have had some success with is using a NN to estimate the value of the board for one player. Combine that with minimax and you'll probably do really well

justchris: on c4?

Wontonimo: iin general

Astrobytes: many board games including c4

justchris: cool, will look it up

justchris: thanks

Wontonimo: there are two really good articles here on CG about getting started with NNs on this platform https://tech.io/playgrounds/b51fdf068b6dce96d27cc71eb133ffe113695/neural-network-xor-example-from-scratch-no-libs and https://github.com/marchete/Mokka

Wontonimo: ?? wrong link for the 2nd

justchris: yeah what i did is pretty much the same as the XOR

justchris: i followed ur suggestion from last time and tried to tackle a more simple problem

justchris: now i feel that my lack of understanding MCTS(and Minimax) is holding me back

justchris: what are you guys working on?

Astrobytes: 2048

Wontonimo: a roguelike

Wontonimo: and getting feedback for WFC

Wontonimo: trying to make it a more approachable puzzle

Astrobytes: shazbot, I forgot about the roguelike code, well, I have plenty time

Wontonimo: is that a Starbuck reference? that little robot thing that was so stupid

Astrobytes: nah, Mork & Mindy

MACKEYTH: I'm working on an item identifier tool for Nethack.

Astrobytes: aw nice!

MACKEYTH: I've been doing it by spreadsheet for a while, but it's kinda tedious.

Astrobytes: Yeah, automate the boring stuff. Especially if it involves spreadsheets

MACKEYTH: Any other Nethackers here?

Astrobytes: long time since I played that but there are bound to be a few, programmers and rogeulikes go hand-in-hand

Astrobytes: probably find a few people on the discord

MACKEYTH: I just lost a good run last night to carelessness

MACKEYTH: Kraken drowning.

ASM_MOV_INT: they ever consider a dark mode for this website...

MACKEYTH: ??? What would you make darker?

Astrobytes: you know you can set the theme using the settings below this chat right ASM_MOV_INT?

ASM_MOV_INT: chat is great

ASM_MOV_INT: it's the white screens... it's not a problem i regularly use a partially transparent powershell window for non-dark mode websites like this one

MACKEYTH: D'oh. I didn't know that was there, Astrobytes

Astrobytes: ;)

ASM_MOV_INT: one great feature they added to windows 10 a while back was, just hovering your mouse over a window, turns the scroll focus on the tab, window or whatever you hover over, thus I don't need to take the focus away from my powershell transparency window to scroll underneath it

Wontonimo: new puzzle of the week is ascii

Wontonimo: hehe, i like it

Wontonimo: and i've been playing with rasterization and shaders

MACKEYTH: Ok, step 1 complete. I have a UTTT bot that will play randomly and uses bitboards;

Wontonimo: woot!

Wontonimo: MACKEYTH did the win condition check make sense?

MACKEYTH: Yep. Made a constant array of winning bitboards, then check to see if board & template = template

Wontonimo: for the 9x9 board I actually store 9 3x3 boards for the small subboards, and 1 3x3 board that stores the overall

MACKEYTH: Same

Wontonimo: cool

MACKEYTH: Great minds, eh? :)

Wontonimo: oh wow, my "small" performance improvement yesterday for UTTT moved me from 35th to 30th

MACKEYTH: What did you change?

Wontonimo: during expand i used to check every move in 9x9. i added a test to see if the move is forced and if so then only check the 3x3 forced into

Wontonimo: seems dumb that i didn't optimize that before. guess i just forgot about it

MACKEYTH: Looks like a lot of coders got to bronze and gave up. I'm winning about 50%

Default avatar.png Jayarrowz: :)

Wontonimo: yeah, that happens in multis where the rules change

Wontonimo: looks like no. 1 in Bronze has a score of ~31 vs your bot ~23

Wontonimo: 4 points difference is i think 9:1 win/loss, whereas 8 points difference is more like 99:1 or more win/loss

MACKEYTH: Jeez, how many games does ReCurse have #1 in? The dude is fierce.

MACKEYTH: Like mutant superpower fierce.

Wontonimo: he burnt himself out doing it ;(

MACKEYTH: Aww, he's not active anymore?

Wontonimo: it would be nice to see him back and loving life, sharing knowledge

MACKEYTH: ++

Wontonimo: he had a baby just after SC2021 which was also a culmination of a few years of NN work he put in at CG to try and get to the top before NN on CG was cool

Wontonimo: and that was the last multi contest, so actually a lot of people slipped away

Wontonimo: sadly, that was my first multi contest and probably last

Wontonimo: so, what's the next thing in your bot?

Wontonimo: can you add MC to your current bot MACKEYTH ?

MACKEYTH: I'll give it a shot

Wontonimo: did MC make sense?

Astrobytes: didn't you have a playground for that Wontonimo?

Wontonimo: no. just a tech.io snippet

Astrobytes: ah right

MACKEYTH: I think so. Like MCTS, except you're just running random playouts from all possible initial moves and counting the wins for each?

Wontonimo: exactly

Wontonimo: you can sub random playouts with a probable heuristic playout, but for UTTT random seems to work best.

Astrobytes: UTTT is notorious for a lack of reliable heuristics

Wontonimo: ^^ +1

Default avatar.png p.p.o.p.: Hi chat! Question about my code. This is something that I have been running into repeatedly here. I assign initialize a variable without a value, then give it a value somewhere else. This works in Unity (using same language), where I started coding. Here it tells me it hasn't been assigned. It doesn't feel "proper" to assign it some silly value that I know will be changed.

Default avatar.png p.p.o.p.: http://chat.codingame.com/pastebin/9a07d4a8-747c-4662-aed7-2f25ea55f448

Default avatar.png p.p.o.p.: http://chat.codingame.com/pastebin/86ae787f-01f0-43ae-9b37-a49233dfd2ff

struct: its just a warning

Astrobytes: and what happens if you accidentally use the value of an uninitialised variable? :)

MACKEYTH: That throws an error in Java.

Default avatar.png p.p.o.p.: no but i do initialize it. In the for loop

Default avatar.png p.p.o.p.: which works in unity and is what the book I am reading says to do

struct: compiler wont know if the surfaceN will be greater or equal to 1

struct: so safeLandingMinX could be unitialized

Default avatar.png p.p.o.p.: oh i see

Default avatar.png p.p.o.p.: so what is best practice there

Default avatar.png p.p.o.p.: ?

struct: maybe initialize with 0

Default avatar.png p.p.o.p.: okay. That's what I've been doing but for some reason that felt wrong

Default avatar.png p.p.o.p.: thank you!

Default avatar.png Ceekay77: This made the Embedded C in me twitch lol

MACKEYTH: MC UTTT bot in the arena

MACKEYTH: Beat Bronze. :)

Astrobytes: nice one MACKEYTH, good luck :)

MACKEYTH: I'm only getting a few hundred sims, though. Not good at all.

Astrobytes: should be getting more for sure

Default avatar.png ionKOT: An integer H, the height reached by the ball after the sixth rebound.

Default avatar.png ionKOT: whats the math guys

Default avatar.png ionKOT: CONSTRAINTS: 1 ≤ H ≤ 10000

MACKEYTH: Depends on the elasticity of the ball and the surface

Default avatar.png p.p.o.p.: Seems like if it is an integer it wouldn't be that complex MACEYTH maybe the simulation you are doing has some details?

MACKEYTH: Thought experiment: beanbag bouncing on pillow vs ball bearing on steel plate. Very important

Default avatar.png ionKOT: lol

Default avatar.png ionKOT: input 5

Default avatar.png ionKOT: ourput 320

Default avatar.png ionKOT: how did it get 320

Default avatar.png p.p.o.p.: haha definitely, but I'm guessing if they are asking for an integer H then it is not trying to match real world physics and is more like: Each bounce the ball loses x amount and you have to calculate the number of bounces for h to get to zero and add up each of those bounces

Default avatar.png ionKOT: clash code a little to advance for me

MACKEYTH: How in blazes is Wontonimo getting 200k sims? I must be doing something terribly inefficient

Default avatar.png ionKOT: where is the learning side

Wontonimo: hey MACKEYTH,

Wontonimo: that was just for 3x3 tic tac toe

MACKEYTH: Oh, whew. Less panicked now.

Wontonimo: for UTTT my bot does 90k to 120k

Wontonimo: it was a HUGE accomplishment when I passed 20k rollouts per turn. That's the generally agreed level you need to reach to beat the Gold bot

Wontonimo: how many sims can your bot do in 100ms?

MACKEYTH: I had to cut it off at 50ms to keep it from timing out.

Wontonimo: java right?

MACKEYTH: Yeah

Wontonimo: don't use the garbage collector

Wontonimo: so, don't let go of objects

Wontonimo: you have 700Mb or ram per game. you don't need to clean up RAM for the next game

MACKEYTH: IDK how to turn off Java garbage collection, if it can even be done.

Wontonimo: easy, don't let go of data

Default avatar.png 5922: keep an active reference

Wontonimo: pre-allocate and reuse lots of stuff

MACKEYTH: I have tried that, and it actually seems to make things worse

Wontonimo: for example, I have 1 board that is global the I reuse for every rollout. I don't allocate a new one ever

MACKEYTH: That's probably a time sink that I could tackle. I'm creating a new map for each possible move

Wontonimo: a java profiler will really help you identify where time is being used

Wontonimo: there are two "heuristics" that have been identified for UTTT. 1st - if you are the first to play the play in the very center

Wontonimo: 2nd - if you are first to play in a miniboard, play such that your opponent has to play in the same board.

Default avatar.png ionKOT: what are these questions mannn

Default avatar.png ionKOT: gott dam

Mishaaargh: ugh is there a round equiv for c++? ceil didn't work for me and including <cmath> didn't work

MACKEYTH: math.h, round

Mishaaargh: thank you i'll try that next time. so frustrating

MACKEYTH: Remember Google

Mishaaargh: thanks i tried that

Mishaaargh: and it told me to include cmath

Mishaaargh: in 2022 tellin people to google is pretty pointless