From CG community
Jump to navigation Jump to search

Default avatar.png Nukelets: yikes

mzbear: as a test, i reversed the win condition in my AI ... and now it's winning every time

mzbear: so, somehow, my MCTS is trying to deliberately lose

Emmaplayz: hi

Emmaplayz: what does anyone think of covid 19

mzbear: can't figure out why my MCTS is inverted. i'll just leave it as-is and throw into the arena, i wanna see my rank before i look into fixing it

mzbear: right now, the code says i'm trying to deliberately lose, but that makes the bot win a lot

mzbear: this makes bear sad

BlackBasher2.0: hi

BlackBasher2.0: i dont understand anything

IfIHadATail: what do you mean?

BlackBasher2.0: im dumb

mzbear: and i'm about to fall asleep. it's 8am here and i've been up all night trying to make MCTS and then i implemented it backwards somehow :D

**BlackBasher2.0 slaps around a bit with a large fishbot

mzbear: and the moment i close my eyes to go sleep, i realize where my bug is

mzbear: part of my code uses one variable to mark which player played a turn .. another part uses the same variable to determine which player's turn it is. of course it's getting inverted

IfIHadATail: that's when it happens when you aren't staring at the problem :P

IfIHadATail: a lot of mine comes when I am driving home lol

mzbear: ohwell, rank 24 in Bandas

mzbear: could be better, could be worse

IfIHadATail: always : )

BlaiseEbuth: Ok. Emmaplayz, don't know if you're still here, but one more "stupidity" (disrespect, spam or other) will result in an instant ban.

eulerscheZahl: i kicked her yesterday already. didn't last long it seems

Default avatar.png AI_says_hi: Good morning :

Default avatar.png AI_says_hi: :) *

Illedan: Morning

eulerscheZahl: hi

eulerscheZahl: i mean: where is my Number Shifting app?

Default avatar.png ChampionCoder: Can you guys please give your feedback?

YodaMaster123: Lots of spam at this time...

Q12: ChampionCoder I think this is too easy.

Default avatar.png ChampionCoder: ok thanks

Default avatar.png ChampionCoder: Any suggestions as to how to make it harder?

Q12: maybe printing the word once in reverse and once in normal form, once reverse and once in normal form etc..

Default avatar.png ChampionCoder: ah...

Default avatar.png ChampionCoder: Yeah Ill try that

Default avatar.png ChampionCoder: Not sure if I can do that though, not much time on my hands

Default avatar.png ChampionCoder: Unfortunately :9

Default avatar.png ChampionCoder: *:(

AntiSquid: i think the challenge is the poor wording / description

AntiSquid: fix wording, add another condition / rule and should be ok

Q12: @ChampionCoder I edit the code to what I suggested and left your code commented.

VizGhar: How do I chain animations in SDK? I want to animate 1. placing tile 2. move circle in sequence

eulerscheZahl: you can commit an entity with a given time

eulerscheZahl: graphicsEntityModule.commitEntityState(time, entity)

Tailsray: Just did my first Clash :3

Tailsray: Cringy solution but I'm glad I got a 100 x3

Default avatar.png GuechoudNassim: hello

VizGhar: eulerscheZahl hmm they are running in parallel. Is this documented anywhere?


VizGhar: :thumbsup:

ProgrammerDog: Yo!

ProgrammerDog: :money_mouth:

jacek: should really rename the constants some time

jacek: #define ONE 0

  1. define TWO 1

ProgrammerDog: ok go ahead and rename them

ProgrammerDog: #define

ProgrammerDog: go there

Skynse: Please tell me that EmmaPlayz person has been banned

Skynse: ah okay, read what was up there, they're gone now

Westicles: Banned, and his soul has been eaten by krampus

eulerscheZahl: not banned yet

Emmaplayz: hiiii

Emmaplayz: go here


mzbear: emma, solve some puzzles and write some code if you want people to talk to you

Emmaplayz: i dodnt care about that dog\

Skynse: Then why are you here?

Illedan: Yeah, I should do that soon eulerscheZahl :thinking:

Emmaplayz: so what

Illedan: Hmm, I'm no longer a moderator on this chat? :(

Emmaplayz: i have school at 9

Emmaplayz: 9-5

struct: enough spamming

struct: Illedan must be a bug

Uljahn: or maybe modrights have been revoked until he finishes NS app :thinking:

Astrobytes: :D

Astrobytes: well played Uljahn

Illedan: :shrug:

Astrobytes: Tbh you show up without the icon quite a lot Illedan, but still can do mod actions

Uljahn: could be some glitch with external client though

Illedan: I'm using the CG chat though

Illedan: Where are the kids when I want to test my kick actions :thinking:

eulerscheZahl: test with me

Illedan: To kick?

eulerscheZahl: but only kick, no ban!

Astrobytes: kick struct, you shouldn't kick animals, so that's me euler and uljahn out

Illedan: Didn't work

eulerscheZahl: that worked

Astrobytes: :D

Illedan: -.-

Emmaplayz: hiiiiiiiiii

Illedan: shh or kick

struct: I see you volunteer

struct: oh too late :p

eulerscheZahl: where's my ssh client when I need it?

eulerscheZahl: shh*

Illedan: :D

Astrobytes: Not in the mood for that one today

Illedan: lol

Illedan: I'm not in the mod for that

Astrobytes: :D

Emmaplayz: hiii

jacek: AutomatonNN when is christmas

eulerscheZahl: RPI

AutomatonNN: which language are you using?

eulerscheZahl: RIP

Astrobytes: RPI, we knew them well

Illedan: This chess game is hard to model nice. So many fancy rules to handle

eulerscheZahl: resideat pace in

struct: you mean the crazyhouse variant Illedan?

Illedan: Yeah

jacek: i find i spend more time with adjusting output/input than the bot itself

Illedan: Too many options on the input :P

mr.x: hello

jacek: good evening

eulerscheZahl: ohai

LastRick: morning

tarikyildiz: eulerschezahl

eulerscheZahl: tarikyildiz

tarikyildiz: 2048 was so good I played and enjoyed it

tarikyildiz: thanks

eulerscheZahl: oh, glad to hear :)

tarikyildiz: :)

tarikyildiz: good afternoon

Skynse: good afternoon :wave_tone5:

VizGhar: tarikyildiz I can't even see you on ladderboard :P

VizGhar: Ah i see you sry :(

geppoz: let's see if someone can give me a JS hint:


geppoz: this doesn't work as expected

geppoz: since the scope of var is maintained for all calls

geppoz: I know the solution using "let" in new versions of JS

geppoz: question: how to do it in old JS versions without "let" ?

struct: you are increasing delay by 100 every loop?

geppoz: no, I want to call every 100ms

struct: so at end should be 100 not delay

geppoz: the desiderata is to have the function called every 100ms, with an increasing value

geppoz: insted this is called every 100ms, but all with the same last value


geppoz: this is the working one

geppoz: the question is if it possibile to solve in old JS without "let"



struct: the 2nd delay inside timeout is the first parameter you pass to the pippo functon

struct: Was this it geppoz?

Counterbalance: alt approach 1: setTimeout(pippo.bind(null, delay), delay);

Counterbalance: alt approach 2: setTimeout(foo(delay), delay); ... function foo(d) { return function() { pippo(d) } }

MSmits: food? Did you write this for code a la mode Counterbalance?

Counterbalance: hm i don't think i even used the term food in that code

jrke: MS i saw your D&B bot just .01 points above me at the moment

MSmits: hehe yeah

MSmits: btw jrke I do random moves till endgame, then only heuristics in endgame. Nothing fancy in there yet

MSmits: no search

jrke: mine is just minimax with reverting last 2-3 moves of chain if chain exist

jrke: though again random till endgame cause no eval for early game

MSmits: do you take into account loops?

MSmits: you can give away 4 boxes to keep control when you're finishing a loop

MSmits: or at least a closed chain, which is what a loop becomes when it's played

MSmits: like a 2x2 square. If someone plays it, you can put a line in such a way that you take no boxes and then it's his turn again

jrke: i have something like play a point and check if its affected boxes are covered from 3 then play its fourth side and doing samething till the affected boxes are covered from 3 sides

MSmits: mmh ok

MSmits: let me look at a game see if i can find an example

MSmits: here:


MSmits: your bot failed at frame 98

MSmits: actually hmm

struct: Has the UI been updated for it? I dont recall it being like this

MSmits: no it didnt fail sry, jrke, you played that one right

geppoz: ty struct and Counterbalance

Counterbalance: yw.. there's 1 more approach tyo scope vars, called 'IFFE': (function() { whatever} )()

MSmits: frame 58 jrke, i offer you boxes, but you dont take them, why not?

MSmits: singular opened boxes should always be taken otherwise the opponent will

MSmits: it's a guaranteed superior move

jrke: well i have to debug that move

MSmits: it's better to not even search in that case

MSmits: if you see an open move that is a chain of 1 box, always take it

MSmits: i mean a single box with 3 sides filled

MSmits: if it's a chain of 2 it's different

MSmits: same game, frame 91, another mistake

MSmits: you take all boxes

MSmits: you should have played B6 left, give me those 4 boxes, then take entire last chain

struct: So I was reading about process and pipes for c++, so when im writing to process I must close the pipe before I read right?

MSmits: now you got 4 boxes and i got the big chain

MSmits: oh damnit, i got it wrong again, i actually played B6 left and gave you the 4, not your fault. this game is complicated :(

jrke: i will say this game is not just about endgames

jacek: its about fun, as with all games

AntiSquid: all about the happy end games, right Automaton2000 ?

Automaton2000: you mean it is a good idea to make it a bit more complicated

jrke: well my last submitted bot performs well against you MS

jrke: nieren is just defeating me else i would be at 2nd pos atm

Default avatar.png RustySuperstar_8e15: ¤

Default avatar.png draconis19: Astrobytes u here?

MSmits: jrke you're right it's not, but there's only one bot on the leaderboard that does anything good with the first half of the game

MSmits: all the other bots might as well play randomly

MSmits: because that is what i do and i do just as well as the others

MSmits: the trick to beating crazy remi is in that first half

MSmits: you'll notice from his games he is giving away a lot of boxes, seemingly randomly, but there is a purpose to that. It's to give him control in the endgame

Default avatar.png draconis19: Astrobytes chat here if youre here!

jrke: i have noticed a unusual behaviour in my bot it doesn't takes border single paired boxes in early games

MSmits: paired?

MSmits: do you mean 2 boxes you can take with 1 line?

jrke: single i mean

MSmits: oh

jrke: here is also an example

MSmits: yea your bot doesnt always take them late game either

MSmits: yes, always take them

MSmits: there might be benefit in offering someone a box, but if someone offers you a box, always take it

MSmits: otherwise he;s just gonna take it himself on the next turn and you'll have the same boardstate but your score will be 2 worse

jrke: yeah

MSmits: the reason he offers those boxes, is to affect what the chain structure looks like in the late game

MSmits: you can afford to be like 10 points behind, if you're gonna get most of the 39 other boxes

MSmits: I'm just not sure if he's not giving them away unnecessarily. He gives away *a lot* of them

MSmits: obviously he always wins, but thats because we're all flailing in the dark up to ply 50. Easy pickins

jrke: yes

Or64bit: Could someone please help me with some c++ syntax

MSmits: if someone else builds a bot with a brain in those first 50 plies, he could lose a lot

Or64bit: I spent my last 2 hours googling and I can't seem to get an answer

MSmits: depends on how hard it is

MSmits: not likely i can help, but try me

jacek: i wonder what those number mean

MSmits: which numbers jacek?

jacek: remi's "eval"

MSmits: ohh

MSmits: let me check it out

struct: Ask the question, if someone knows they will answer

MSmits: drops from 0.08 to nearly 0 in the end game

MSmits: he makes really neat easily solvable endgames too

MSmits: pretty sure he's counting chains

Or64bit: I have a class that uses a template like so:

MSmits: nope sry, never use templates

MSmits: but someone else will know

Or64bit: I kinda messed up the naming there also it should be MyClass<L>::MyClass() before this last row

Or64bit: But only when typing it out here the code is fine and clion does not show any error or warning for it

jrke: gtg gn bye

Counterbalance: struct: before the fork you set up 3 pipes; after the fork, in the parent, you close the sides of the pipes you don't use (i.e. reading from the piped stdin, writing to stdout/stderr). In the child process, you dup2 all file pipe handles that you use and then close all the pipe file handles

struct: Thanks Counterbalance Ill try again, there is not much stuff I can find about it, at least for windows


Counterbalance: ohh windows

struct: Or64bit you get no error right?

Counterbalance: that works entirely differently


struct: Ill try to search a bit more about it

Counterbalance: Or64bit you're defining (not just declaring) the constructor in the header file aswell, right, not in a .cpp file?

Or64bit: in the header file I only have a line like so: MyClass<type>(); inside the class

Or64bit: which is different from struct 's code since he leaves out the generic part but neither of those seems to work for me

Counterbalance: do you need the constructor?

Counterbalance: if so, you need to implement it in the header

Or64bit: I'll try that

Or64bit: This way I don't get an error for the constructor but it still throws an undefined reference for every other function in the cpp file that I have in the header file

Counterbalance: templates are header-only

Counterbalance: So you need to put all the implementation in the header file aswell

Counterbalance: When you 'instantiate' the class, with a parameter for L, the compiler needs to already have read all the code for that template class. It cannot be in .cpp files.

You could however implement it in the same cpp file where you include the header.

Or64bit: I'm trying to make a generic linked list and I thought that it would be nice to split it up into a header file and a cpp file

Counterbalance: yeah that would be nice, unfortunately that doesn't work for template classes..

Counterbalance: the compiler cannot compile that cpp file because it has no idea what L is

Or64bit: I tried moving the whole class with functions inside it into a cpp file and ran it and it compiled and did it what it's supposed to

Or64bit: Is the template thing only a problem when it was declared in a header filed first?

Counterbalance: No, not really. That cpp file with the implementation would have produced either no code, or code for a specific instance, where you specified a value for L.

Counterbalance: What did you mean by 'did what it's supposed to'?

Or64bit: For simplicity sake I searched for a tutorial online and just threw the code into a cpp file and then included it in my main cpp and ran it

Or64bit: here is the code:


Or64bit: I don't really see it giving a specific instance to L so for that reason I don't quite understand your last comment

Or64bit: unless if giving a specific instance means the LinkedList<int> part but I don't think that's what you meant

Counterbalance: yes that's what I meant

Default avatar.png draconis19: go to the #clash channel if youre looking for clashes to join!

Or64bit: Ohh I see

jacek: oO

Or64bit: But won't I have to do that every time I create an instance of the class?

Counterbalance: if you put all the code above main() into a header file you're done.

Or64bit: seems fair enough

Or64bit: thanks for your help and patience it is much appreciated

Counterbalance: You're welcome. It's a tricky subject :)

Or64bit: I'm sure about that now :)

Default avatar.png draconis19: if you want to join some clashes, go to #clash!

jacek: where should i got if i dont want to join any clashes

VizGhar: outside

LastRick: :laughing:

Default avatar.png draconis19: ;)

Cappefra: can you guys code when you're drunk?

Cappefra: like not out of this world drunk but also you shouldn't get behind the wheel

jacek: is there any other way?

Cappefra: hahaha

Cappefra: to code you mean

Cappefra: or to be drunk

VizGhar: :D heh, I was most awesome sudoku solver under right amount of booze

Astrobytes: Ballmer Peak

Astrobytes: I'm good after a couple of beers, no more. Thereafter it's dangerous territory

struct: I code better for sure


struct: I dont end up with 10 parameters functions

Cappefra: I feel the same as Astrobytes, and also that's hilarious hahaha

VizGhar: :D :D :D

Cappefra: but also many times even after one beer I feel sooo lazy

Astrobytes: Those are the times you should just chill out and step away from the keyboard ;)

VizGhar: 1 is not enough... beer (alcohol) has that effect of "brilliant ideas" and cofee has effect of "being able to work indeffinitely"

VizGhar: however Im allergic to cofee and don't drink :D

Astrobytes: I try to limit my intake

struct: I only drink it during contests

Cappefra: Right! I guess after a couple beers I might be more "elastic" or creative and end up coding better but 1. only if it doesn't require careful maths cause yeah no I'm definitely not better at maths drunk and 2. I feel like I wanna give my brain a break and just read reddit or something

struct: Had an exam during an hangover, did not go great

struct: Math

Astrobytes: Yes. You need an unclouded mind for many tasks

Cappefra: yeah alcohol is good for blues, not for speed metal

Astrobytes: hahaha, I never play anything too complex after alcohol, only blues :D

Astrobytes: so true

Default avatar.png bpri:

Astrobytes: bpri: it's already in the stream notifications above and on discord

Astrobytes: ok, not on discord

Default avatar.png bpri: ok sorry sorry !!!

jacek: :eyes:

jacek: oh my

jacek: they write about The Unbounded (Best-First) Minimax and it sounds like jacekmax. what a rip off

DomiKo: wrrrr

struct: poor jacek

Cappefra: oooo I didn't know adding codingame to the title of the stream made it appear here

Cappefra: That's why I got so many viewers the other day!

jacek: ok, maybe they dont mention using it with uct

Cappefra: Or is it case sensitive?

Default avatar.png TheIceMaster_945d: hello

struct: Im not sure if its case sensitive

Default avatar.png TheIceMaster_945d: Hi

Cappefra: I'm pretty sure I spelled it with lower case g

Astrobytes: think it works either way

Astrobytes: don't quote me on that though

Astrobytes: You're still cutting-edge jacek, they haven't caught up with you just yet

struct: ok I give up on trying this pipe stuff

mzbear: what's the problem with pipes?

struct: I cant seem to find a way to write to another program cin

struct: using c++

mzbear: which platform?

struct: windows

mzbear: hmm, can't find my win32 code. anyway, it should be fairly straightforward

mzbear: after all, you can pass the stdin/stdout handles to processes you create

mzbear: so, you create two pipes

mzbear: they're like buffers with two ends, so you keep one for yourself and pass the other to the subprocess via the startupinfo

mzbear: CreatePipe, CreateProcessA

mzbear: ... ah, there

struct: Thanks Ill check it out

mzbear: i mean, you create two pipes, one for stdin, one for stdout ... and they both have read/write handles separately. that link has full code example

mzbear: it's a bit messy because it's lowlevel

struct: On the child process I can keep cin and cout right?

mzbear: yeah, cin and cout are bound to stdin/stdout, it'll work completely transparently

mzbear: only the parent process needs to do the messy stuff

mzbear: ... i was going to recommend checking github for how other people use those APIs, but the first three repositories i checked had incorrect code. ugh

struct: Yeah, I had trouble finding stuff about it

mzbear: stick to that microsoft's example code, it has all the details ironed down

struct: Also microsoft mentions text files, I can skip that part right?

mzbear: yeah, it's extra stuff for the example

mzbear: the important parts are CreateProcessA, CreatePipe, SECURITY_ATTRIBUTES, STARTUPINFO

mzbear: e.g. the SetHandleInformation is just for cleaniness, it's good practice to not leak unnecessary objects into child processes, but you can skip that

struct: Thanks for your help, first time doing this kind of stuff

mzbear: i did quite a bunch of windows programming 10 years ago. a lot has changed, but the win32 api underneath is still the same

mzbear: the posix apis are much simpler for this stuff

mzbear: the process creation model is so different too

struct: Also one more question

struct: So if I write to stdin, the read stdout. Do I need to close stdin pipe before reading?

mzbear: nah, both can be open, they're independent pipes

struct: Thanks

mzbear: for a good measure, you can create a pipe for stderr too, so you'll have three pairs of read/write handles to deal with :)

struct: Ill plan to have stderr too

struct: I just want to make it work first :D

mzbear: just test it with some simple known good .exe to use as your child process, don't launch cmd.exe or anything

mzbear: because there's another set of APIs for dealing with windows consoles, and cmd.exe uses those ... it's mostly compatible with pipes, but not 100%

mzbear: i'm a bit surprised i can't find any clean library for dealing with this. creating child processes is quite a common task, after all

RoboStac: boost::process ?

mzbear: oh hey, of course boost:: has one :D

mzbear: struct:

mzbear: it has things like bp::opstream ... for managing the things. much much simpler, assuming you're okay with including boost in your project

struct: Nice I think it worked

struct: Thanks mzbear

struct: at least the stdout worked now I will test the stdin

struct: ok infinite loop on the writetopipe part

struct: bSuccess = WriteFile(g_hChildStd_IN_Wr, chBuf, dwRead, &dwWritten, NULL); if (!bSuccess) break;

struct: if I change the if i change to if(bSuccess) break;

struct: it seems to work

struct: but i dont think microsoft would publish it bugged

mzbear: well, that's deliberately an infinite loop in microsoft's code

mzbear: it loops until the pipe is closed from the other end

struct: ah I see

mzbear: so don't switch that around ... just don't make a loop at all if you dont want a loop :)

struct: Also 1 more question, I seem to need to close child stdin pipe to be able to use the stdout, does this mean I need to keep opening and closing them inbetween?

mzbear: no, you're doing something wrong

mzbear: your reads/writes are blocking, i believe

mzbear: it might be a good idea to start writing an io loop around WaitForMultipleObjects

mzbear: also, WriteFileEx for async writes... ugh. you know what. this is probably going to take you quite a while :D

struct: if (!CloseHandle(g_hChildStd_IN_Wr))

Astrobytes: This is why I never got into Windows programming

mzbear: let me take a look into boost::process and its async api to see if it's any less painful

struct: This line closes the stdin right?

struct: from what I understand

mzbear: if you close that pipe, you wont be able to reopen it

struct: If I dont close it I cant go to the next :/

mzbear: but yes, that closes the write handle for stdin

mzbear: sure you can. why not?

mzbear: unless you want to terminate the child process entirely

struct: I tried to coment the line and it gets stuck

struct: It writes, then never reads

mzbear: trying to make code work without understanding what each API function does is a recipe for disaster, btw

mzbear: that's quite a lot of ground to cover if you've never done IO with win32 api, though

struct: Its just for a simple thing.

Astrobytes: Simple things in Win32 are not as simple as POSIX

Astrobytes: Especially if you're more familiar with the latter

mzbear: win32 just has a different flavor. very different flavor. i only abandoned the platform because microsoft started doing super scummy shit

struct: mzbear if I close the handle

struct: and then create it again

struct: ius it possible?

mzbear: not possible

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

mzbear: the pipe you gave the child is the pipe you gave the child

mzbear: even if you close your end, you can't change the other end

struct: ok i comented and it works now

struct: lol

mzbear: you THINK it works now

struct: Well its not stuck in an infinite loop now

struct: before it was getting stuck on readfrom pipep

Astrobytes: struct, have you gone through the usual intro to win32 programming stuff?

struct: no

Astrobytes: I would recommend it, just to get a feel for how things work, it's really its own thing

Astrobytes: mzbear would you agree?

struct: also if (!bSuccess) break; works again

struct: I dont know why

struct: I guess its magic

mzbear: if he only wants to get his task done and nothing else, i dont think he has motivation to read up on win32 basics :)

Astrobytes: Might make it easier but eh, there ya go

struct: yeah, i just wanted to get this done

struct: Maybe in the future ill check it

struct: but now I would like to finish STC for once

Astrobytes: you don't plan on... an actual UI or anything right

struct: I do

Astrobytes: *GUI

struct: im gonna use imgui

Astrobytes: ah right yeah, forgot about that

Astrobytes: will you have game visualisation?

struct: I want to make local referee, so I can tune stuff localy with gui

struct: Yes

Astrobytes: just openGL or SFML or something

Astrobytes: ?

struct: I dont know what its called

struct: but imgui can also draw shapes

struct: So Im gonna use that

struct: It supports opengl, directx...

Astrobytes: yeah, I mean, I would draw your stuff in openGL or whatever and use imgui as your GUI

struct: ah no

struct: Ill do everything in imgui

Astrobytes: that seems strange

mzbear: less new things to learn

struct: yeah mzbear is right again :p

mzbear: the more new technologies you're learning while working on a project, the more likely it is to fail

mzbear: opengl is quite a swamp to deal with, too. the pre-4.5 stateful APIs are error prone and horrible to get into, and guarantee your first few iterations of the rendering code are going to be messed up

mzbear: and since Apple will never support the new opengl apis officially, it's a troublesome thing if you want your code to be multiplatform one day

darkhorse64: You should read vulkan API doc, you will find out that OpenGL is really designed for noobs compared to it

mzbear: vulkan is super explicit about everything :D

darkhorse64: explicit as in "verbose", 3K LOC to draw a mere triangle

mzbear: 3k loc to setup things

Astrobytes: jeeze, openGL++

Astrobytes: *jeez

mzbear: i mean, this is great example:

mzbear: completely flat example how to use vulkan apis, without any architecture whatsoever

mzbear: so you can follow the RAW api without any distractions

Astrobytes: my point regarding imgui though, is that it's supposed to work with some kind of graphical renderer no? So what are you using to display it struct?

struct: ah directx

mzbear: while imgui requires a rendering backend, you can just copypaste that initialization from somewhere

struct: ^

struct: They provide examples

struct: I could use any of them tbh

Astrobytes: then you'll be drawing via directx then, this was my original question

mzbear: but he doesn't have to touch the DX apis :)

mzbear: and replacing the backend is a nobrainer

Astrobytes: Depends on what he wants to draw

Astrobytes: and yeah

mzbear: if he's feeling particularly fancy, he could even grab some rendering middleware such as bgfx and run imgui on top of that, to completely abstract out the underlying rendering api ... this looks fancy:

mzbear: - fairly straightforward to use too

Astrobytes: I've used it with OpenGL and also with SFML (built on OpenGL)

Astrobytes: That one looks simple enough too

Astrobytes: didn't see bgfx before now mzbear

mzbear: i ran into it years ago, and it seems to have matured quite a bit more since then

mzbear: hell, minecraft has attribution for bgfx ... does bedrock edition use it?!

mzbear: i really like that they list the c++ libraries they used:

mzbear: so you can google each of them to check them out :D

Astrobytes: not a game I've ever been into but yes, nice they credit where credit is due

Astrobytes: *give credit

mzbear: hmm did the chat glitch out

struct: What do you mean mzbear?

mzbear: the username list only shows moderators and me

struct: iirc it only shows the users that you can see messages from on chat

mzbear: i sent some private messages and wasn't sure if the person was online, but it seems he was since i got a reply. but he doesn't appear in the world chat user list

struct: and moderators

Astrobytes: yeh, that's normal

Astrobytes: not ideal

struct: Better than having page freeze on contests :D

Astrobytes: :D

LastRick: Interesting, i saw that earlier today. I thought it strange that it was nothing but mods and me on. Like I had snuck into a members only party

Astrobytes: trust me, the enormous list is much worse

Astrobytes: I think external clients show the full list?

struct: yeah, also for tabbing

Astrobytes: :+1:

struct: Now i must trust that my referee has no bugs :D

Astrobytes: You've not actually tested your referee despite doing all this runner stuff?

VizGhar: what game?

struct: I think i tested it, I just need to port it to be able to send inputs and such

struct: STC VizGhar

struct: The score it generates after every move is correct

struct: This was done by pressing "play my code" :D

struct: hundreds of times

MSmits: yay solver is almost fully functioning. Only one more thing. Check here:


MSmits: it says the score

struct: early game doesnt seem random anymore

struct: is this true?

MSmits: nope, still random

MSmits: it just avoids giving away boxes

MSmits: which is why it doesnt seem random

MSmits: I'm up to 2136 lines now

MSmits: But i will have to duplicate a part of the negamax to get the actual move out of it

MSmits: then i need an early game search as well. That's gonna be 3k total or so, might have to start minifying :)

MSmits: first lemme submit to check if i didnt add bugs ( = likely)

MSmits: yay, my prediction is correct:

struct: lol

struct: I was looking at yellow text

MSmits: no the message is white

MSmits: currently it doesnt solve if the endgame is still complex (with splits), so i need to fix that

MSmits: or at least, it does solve, but i cant get the move out, only the value

MSmits: i hate this about negamax

MSmits: it ruins the neatness of the code, to have a different function for depth = 0

Astrobytes: duplicate your negamax?

MSmits: yeah, to get the move

MSmits: you run 1 negamax function that also returns the move, by reference, and the deeper layers just return the value

MSmits: i dont want every layer to return moves, thats pointless

MSmits: maybe i am overthinking it and the compiler will take care of it

Astrobytes: you don't want ever layer to use the best move from the previous? Or am I not getting something

Astrobytes: *every

MSmits: no, what i mean is, technically negamax only return the value of the board right?

MSmits: it doesnt tell you which move is best

MSmits: its int Negamax ()

Astrobytes: well you can build that into it trivially

MSmits: but when you do, you get two different negamaxes

MSmits: the highest level needs to give you a move

MSmits: all the deeper ones dont, you dont care about them, only the value of their boards

MSmits: so generally i built a top level negamax which iterates over all moves and returns the best move and a different negamax that is called from the first one and only returns the value

struct: ok I think I finally understand this pipe thing more

MSmits: The thing is that this solver negamax is extremely complex, so i need to do a lot of work to duplicate it and avoid bugging

MSmits: it calls other functions too, in which moves are tried. It's a mess

Astrobytes: why not just make a little iteratively deepening loop that calls the negamax and returns the best move from each depth?

Astrobytes: well, via a pointer

MSmits: well thats what annoys me. Why do it from each depth

MSmits: you'd be doing it thousands of times

MSmits: i guess thats how everyone does it

MSmits: it's just annoying :)

Astrobytes: that's what ab pruning, aspiration windows etc are for

MSmits: you'll still be doing it thousands of times, instead of just 1 time

MSmits: at the root

Astrobytes: move ordering, blah blah

MSmits: move ordering is done by value

Astrobytes: well, I'm not coding your code so

MSmits: I'm just ranting :P

MSmits: I much prefer mcts

MSmits: maybe i'll use that for early game

MSmits: would be cool, both searches in one bot

Astrobytes: your best move from previous depth can be used in your move ordering

MSmits: yes, but you dont need to return the move

MSmits: you store the boardstate

MSmits: oh right, you put the move in the boardstate

MSmits: as some index

MSmits: I did that before, it's a bit different though

Astrobytes: Like I said, the day you stop questioning...

Astrobytes: :)

MSmits: right :)

MSmits: in this case a "move" is a complicated thing. It's basically one of those chains in the D&B graph

Default avatar.png masknksnvsndvo: wassup nibba

Astrobytes: That's a little more than an individual move I guess yeah, you wanna be careful with that I think if your doing it like that

Astrobytes: *you're

Astrobytes: masknksnvsndvo: pardon?

Astrobytes: Anyway MSmits, I've had a long arduous day today, I shall see you tomorrow. Goodnight all

struct: gn

MSmits: gn Astrobytes

Default avatar.png hchasens: What version of java does the site use?

Default avatar.png hchasens: Trying to figure out which API i should be looking at

mzbear: 8 or 11, puzzle by puzzle basis afaik

ZarthaxX: hchasens

struct: hi ZarthaxX

jrke: Msmits your endgame values printing helped me detecting a bug - turn 73

MSmits: cool :)

MSmits: yeah i saw that game

MSmits: you handled the loop wrong

MSmits: my bot is now near 2400 lines

MSmits: tomorrow I will try to put in an early game search. Might take a while, if it even works

MSmits: otherwise I got no chance against nr 1

jrke: mine is still 416 lines

MSmits: yeah most of my code is the solver

MSmits: it's kinda cool though, i can solve most games in less than 1 ms halfway through

MSmits: i could actually run a minimax for the last few moves right before the end game

MSmits: with the endgame itself as the depth limit

MSmits: that way the last few lines could be placed perfectly

MSmits: i think it would help a little, but may not be enough to beat nr 1


MSmits: so weird

MSmits: why 15-0 Kovi? Earlier i pushed him to nr 2

jrke: even i didn't get that a small change gives me 100% winrate against kovi and few changes 100% loserate

MSmits: I think it has something to do with how the endgames are formed. If your style of play prevents complex endgames, then my solver doesnt help me much

MSmits: against kovi, games might get more complicated


MSmits: look at this

MSmits: bunch of splits, pretty complex

MSmits: i am guessing your games are not often like that

jrke: mine winrates are more complicated

jrke: 0% against nieren and 100% against jbyepez lol

MSmits: btw, take a look at the kovi example i shared. He made his mistake at frame 79

MSmits: if you have a loop cnnected to a string (pan and panhandle), always do the handle first. He played inside the loop and then i took it all

jrke: he should have done that bottom right chain on turn 79 right?

MSmits: yes but i just saw a worse mistake in that game

MSmits: the chain at 70

MSmits: he took it fully

MSmits: he should have kept control

MSmits: (give last 2 to me)

jrke: yes

MSmits: btw solver doesnt always update

MSmits: it only updates when it had to actually solve

MSmits: so if the other guy makes a mistake, it may not register immediately

MSmits: as long as my bot doesnt need to think about the next move, it wont try

jrke: yes

MSmits: why waste calctime

jrke: because no use for that

MSmits: right

MSmits: this gamr vs remi:


MSmits: so close

ZarthaxX: hi struct :*

MSmits: also a complex endgame

MSmits: he plays it well

jrke: hmm to complex

MSmits: but neither makes a mistake

MSmits: the game is decided in the first half :(

jrke: thats the reason he is first

MSmits: ye

MSmits: i should randomize my seed :P

MSmits: or i play the same random moves

MSmits: well... why bother, i will be trying a different bot anyway

MSmits: tomorrow.... sleep now

MSmits: gn!

struct: gn

jrke: gn have a good night

SupSon: can you do a bitboard for dots and boxes?

jrke: i am not aware of bitboards SupSon yet

struct: SupSon MSmits doe

struct: does*


struct: "MSmits: and that's with a really complex bitboard"

struct: He was talking about D&B chains