From CG community
Jump to navigation Jump to search

kevmok: how to debug?

Zuabros: debug what

kevmok: like a console when typing code

Default avatar.png procamania: i guess were looking for the step through function or watch option like a regular IDE

Default avatar.png JohnPotter895: hello

Default avatar.png JohnPotter895: hello

SANA: Guys i'm just starting bot programming. I haven't knew it before. How can i start it? Any suggestions

Zuabros: yes

Zuabros: Do the harry potter one

Zuabros: its pretty straigthforward

Zuabros: fantastic bits

Zuabros: then coders strike back, its nice to start too.

Zuabros: all you need to know is how calculate distance from two cardinal points (which you basically will need to know to every bot)

Zuabros: use some sort of greedy algorithim (go to nearest point) and you have a nice start

SANA: Cool. Thanks for the suggestion. I really appreciate that.

GoogleJeff: pankdm: share your code please!

GoogleJeff: pankdm: I want to see how you beat me by 11 characters

GoogleJeff: oh, very clever

GoogleJeff: nice job!

jacek: good morning

SpotlessCoder: Hi I'm streaming clash of code on twitch @ - Grinding for winning 10 clashes in a streak

dbdr: happy caturmorrow jacek

anantaCodes: Hello, Are the questions of Clash of Code available as a collection anywhere ?

Allis: @anantaCodes Do you solemnly swear that you're up to no good?

anantaCodes: @Allis What do you mean? I solved a problem which I could not in a clash and now I want to see if the test cases that were given in the problem.

DiL: @anantaCodes I may be wrong, but I don't think there's a list; you can submit a feedback if you think there's an issue with a clash

anantaCodes: @DiL There is no issue with the clash. As I said, I wanted to verify my solution against test cases. I think there is no way to go back to a particular clash question then?

DiL: once the clash is done I don't think you can test your solution... clashes repeats if you keep playing enough

Allis: @anantaCodes Still around?

MSmits: \u23A0

MSmits: (testing)

MSmits: ⎠

MSmits: ⎠

jacek: �

MSmits: looking for unicode characters to draw dots and boxes map

jacek: oh my

MSmits: think i got the dot and left line

MSmits: but top line is hard to find

MSmits: ⠁ ⎸

MSmits: these I have

Sherkhan: что делать

MSmits: I'm gonna solve 2x2 map before I go out of wood 1 :P

jacek: trying to book it?

MSmits: ▔

MSmits: no

MSmits: I mean writing mcts solver, then run it on turn 1 and win

MSmits: it's very doable

MSmits: in wood 2 i mean sry

MSmits: 2x2

MSmits: ▏▔▏▔ ▏▔▏▔

MSmits: meh

jacek: maybe use ncurses

MSmits: whats that

jacek: lib for console text gui

MSmits: I want it to work well in the IDE where I'll be testing mostly

MSmits: btw as for books, dots and boxes 7x7 is like uttt in that regard. It only works if someone else is booking also, otherwise too much branching

jacek: 196 moves 1st ply

MSmits: or when they use a *very* determnistic for of minimax. But randoming on equal score should mostly solve that

MSmits: mmh isn't it 112?

jacek: 112 rounds

MSmits: in fact 14, if you account for symmetry

jacek: ah well maybe

jacek: yes, counted squares * 4

jacek: i have squares. adding 1 edge affects 2 squares

MSmits: yes 49 squares, 112 lines

MSmits: 7*8 + 7*8 = 112

jacek: hmm gonna make move generation more smart

MSmits: good idea, plenty of heuristics to try

MSmits: dont generate every move

MSmits: are you using minimax or mcts?

jacek: for now trying minimax. but for now i have simple heurstic

MSmits: ah, I feel this game should be mcts

jacek: eeyup

MSmits: but with real rollout

MSmits: not EPT

jacek: oO

MSmits: heavy, real rollout

MSmits: no need to play till 112

MSmits: you can do chain analysis, last 40 plies or so

MSmits: maybe sooner

MSmits: games should solve halfway I think

dbdr: are you starting D&B MSmits?

MSmits: yeah, slowly though, I want to try to solve 2x2 with a mcts solver before I try the bigger board

dbdr: cool

MSmits: from 2x2 to 7x7 I will need a simulation function and many move generation heuristics, so that will be slow as well.

dbdr: I think it's a fun problem

MSmits: yeah

MSmits: did anyone share a way to print maps easily?

MSmits: having trouble coming up with a scheme


MSmits: thats crappy

dbdr: not that I know

dbdr: what about

MSmits: kk

MSmits: yeah I tried that


dbdr: or just + and -- and |

MSmits: this is better

jacek: finally fixed bug. i was always losing as 2nd player

jacek: forgot to change currentPlayer in game object. input/output mehs

dbdr: :D

dbdr: personally I ignore the playerId input

MSmits: dont think you need it


MSmits: looks good right?

MSmits: now let's hope the lines go in properly :P

dbdr: beautiful :)

MSmits: mmh dont think they monospace properly

dbdr: CG console is bad for that

dbdr: need to modify the CSS

MSmits: sucks :(

dbdr: it can be done, but yeah...

Default avatar.png Memo12334: uh so this bot programming challenge gives a something in units. What can I do with that

Default avatar.png Memo12334: "a radius of 400 units"

MSmits: ignore it

MSmits: it's 400

MSmits: doesnt matter what the unit is

MSmits: thats why it says units

MSmits: it's just a radius of 400

Default avatar.png Memo12334: will see what I can do with the opponentxy


MSmits: nice huh?

dbdr: ^ wins the beauty contest ;)

MSmits: :)

Illedan: What is that?

MSmits: dots and boxes map

Illedan: For? :P

MSmits: dots and boxes

Illedan: Alright :+1:

Illedan: oh

MSmits: just like to be able to print a map for debugging

Illedan: there is a puzzle called it

MSmits: it's a multi

dbdr: multi

dbdr: seems not losing as p2 helped you jacek :)

Default avatar.png OliB150: If i wanted to 'give up' on a certain game/challenge and try another one in the meantime, will my existing code be saved online at all, or should I take a copy?

MSmits: whenever you click play it's saved

MSmits: whenever you click submit in a multi arena it's also saved in the history tab

MSmits: so you can check older versions thee

MSmits: there

Default avatar.png OliB150: ah ok, ye i saw the history one for submit and was worried that was the only way it got saved, but i can only do 5/7 test cases atm! :'(

MSmits: which game is that OliB150?

Default avatar.png OliB150: "Target Firing"

MSmits: ah dont remember that, or maybe I didnt do it at all

Default avatar.png OliB150: "only" a medium dificulty, but I can't get those final two as I need to change how I'm storing data so I can work with it a bit easier!

MSmits: ah yes, well then you know what to do

MSmits: mediums can be quite hard btw, the puzzle creator decides the difficulty and they aren't always right about that

Default avatar.png OliB150: Well, I know I need to change it, but I can't work out what it needs to change to yet, hah

Default avatar.png OliB150: it's only a few days old but only has a 30% completion rate, so at least I'm the same boat as a lot of others!

Default avatar.png OliB150: Tbh, I only checked the description before choosing it, considering I only signed up yesterday, maybe it was a bit too much too soon (although it's by no means by first day programming!)

jacek: someone actually reads descriptions before trying? o.O

Default avatar.png OliB150: It was the first one that came up, so it wasn't a rigourous selection process, lmao

Illedan: Wow, 100 games in wood 2 of Dots and Boxes. :zzz:

dbdr: how come?

Illedan: No idea why I have to do 100 games to promote :P

Illedan: But it is a waste of resources :D

dbdr: maybe it's a change for all commus now?

dbdr: would be good generally

Illedan: For the top league yeah

Illedan: Wood 1 :rocket:

dbdr: gz

Illedan: :bow:

dbdr: hold on to your sanity now ;)

dbdr: you promoted very quick if you just looked at it 20 minutes ago

Illedan: 3 ifs...

dbdr: :)

Illedan: Fixed size board in Wood 1?

dbdr: yes, 7x7

dbdr: Illedan: writes three ifs and promotes in 15 minutes MSmits: write a MCTS solver for wood 2

dbdr: 2 players, 2 styles ;)

MSmits: yeah !

MSmits: though obviously I am doing it to practice my algorithm in a smaller setting :P

MSmits: this is what wood leagues are for :)


MSmits: just using the same bitboard

MSmits: so that I can easily port it to 7x7

jacek: bitboard eh?

MSmits: sure, why not

MSmits: it's 112 bit for a full gamestate

dbdr: with MSmits bitboard is why not, it's of course!

MSmits: of course!

dbdr: you don't store the score in your state?

MSmits: why use scored states

MSmits: from every gamestate, the history doesnt matter

MSmits: only the future

jacek: you said 112 bit for a full gamestate

MSmits: it's like oware

jacek: thats a kue

jacek: lie

MSmits: i can store transpositions without the score

dbdr: the bitboard is a lie

MSmits: so in that sense it's not a lie

MSmits: if you read papers, they always use unscored states when trying to solve

jacek: i only read rocks

MSmits: you mean like... tablets?

jacek: and they store scores there

MSmits: stone ones?

MSmits: on rocks?

MSmits: :confused:

dbdr: D&B looks like a game that could have existed for millenia

MSmits: agreed

jacek: like oware?

dbdr: yes

MSmits: it's cool that you can play it with smaller grids too. 5x5 isn't even solved afaik

MSmits: 5x4 is

dbdr: 5x5 is solved

dbdr: took 8 years :)

MSmits: ah then I read an older paper

MSmits: nice :)

MSmits: where did you read that?

jacek: he solved it

MSmits: mmh don't think dbdr is obsessive enough for that


dbdr: MSmits, misunderestimated me ;)

MSmits: I did?

dbdr: > don't think dbdr is obsessive enough for that

MSmits: you would let a program run for 8 years ?

dbdr: I haven't done it, so I can't be sure

jacek: i bet MSmits would

MSmits: yeah I would

dbdr: it's true I'd rather obsesses for a few weeks than years, but it might happen

Illedan: WTF, who makes the Indexes of Y go the opposite way of normal

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

MSmits: Illedan yeah that was annoying

MSmits: but it's like that in Onitama also

dbdr: N - Y

dbdr: problem solved

Illedan: pff

Illedan: Ok, was only 2 places to fix

Illedan: Phew

Illedan: Gogo top 10

Illedan: :D

dbdr: also, it's debatable what is "normal". math has Y growing upwards for centuries at least

Illedan: Yeah, but every game. ever. has it downwards :P

jacek: maybe in australia

MSmits: and it makes sense, that's the direction trees go also

jacek: your game trees go upwards?

MSmits: i meant the biological ones, but sure, it's probably better to draw game trees upward, because then the root is down :P

MSmits: like with trees!

MSmits: again... biological ones

dbdr: like this MSmits?

MSmits: err

jacek: :tada:

dbdr: gogogo #1 jacek

jacek: nah im gonna need to rewrite my game engine

MSmits: so your winscore = 10k - empty boxes left?

jacek: 10k - ply level, or -10k + ply level

MSmits: so that it prefers states with more finished boxes or something?

MSmits: ohh ok

jacek: so shortest wins are better

MSmits: right, that makes sense in general

MSmits: but dont think it matters here does it?

dbdr: not if you wan to humiliate your opponent

MSmits: or do is a chain move a single ply for your bot?

jacek: each move is different level in my bot

MSmits: like 5 moves in a row, counts as 1 round?

MSmits: oh ok

MSmits: you can do it either way i suppose

jacek: well shortest wins are better in most games

dbdr: well it's annoying that you can play several times in a row

MSmits: yeah

jacek: in breakthrough i could play with opponent for 20 plies seeing forced win

dbdr: or you can have multimoves. it's a tradeoff

MSmits: jacek yeah those are funny

MSmits: dbdr multimoves only works with good heuristics

MSmits: because in some cases, multimoves will lead to a node having thousands of children

dbdr: it's just a different representation. it's equivalent

MSmits: so you need to force some order in there

dbdr: right

dbdr: but your tree is much less deep

MSmits: true

dbdr: so it's still equivalent

MSmits: yeah

MSmits: but practically, multimoves is harder to implement

dbdr: (a^b)^c = a^(b*c)

MSmits: right

Illedan: Damn, the gap from 7th to 6th. I guess this is where the real game starts :D

dbdr: yeah, with very fw ppl in wood 2

dbdr: I think this game misses another boss

Illedan: Yeah

dbdr: which can be added later. it's fine for now

Illedan: Should be a copy of jacek - 2 points

jacek: i think im the last who uses some search

jacek: rest is some heuristic or random

dbdr: leojean890 uses heuristic I think

MSmits: mmh is there any time with the 2x2 where it's not the best choice to take a box when it is available?

MSmits: I don't think so, but not 100%

dbdr: don't make me think about 2x2 ;)

MSmits: too complex?

dbdr: less than 7x7, but distracting

MSmits: allright :)


MSmits: nice chain

dbdr: I think I've only seen field3 doing those

MSmits: might be some weird heuristic

dbdr: this game is definitely weird :)

MSmits: ^

pardouin: ooch, it hurts

pardouin: I used to play this game alot in high school ^^

dbdr: why does that hurt?

pardouin: to get "Fanny"

dbdr: ah :)

dbdr: gotta pay field3 a drink

pardouin: I just passed 2x2, didn't try 7x7 yet

pardouin: I focused more on CotR and CvZ to get CPs fast (for the quest map)

Monsieur_Pook: on coders strike back what's the point of shield if you can't calculate the distance to the enemy ship?

pardouin: I'm pretty sure you CAN calculate it

pardouin: but anyway you can get gold without using shield at all

Monsieur_Pook: oh I thought i should use them since they were introduced anyways

Putnam3145: wow, literally all of the validators work locally but 50% fail when submitted

Putnam3145: that's kind of annoying

Default avatar.png AndrewJ: bad test cases can be annoying

pardouin: what puzzle is that?

Putnam3145: labyrinth

pardouin: your algorithm is too slow?

Putnam3145: might be

Putnam3145: kinda doubt it though

Default avatar.png AndrewJ: my internet is so slow and it took like 1 minute for my code to freaking test and submit

Default avatar.png AndrewJ: -_-

TheSpiffiest: So when a program times out - are those timeouts adjusted for languages?

DomiKo: nope

MSmits: no, that would be a bad idea

DomiKo: everybody is equal :wink:

TheSpiffiest: Ha. Well Rust is 12 faster than python in my simple tests and I have everything working at home, but times out on the server...

TheSpiffiest: So time to translate

MSmits: you can't give languages a bonus to put them on equal footing

MSmits: there is no fixed relation between them

MSmits: sometimes c++ is 100x faster than python

MSmits: sometimes 3x

TheSpiffiest: I can see that

MSmits: if you were to try to correct for this, people would have to try all languages to see which one was most overcorrected

Putnam3145: the timeouts tend to be more for algorithmic issues than anything else

MSmits: now they can just choose the language that is most suitable for the job at hand, which is what CG promote

MSmits: it's madness to give python players 10 seconds per turn on UTTT just to put them on equal terms with C++ with 100 ms. Think of the server load :)

TheSpiffiest: True. And it's a bit like code golf. You should learn list comprehension runs faster than similar for loops

TheSpiffiest: semi-unrelated, but helps a bunch in seeing what python actually wanted to do

MSmits: nice!

MSmits: I'll remember that for when I am teaching it

pardouin: you can prototype in python and then translate in C++

TheSpiffiest: So for reference - what is the timeout so I can practice at home?

MSmits: you can, but you will have to do some work to optinize in C++ also

TheSpiffiest: is there a standard?

MSmits: usually it says in the multiplayer arena

MSmits: for puzzles I think 6 s?

MSmits: check the description

TheSpiffiest: ...2 seconds on this one. You guys thought of everything. :)

MSmits: well not me, but some of them did :P

Putnam3145: it wasn't too slow

Putnam3145: it's just that my algorithm ONLY COINCIDENTALLY found the fastest for each of the test cases

Putnam3145: and it failed to on half of the server test cases

TheSpiffiest: interesting. What problem was that for?

Putnam3145: labyrinth

pardouin: fix your heuristic :)

TheSpiffiest: I had a little similar for checkers. As I develop bots the stuff I haven't completed just returns random. Depending on the run it would go from 15th to 50th

pardouin: maybe you thought too much about the testcases for your heuristic without imagining other situations

TheSpiffiest: usually lower

Putnam3145: nah, the problem was that I somehow didn't notice that my algorithm wasn't actually checking the entire map

Putnam3145: or rather, checking until it finds a path that's short enough

Default avatar.png glenngielty: Horse-racing duals

field3: I'm a little happy. Thank you dbdr.:relaxed:

Default avatar.png Memo12334: hate it when my pod keeps moving around a checkpoint for eternity

dbdr: from the big win field3? :)

EcksDee: reduce your speed in some cases, and/or adjust your target position relative to your velocity

Default avatar.png Memo12334: hm allright

field3: It is a side effect of the strategy of surrounding from around to avoid "2block stop algo".:slight_smile:

Izzobacul: @Nakinamo share your code please

Nakinamo: @Izzobacul here you are!

Default avatar.png cheshao: ?>

Default avatar.png cheshao: ???

Schwase: yoo

Fosfen: Hey ! I am struggling simulating the mars lander problem

Fosfen: If the gravity force is 3.711m/s², why is the lander falling 2m ins the first second instead of 4m ?

Fosfen: (rounded values)

EcksDee: s = s0 + v0 * t + 0.5 * a * t

EcksDee: you need to multiply the acceleration by 0.5

Putnam3145: it's kinda intuitive too

Putnam3145: it's going at 3.711 m/s at the end of that second

Putnam3145: and it was going faster linearly that whole time

Putnam3145: and it started at 0

Putnam3145: so,

Putnam3145: you take the average of the start and end velocity in that second to get the total distance traveled

Fosfen: Ohhh ok I think my understanding was too naive for this, gotta hit high school again I guess

Putnam3145: and you find that (0+3.711)/2 is in fact something like 1.85

Putnam3145: i never learned this in high school but then i never got into calculus in high school

EcksDee: mars lander is the only (i think) puzzle that does not simply just add the acceleration to the vel

Fosfen: Thank you !

EcksDee: oh i forgot something.. s = s0 + v0 * t + 0.5 * a * t^2 but since t = 1, its still the same :)

Zuabros: Fosfen, you are misunderstaing acceleration for speed

Zuabros: acceleration is the speed in wich speed increases, not speed itself

Fosfen: Yes I tried the naive approach of adding the force directly to the speed which is not how gravity works at all

Putnam3145: not how acceleration works

Putnam3145: they're not the same units

EcksDee: its the way it works in the other physics puzzles though. Acceleration vector added to velocity vector, velocity vector added to position vector. as far as i remember mars lander is the only one where its actually correct, and not just summed discretely together, so a natural mistake to make on this site :)

Putnam3145: my simulations in mars lander work assuming the discrete summing, though?

Fosfen: Yeah I guess it also works but the values are slightly different

EcksDee: if you are multiplying by 0.5 its not disctrete. the 0.5 comes from the integral

Putnam3145: I'm taking the current velocity vector, adding the gravity and force vectors to it and using that as the simulated value, and I'm using it to simulate where I'm going to land and how fast, and doing it in such a way that if I'm off at all I'll crash,

Putnam3145: don't panic in less than 200 characters is brutal

codest: nice

MSmits: Putnam3145 agreed it is

jacek: but you made it?

MSmits: I did, dont know if Putnam3145 did

EcksDee: he is a brutal proffessor

EcksDee: so much so i had to use 2 f's


EcksDee: xD

MSmits: good teaching :)

jacek: that's msmits first lesson as teacher

MSmits: i wish :)

EcksDee: hoogleraar or professor in dutch?

codest: java best

codest: it is very useful

jacek: kree java!

MSmits: hoogleraar / professor is almost the same I think

codest: and python the best

EcksDee: high teacher seems to be the cool'er name :)

MSmits: mmh high in English has some added meanings though

MSmits: Hoog doesn't mean you just took some weed, for example

EcksDee: haha wasnt how i meant it either

MSmits: hehe ok

EcksDee: high king for instance, is a king ruling over other kings

MSmits: while smoking tons of weed

EcksDee: xD of course

Putnam3145: i need to go to bed

Putnam3145: tomorrow i will try it in, like, ocaml or closure or something, who knows, even ruby has had no luck for me

Putnam3145: clojure.

jacek: D

MSmits: Putnam3145 I did it in python

MSmits: helps if you do a bunch of golf clashes and watch how other players do it

Putnam3145: i got my 4-wins-in-a-row or whatever it is by a bunch of code golf clashes in a row

Putnam3145: cause those are easier for me to win, usually

MSmits: ah I havent done that yet

MSmits: btw, that particular golf is not just about smart golf tricks, you also need to make the logic as simple as possible

Putnam3145: yeah, i can tell

MSmits: you dont need most of the input

jacek: why does d&b has the illusion of black dots :v

MSmits: and the exit can follow the same logic as every elevator

Putnam3145: this i also could tell, but i'm not sure what less input i could use

Putnam3145: yeah, i'm just storing all the PoIs on every floor, then checking if they're before the first one or after the last one, depending on direction

MSmits: Pols?

Putnam3145: points of interest

MSmits: ah

Putnam3145: exits + elevators

Putnam3145: everything else is ignored

MSmits: I do it differently, I know that they change direction every time they are stopped

MSmits: so i have a sign thingy that flips

MSmits: and they always go to the right first

MSmits: that way you already know the direction your guys are going at any time

Putnam3145: ah, so you don't have to compare to "RIGHT" or "LEFT", you just see if it's different from last tick

MSmits: yeah something like that

Putnam3145: although i'm not comparing to RIGHT or LEFT

MSmits: this might not be the best way btw, but it was compared to what i had before that

Putnam3145: i'm comparing the first char to R or L, obvs

Putnam3145: where that's shorter

MSmits: yeah someone else told me they did that

Putnam3145: bafflingly my python golf is actually worse than my D golf


Putnam3145: WOW

MSmits: spaces are better

Putnam3145: i personally use spaces

Putnam3145: but for golf, where you're losing by the character?

Putnam3145: no way

MSmits: also, you should try to put everything on one line if it is indented

Default avatar.png pythonFan-arch: hello pragrammer :D how you going

MSmits: whats a pragrammer?

Default avatar.png pythonFan-arch: a person who code

Default avatar.png pythonFan-arch: :P

Putnam3145: okay my python score is... still kinda bad because i'm at 85%, whoops

MSmits: woops

Default avatar.png pythonFan-arch: guys who to baypass ZeroDivisionError: division by zero


MSmits: dont divide by zero :P

Aravindhsiva: Anyone can join

MSmits: I wonder if I've solved 2x2 D&B. My algo stopped after 10 ms and 18981 rollouts

MSmits: seems reasonable

MSmits: dont output any moves yet so...

dbdr: MSmits: time to publish a paper ;)

MSmits: lol

dbdr: after 10000000ns, we finally have the answer!

MSmits: yeah :)

MSmits: what is the solved score for 2x2 again?>

MSmits: says +2 for 2nd player from my algo

jacek: quite a chain eh

MSmits: dbdr lost the full board to a chain earlier

MSmits: 49 boxes :P

MSmits: ahh seems like my bot says 3-1 from optimal play, same as theory

MSmits: I dont trust this though, I fixed far too few bugs

jacek: you dont trust theory?

MSmits: i dont trust my bot :P

dbdr: what's your source for the 3-1?


MSmits: I vaguely remember reading about the +2 result earlier

jacek: oh and they use the same format to print the board as you

MSmits: I just noticed that, thats not where I got it from though

MSmits: I got it from some gith link

MSmits: someone made a D&B player I think

jacek: drum&bass player

MSmits: time to output some moves. This is particularly annoying. I always store game states on games like this so I have to compare the game state of the winning child with the result of a move, at the end

MSmits: which is painful because of chains and such

dbdr: you don't know which move corresponds to which child?

MSmits: not during search no

MSmits: I just generate the new states

MSmits: without giving them moves

MSmits: giving them moves is a bit silly when you can get to the same state by different routes (transpositions)

dbdr: but you need the moves when you generate the children

MSmits: yeah, but I dont store them

dbdr: you don't need to store them

MSmits: during selection, i dont apply moves

MSmits: I just get the new boardstate from the node

dbdr: you need them at some point to generate the child

MSmits: yes

dbdr: you could use that again

MSmits: yeah I can regenerate the states using almost the same code.

dbdr: the nth child is the parent modified by the nth move

MSmits: thats what i usually do

MSmits: mmh not exactly

MSmits: because of chains

MSmits: I could have 10 children and each of them have the same move

dbdr: so if the nth child is the winner, you do the nth move

MSmits: because it's taking a box

MSmits: I use multi-move

dbdr: I don't understand, how can the same move lead to different children?

MSmits: because of chains

MSmits: the child can be multiple moves away

MSmits: the next layer in my tree is always a player switch

dbdr: if you use multimoves, then it's a single mutlmove away ;)

dbdr: right, so from a multimove you need to pick a single monomove

dbdr: but that's a smaller problem

MSmits: yeah, but it's some work to determine that. But you're right, i dont have to actually compare the states, i can regenerate the states in the same order

dbdr: I guess it's similar work

MSmits: for oware it's much simpler. I just take the root state and the best child and see which pit is empty

MSmits: which *extra* pit is empty that is

dbdr: I mean it's not hard to find the edges that were added, then pick one of those that's currently legal

MSmits: hmm, thats neat

MSmits: though

MSmits: no, nvm, that doesnt work

MSmits: you need to pick the right edge

MSmits: so that you take boxes

dbdr: "pick one of those that's currently legal"

MSmits: you can take a box and then a random edge

MSmits: or just take that random edge

MSmits: both are legal

dbdr: indeed, i meant to say one that create a box

MSmits: ah ok

dbdr: which is also trivial

dbdr: sorry, I said it wrong earlier

MSmits: right, no, i got it

MSmits: this sort of thing also always annoys me in minimax

MSmits: the top layer needs a slightly different approach because you need the move

MSmits: so basically, I dont mind the search, I am just too lazy to give the answer :P

dbdr: 42

MSmits: true

MSmits: ".. and everything" so yea

dbdr: it's the same principle

dbdr: very long computation, at the end what you get is the knowledge that the computation is finished, and a meaningless answer

reCurse: Just store the PV at every level, easy

Default avatar.png CamelCase_joke: hey guys, is regex used often in code golf?

MSmits: hey reCurse!

MSmits: anything you're working on on CG?

jacek: :tada:

reCurse: A little bit

MSmits: ... runner?

reCurse: No

jacek: u...t?

eulerscheZahl: your own game where you are getting around the SDK?

reCurse: lol I forgot about that one, oops

reCurse: I have too many competing interests

dbdr: jacek, did you break your bot?

jacek: somewhat

Default avatar.png AliZainAldeen: bayern vs psg what do you say ?

Default avatar.png wartonbega: psg cauz france is better XD

Zm4j: psg cauz they are underdogs

jacek: bayern because lewandowski

Illedan: EricSMSO ?

Illedan: Very annoying to not see the final score in the end of DB -.-

jacek: hm?

Illedan: Winners score is replaced by WIN..

Illedan: I would like to see the actual score value :P

jacek: you can count the boxes yourself

Illedan: -.-

jacek: am i wrong?

Illedan: No.

codest: it is hard work

EricSMSO: Hello you all. I agree it would be better to display the winner's score at the end. I could change this quite easily, but is it allowed to change something once it is approved by other contibutors ?

Default avatar.png JBM: changing the viewer only is morally correct

Default avatar.png JBM: for technicalities of what does or doesn't mess up the rest, i think illedan is better placed to answer

MSmits: EricSMSO i think it's fine to change it, but you have to ask one of the others if it won't break anything. I don't think so

Default avatar.png Peanutbutter_Warrior: what does following someone in clash of code do

MSmits: it's like following them on twitter, only without the racism

Illedan: Fine to change yes

EricSMSO: Once you have won or lost, why worry about how much ?

Illedan: I'm often looking through some replays, skipping to the end. If I lose by a lot => look at it

Illedan: else move on

MSmits: i like it because you can MSG the end score and see if it is the same as the final score

MSmits: if you want to test your solver and such

EricSMSO: Ok I will try to do something. I have not be concerned so far because I have not developped a true bot. But don't shout on me if it disturbs the actual leaderoard.

Illedan: Thx :D

EricSMSO: Ouch so many typewritting errors!

MSmits: it's ok, I studied it for a minute and understood :P

MSmits: sigh... these bugs. I tried to subtract an integer from a uint8_t


Illedan: :rocket:

MSmits: gj :)

Illedan: Linq FTW xD

MSmits: I am still trying to solve wood-2, almost there, but have some hard to find bug :P

Illedan: Even won him on submit :D

MSmits: nice :)

dbdr: > MSmits: sigh... these bugs. I tried to subtract an integer from a uint8_t why do you waste time on things like this?

dbdr: the compiler can tell you this

Illedan: Wow, this was close :o

Illedan: Bieffect of my stupid ifs xD

MSmits: dbdr how do you make the cg compiler tell you this?

dbdr: cg compiler?

MSmits: the one in the IDE

dbdr: if you use c++ you probably need to set options

MSmits: I dont compile locally

MSmits: generally

dbdr: wat?

MSmits: I mean, I just code it, then copy paste into IDE

dbdr: mind=bown :D

MSmits: brown?

dbdr: blown :)

MSmits: well :poop: for brains is an expression :P

MSmits: nice typo :)

dbdr: nice Illedan

Illedan: More ifs ftw.

MSmits: btw, my bot is working and i can promote any time i think. But my solver is bugged somehow, reporting wrong scores

MSmits: probably has to do with unscored states, bit complicated to work with

dbdr: :no_mouth:

MSmits: yay it works!


MSmits: my bot as 2nd player predicts it will lose at the start

MSmits: then boss starts to make mistakes

EricSMSO: Have you noticed the final display?

MSmits: yes, good job EricSMSO

Illedan: :tada:

MSmits: btw, game as player 2 is solved in 3 ms

Illedan: Thx

MSmits: player 1 8 ms, player 2 3 ms

MSmits: guess that 1 move makes a big difference

Illedan: Yeah, I suspected the game is too easy :P

MSmits: I was worried my bot would give up as player 2

MSmits: I mean, if it know it has lost before it started... why try?

Illedan: For Wood 2, try anyway :D

MSmits: hehe yeah, lemme submit and end this

dbdr: MSmits, anthropomorphizing your bot :D

MSmits: lol


MSmits: unfair

Default avatar.png Memo12334: maths is so important in AI ;p , I should had taken it serious back in high school ...

Illedan: dbdr, fixed games vs me? :(

dbdr: yes

EricSMSO: My wood 2 boss plays almost random. So it just a not so hard challenge for newcomers

Illedan: Dammit

MSmits: Memo12334 there's many different kinds of math and levels of math, depending on what you're coding you might need some

Default avatar.png Memo12334: basic trigonometry

MSmits: most math here doesn't require heavy calculus though

MSmits: most multis not even that

Default avatar.png Memo12334: oh weird

dbdr: Illedan did you tune against me?

MSmits: many are gridbased

Illedan: Tune?

Illedan: I have only IFs.

MSmits: so it's often manhattan distance

dbdr: tune your ifs

Illedan: Yeah

Illedan: Fixing 1 of them now

dbdr: :D

MSmits: this is nuts

MSmits: my submit is failing even though my bot makes no mistake

dbdr: :D

MSmits: it gives away boxes because it solves as p2

dbdr: too clever

MSmits: because it sees in the future that if it doest give away the box, the opponent will take it anyway

dbdr: MCTS for wood 2 backfires

MSmits: i was mostly unlucky with too many p2 starts vs boss

MSmits: it's catching up now

dbdr: greedy depth1 promotes, IIRC

MSmits: not gonna make it i think though

MSmits: I'll spam submit :P

dbdr: MSmits got beat by random boss

dbdr: :popcorn:

MSmits: is it random?

MSmits: lol yeah it failed

dbdr: I guess so, but not 100%

Illedan: haha

MSmits: I predicted it though

Illedan: Fixed 2 bugs

Illedan: Lets see

dbdr: it's definitely bad. everyone promoted except you ;)

MSmits: lol it's awesome, it solved the game :P

MSmits: it's like that YT you shared

MSmits: with 2 robots playing chess

dbdr: :)

dbdr: if you win as P1, you just need a lucky submit I think

MSmits: yeah

Illedan: Cap it to some low depth?

MSmits: mmh I might still have a bug also


Illedan: Bad link

MSmits: solves as 1-3, then 3-1, then 2-2, should be impossible

Illedan: Oh

Illedan: those works now

dbdr: why not?

dbdr: solved is assuming perfect opponent

dbdr: which this one is not

MSmits: i know, but if i solve as 3-1, it should never be able to catch up to me

MSmits: so the predicted score can never go down for me

dbdr: ah yes

dbdr: the boss is better than perfect then ;)

MSmits: right :)

dbdr: Illedan :rage:

Illedan: Nananana

Illedan: lol

Illedan: precious points for Illedan

dbdr: you are P1 every single time

Illedan: Helps to pay the creator :dance:

Illedan: Daym, helps to be P1 in this yeah

dbdr: indeed :)

Illedan: Guess it is solved for P1 very easy

dbdr: very easy?

Illedan: Yeah

dbdr: it took 8 years for 5x5

Illedan: You never need to consider every move

dbdr: feel free to solve it and publish a paper

dbdr: people thought about that too

Illedan: $.$

EricSMSO: Two liner boss, not as good as IForgot, but not so bad ;-)

Illedan: Ok, I guess :P

dbdr: at the end you don't need every move, but at the beginning, you need a lot

Illedan: Hmm

dbdr: a few symmetries and corner cases

dbdr: still huge branching

MSmits: Illedan the reason you need almost all moves is that they decide what the final chain-maze looks like

MSmits: when you got the maze, or nearly so, you can easily solve

Illedan: I guess the start of the game is more about the number of boxes with Edges of count 1, 2, 3 and 4. Then about how big the different chucks are.

Illedan: And the number of chucks

MSmits: It's about how many chains there are and their length and whether they are half open, cyclic or closed

MSmits: there's different rules for different kinds of chains

MSmits: sometimes multiple chains meet on 1 cell

MSmits: it's more complicated than you'd think

Illedan: Hmm, k. I'll accept that

MSmits: btw, you can prune 4 moves

MSmits: off the corners

MSmits: "corner cases" like dbdr said

dbdr: :innocent:

MSmits: the two lines connected to the corner dots are completely equivalent

MSmits: doesnt matter which you take first

Illedan: haha

MSmits: finally bugfree I think

dbdr: famous last words :)

MSmits: it's gonna crash hard in wood 1 i guess

MSmits: no losses in 40 games and a bunch of draws all as P2. Won every P1 game

MSmits: 1 loss now as P@

MSmits: P2

MSmits: but i dont think boss made a mistake

MSmits: I gave away a box there, but i think again a consequence of solving =/

Illedan: Come to Wood 1 and try the real stuff :P

MSmits: i wonder how many UTTT games i lose because I solve 15 plies before the end

dbdr: I only matters against weak players

MSmits: after submit finishes Illedan :)

dbdr: *it

MSmits: another nice typo :P

dbdr: :)

dbdr: :P

MSmits: omg

MSmits: still not promoted

dbdr: :joy:

MSmits: 20.79 out of 21.21

Illedan: wtf

Illedan: -.-

Illedan: Want my 3 ifs?

MSmits: i swear bot did not make a single mistake

dbdr: I think the game is trying to tell you something MSmits

MSmits: nah i am pulling him down

Illedan: -.-

MSmits: he's boosted :P

Illedan: Wonder who did that..

MSmits: hey, wasnt me, he was boosted before i started :P

MSmits: this hemhel guy is not helping

MSmits: I draw against him all the time as P2

MSmits: which is a good result, but his rating is crap and it pulls me down

MSmits: i pushed him a lot

MSmits: ahh above boss now

MSmits: so funny you can write a perfectly playing bot in wood-2 and not get promoted

dbdr: it's like watching Federer struggling to win a match in an amateur tennis cup

MSmits: :)

Illedan: Yeah, because the enemies are doing unexpected stuff

Illedan: Code for the enemy you are meeting, not dbdr :P

darkhorse64: You forgot about "the best exit from the woods strategy", the kiss one ?

MSmits: heh, well the only reason i did this in the first place is to have these horrible bugs I have been having in wood 2

MSmits: instead of wood 1

MSmits: kiss one?

dbdr: darkhorse64, pretty dangerous in these COVID times ;)

MSmits: oh

MSmits: darkhorse64 i wanted to make sure my mcts solver works with unscored states and such

darkhorse64: keep it stupidly simple

dbdr: better than keep it Schutzstaffel

MSmits: in the end promoted with +2

dbdr: what Shenanigan now, Illedan?

MSmits: it's kinda silly that it will do the whole submit with a broken bot when you promote

Illedan: I made some bug, trying to find it

Illedan: Fix 1 bug, make 2 new

Illedan: Was better the earlier one

dbdr: MSmits straight to #1?

Illedan: *stright to #-1

Illedan: Someone optimized for 2x2 board?

Illedan: xD

MSmits: lol

MSmits: It might be a week before I got a working wood 1 bot :)

dbdr: shouldn't the same bot work at least somewhat?

MSmits: many heuristics and such before you can even get a multi-move gamestate working

MSmits: no

MSmits: if there are multiple ways to capture boxes, you can get hundreds of children

MSmits: I need to write heuristics to force an order and such

dbdr: that's just optim, no?

MSmits: mmh not if it crashes because it got stuck inside an expansion

dbdr: timeout?

MSmits: maybe i could make it work somewhat, not sure

MSmits: yeah

MSmits: but currently it's also just selecting the lower 4 box corner of the map, so i need to adapt that too

MSmits: but thats a job for the coming days, work tomorrow

dbdr: yeah, will retire too

MSmits: gn :)

dbdr: gn

Illedan: gn

Illedan: I'll fix this bug, beat dbdr and sleep too

S_viper: hi

Zm4j: hello

Default avatar.png tuzi2: hi

Default avatar.png dark_3nergy: m

Default avatar.png JohnSadiq: hello

Putnam3145: I DID IT

Putnam3145: RUBY STRONK

Putnam3145: i'm learning so much about this language

Putnam3145: all the wrong goddamn things

Gorbit99: welcome to ruby