« first day (9 days earlier)      last day (34 days later) » 
00:00 - 16:0016:00 - 23:00

12:50 AM
so, in theory, you could have a triple bot submission, where the job of the first two bots is to clear a path for the third?
6 hours later…
6:50 AM
@fəˈnɛtɪk i'd say Territorial is easily recognisable now too.
2 hours later…
I don't mind that kind of score :)
@Alion the map does have 12996 cells now :p
Although a game I just ran had GiveMeSpace in second, then Trolled down to 5 squares left at the end of the game. Yuck
@dzaima Can't argue with that...
Yay! We've got someone who draws pictures!
overnight tournament. Jim with 11 wins, Euclid with 7, GiveMeSpace & DFS - 5. Took exactly 3 hours
8:31 AM
A: Art Attack KoTH

Jo.Leonardo da Pixli function(myself, grid, bots, gameInfo) { var ME = this; var w='up',a='left',s='down',d='right'; var ps = [ [ 16,30,0,11, [s,s,d,s,d,d,w,w,w,w,a,a,d,d,d,w,s,s,s,s,s,d,w,w,s,d,s,s,d,s,s,a,s,a,a,s,a,s,s,a,s,s,s,s,s,s,s,a,a,s,d,w,d,s,d,w,...

@Feeds ...this got 1st place in a game :P
but makes sense - it doesn't stay in one place for long at all, it's like the best thing you can make for a bot which doesn't stay in one place for a while :p
8:48 AM
Usually, the board isn't even fully painted by the time the game ends anymore. Damn.
9:11 AM
@dzaima boy never thought euclid would actually be kind of reasonably good
Someone really needs to adapt a controller for node and run that in parallel
@tomsmeding my controller already does games in parallel
and there has been work for node support for that framework I'm using, just that I have no idea how much work would it be to get it to work with my modifications
9:29 AM
@dzaima it seems like John is cancelling out LittleBrother quite often. I'll need to make him smarter ;)
9:57 AM
@dzaima awesome!
10:20 AM
oh really good bot 2 made John fail to find AnnoyingLittleBrother by dying D:
John just erases all memory when someone gets eliminated, but with AnnoyingLittleBrother that doesn't work
@HeinWessels sadly that should be pretty easy. John just barely works at all and abuses many flaws in the trolls
@dzaima Because LittleBrother also forgets everything when someone dies? XD
@HeinWessels oh is that so?
Yeah, I was too lazy to do the array handling in an smarter way. Or he just feels bad when another bot dies, so he gives the current target a chance to get away.
wait nobody died on that frame where john got reset o.O
it's the stupid %3s fault, John just can't kill little brother
10:50 AM
Testing with all bots included is turned into a nightmare!
How is @BetaDecay going to run 10,000 games? :D
11:13 AM
It's gonna take weeks at best. He did this to himself by not specifying a max function response time, though.
wait wat the 3 hours/50 games of mine still equate to 108ms/round - the usual for 1 game, but I'm running 2 games parallel o.O
Good grief, what did I get myself into?
Some edge-case hell, at a first glance.
Where everything is an edge-case.
oh what dfsbot used to take 50ms but now its 70 ಠ_ಠ
Dragon has a somewhat slow first turn but goes much faster afterwards because it uses recursive regex replace to generate the dragon curve but only needs to generate it once.
oh it's been updated to be a lot slower ಠ_____ಠ
11:26 AM
The "average case" has a 22.2% chance of occurring ಠ_____________ಠ
I am screwed. Absolutely done for.
Wait, no, scratch that - I don't even know what the average case is.
Either I'm not noticing something or I'm biting off more than I can chew. In both cases it's bad.
I just noticed a TODO: help, and I don't even remember writing that. I'm officially going insane.
those slow bots are good. I just ran a game with them disabled, and far sighted greed and random filler took the top two spots
@Neil well that game was just unlucky then. Jim usually wins currently no matter if the slow bots are included or not
Jim actually got eliminated somehow
@Neil John can do that in the published version
The worst part about this is that I went in thinking I only have 3 cases to consider. And now they just ballooned out of control.
I thought this was a simple challenge D:
11:45 AM
Jim ist holding Territorial in place while John cleans everything from Territorial. Not fair :<
Whoops. Territorial got marked as a troll :P
@logicBV that's exactly what Johns purpose is :p
Well it ist following anyone who dares to get into its territory..
@dzaima Only that you are hamstrining Jim by waiting for John to clean up.
Jim never won a game where John had to clean up Territorial
@logicBV yeah, the combo definitely has some flaws
@Alion In my mind it was such a simple challenge, I never thought that the bots would slow until DFS showed up. By that time it was too late to set a time limit
11:51 AM
Expect the unexpected :P
@BetaDecay I think its fair to assume that every KotH will get a brute-force entry at one point or another
Worst thing about debugging my bot is that I have to restart the entire game basically every time I make a change, because it keeps a lot of historical data that it doesn't/can't recalculate every frame.
And then I have to fast-forward some moves to get where I need him to be again.
@Alion yeah, I should add that skip to frame thing again
That's not even what I mean, the place where I need him to be is dynamic ._.
(could be frame 5 one game and frame 100 the other)
@Alion then add a throw dasjdiasjdoi in the code & then remove it if you need to test a specific code part :p
actually a console.pauseOnce() debug command would seem useful
12:02 PM
Might as well throw in a debugger; at this point :P
Various ways to do it, all of them quite annoying.
Since it's usually 5-10 frames it's faster to just click through and check manually than put some code in and then have to remove it.
Oh no. My bot's thinking time has somehow ballooned to 25ms.
My bot thinks it has managed to trespass 7 times on its own colors.
And thus marked itself as its enemy.
Maybe a better way of doing this is not by running for a set number of games, but a set amount of time. So maybe I run the tournament overnight for 8 hours
12:17 PM
No. That's gonna be way not enough games.
Well there's going to be no way for me to able to run any suitable number of games then
@BetaDecay I'd rather say run until the 1st place is distinctively better than 2nd according to some statistics
only counting winning as 1 and not as 0 gives very little info about each game though
I can probably provide some cores
Not sure whether you're trusting anyone else with it
Yeah, I'm happy to let others help
Unfortunately, game results are not repeatable because Math.random and other sources of non-determinism aren't disallowed, which makes the trust problem worse.
12:22 PM
@Alion well Math.random is overwritable
Then I wonder if people use other sources then... If not we could feasibly get results to be repeatable, which would be great.
@Alion my controller replays games perfectly so i assume no
Oh. TIL.
@BetaDecay should probably add a rule about only using Math.random as a source of randomness.
I wasn't going to implement that but as that example thing I worked off of said "look here for overriding Math.random" I couldn't not :p
Is there a way to get eliminated bots? Or is it manual only?
12:28 PM
@Alion Why?
@Alion force-eliminate some specific bot or just get a couple eliminated ones?
@BetaDecay So we can make sure that games are repeatable, at least on dzaima's controller.
Unless we don't want to change the rules at this point, which I'd also understand.
@dzaima No, I want to find out which bots are eliminated.
@Alion oh. Yeah they're just not listed anywhere
So manual via tracking which bots are present then. Got it.
I don't think that games should be repeatable. Maybe in testing it could helpful, but in the real thing it should be random
12:31 PM
@BetaDecay repeatable != not random
dzaima's controller provides a seed for each game, which you could use to replay that game exactly how it happened the previous time that seed was used.
I see
Which bots don't use Math.random?
I don't think there are any.
It's just a precaution.
Also, should I make the grid smaller?
@BetaDecay if you'd want tomsmeding to run some games for you, you give them a couple seeds which then get run and after you could make sure that a couple of those game results are actually what they should be by testing them (by testing a couple yourself)
12:35 PM
@BetaDecay No no no. Not at this point I don't think.
We'd need a community-wide consensus for that.
As for my personal opinion, yeah a slightly smaller grid would be nice. But I know a lot of contestant rely on the grid size quite heavily, so I don't think this should be done without their knowledge and/or consent.
To start with, I think the grid size should scale with the square root of the number of contestants, so that the space per contestant stays the same regardless of the number of contestants.
I couldn't figure out why my John detector didn't work.. Turns out everywhere I used S.John but set the value to S.john ಠ_ಠ
@dzaima What is your opinion about the grid size?
2 days ago, by dzaima
@BetaDecay I feel like a board with 20 players by the current formula looks decent, which turns into a coefficient of 180
@Alion That was what I proposed earlier
I mean, I wouldn't be against that, but I don't know if every bot would work fine after a change like that. I remember some bot using bots.length * 3 to test for grid size (which is wrong anyway, but that's not the point).
12:43 PM
...why not grid.length?
I checked again, it was suggested in the comments and promptly implemented.
I'd guess most bots will adapt just fine, but if some fine-tuning went into some of them then it will not be correct, unfortunately.
(although fine-tuning is really hard in this challenge anyway, so I don't know how many bots have any)
I can't imagine much fine-tuning has gone on considering that the grid size will change unpredictably
@Alion I'd guess the safe number of 0. (at least intentionally tuned)
I guess reducing the grid size make the controller run faster too
It definitely makes bots which run slower on larger grid sizes faster.
12:59 PM
Does anyone have any stats about the average points per game of top bots?
5 hours ago, by dzaima
overnight tournament. Jim with 11 wins, Euclid with 7, GiveMeSpace & DFS - 5. Took exactly 3 hours
That is going to change by every addition of a new bot and therefore increasing of the board size
@dzaima Thanks! My latest update to my bot (which isn't published yet) tops those averages easily, but isn't winning much games.
Is the final winner going to be decided by average points or number of games won?
@Night2 who knows at this point
According to the spec, number of wins.
1:04 PM
@dzaima That is important to know. If number of wins is important, I can tune my bot for risky strategies at the end if it is close to top score but isn't at top.
But if average point is important, then keeping the non risky steady movements could work better in long run
@Night2 then just assume its number of wins and blame betadecay otherwise :p
Right now with 3 parallel processes running on my PC with all 35+1 bots (35 published bots + my second unpublished bot), each game takes about 7 minutes, so I have a speed of 25 games per hour :-/
I still think just limiting the time and telling the extremely slow bots to improve would be the smarter thing to do either way
Oh no, O(n^3) algorithm for side length is brewing up D:
I won't even start my 3rd bot plans!
1:12 PM
@Night2 what processor running at what clock speed?
Hey, that's not that bad. Entire tournament in just over two weeks.
@tomsmeding "Intel® Core™ i7-4700HQ" up to 3.40 GHz
Only 1 core is used per process
I have an i7-7700HQ up to 3.80, which is theoretically better but should in practice make not much of a difference
It should be a lot better, yours is 7th generation and should not get over-heated easily, mine goes up to 70-80 degrees Celsius which reduces performance a little bit.
But then again, mine is in a laptop, which makes it overheat just as much :p
1:18 PM
Mine is a laptop as well
In an hour or so I'm home and will run a benchmark
(with the bots)
HQ CPUs are usually marked with "Mobile" which are used in laptops
And it seems some bot(s), or maybe my version of controller has a memory leak, my Chrome's memory usage is now over 4GB in less than 1 hour.
@dzaima did you experience any memory leaks on your fancy controller?
@Night2 no, pretty sure
you can check what's using ram with shift+esc
That only shows which tab/process is using the ram
@Night2 and it is the controller?
1:26 PM
They are my 3 open windows which are running the games in parallel
I can't tell if it is the controller or one of the bots
@Night2 oh why multiple windows?
But since you didn't experience anything similar, most be my controller then
@dzaima To run on 3 different cores
@Night2 huh, I'd assume that the controller already tries running on different cores
@dzaima I can do 1 game per ~7 minutes, so with 3 windows I get 3 games per ~7 minutes.
@dzaima I'm not using your controller, I'm using the original one with some small changes
The issue must be with it then
@Night2 oh, do those modifications include making your own localStorage? Because that supposedly is the same for all tabs
1:29 PM
@dzaima No and you are right, I forgot about the localStorage (facepalm)
Thanks for the tip!!!
@dzaima your controller is definitely using multiple processes in tournament mode
how many turns does a game have in @dzaima's controller in a tournament?
According to spec, 2000.
@tomsmeding it should be 2000
1:45 PM
I ran a part of a tournament with the current bots on dzaima's controller; the first game to be done (arbitrarily G4) was done after 9 minutes, and after 11.5 minutes the first 5 were done. (While the 2nd to 5th game were finishing, more were already started in parallel.)
my CPU is hot though ._.
Ah, the joys of implementing pathfinding.
@Alion mine is just look at the available 2 cells (or 1) and choose the best one, no thinking ahead. It wouldn't be that bad getting something better but ¯\_(ツ)_/¯
@dzaima I'm planning on doing a fully-featured Dijkstra, with travel costs and such.
Which means I need a priority queue.
Or do I? I never did any pathfinding, let alone in JS :D
dijkstra definitely needs a priority queue to live up to its complexity guarantees
in theory it even needs a priority queue with priority raising support
but in practice I believe that isn't that important
2:01 PM
I'm probably missing something huge but wouldn't you just start at the starting corner and just go to the further cells scoring them with your travel cost + its score and taking the minimum where multiple lead to it?
@dzaima I could do that if I wanted to search the whole grid.
oh wait that'd only work with my requirement of the path not taking more time, just optimizing score
@Alion How many more days will your path-finding add to the run time? :P
@Alion O(n²) doesn't sound nice :p
@tomsmeding btw MC is a slow but really good bot
2:05 PM
I'm learning how webassembly works
and doing it in my personal way, i.e. overdoing everything
but at some point I'll have a perfect development setup!
and then MC is going to be a lot faster
@Alion Actually, I should probably do it like that because it will save me a whole lot of sanity and time.
Thanks @dzaima. You will forever be known as the one who made me search the entire grid even if the target is one cell away.
Actually, that specific case can be easily optimized as long as I don't have negative costs, but I'm too lazy to do it.
@Alion I'd limit the size search to the bounding box of the start and the target (or maybe a bit more) and stop as soon as the layer with it is finished
@dzaima But I don't necessarily want to wade through a pool of unpaintable garbage. Time is of essence here.
Better phrased: how you use time is of essence.
2:10 PM
@Alion I wouldn't think that taking a long path around would be much more worth it though
if you're taking a long path and the whole rectangle between you and it is all unpaintable, it's probably just not worth going there.
@dzaima just noticed that at least in your controller gameInfo[1] is undefined for some reason
@dzaima That entirely depends on the priority of arriving at the destination. If the goal is just some general area to be in rather than a strict action that needs to be taken then one can argue that painting as much space on the way there is a better idea rather than just completely wasting some time.
@SamYonnou ಠ_ಠ I didn't push that ಠ_____ಠ
@dzaima thanks! I thought I was going crazy...
And also, establishing negative costs would make this type of algorithm automagically walk around a chosen hotspot.
2:15 PM
@Alion why would there even be negative costs
I'm probably talking out of my ass right now, but it makes lots of sense in my head.
How can "Random Moves" bot be ~0.040 ms per move bot my other unpublished bot which actually has some logic in it be ~0.023 ms per move?
@Night2 does your unpublished bot use randomness?
what controller are you using, and does that controller overrride Math.random
and with what monstrosity of a piece of code does it override Math.random apparently :p
2:18 PM
I'm using @dzaima's controller
I guess that "Math.random" override is doing that then!
that shouldn't be that slow though
There are actually some other faster bots with some logic as well if you look at it
humble paint salesman is at 0.016
when the time is that low, I'd assume randomness (of execution time, GC timing) takes a big role
yeah that math.random override shouldn't take that much time
2:21 PM
sounds of tech bloggers furiously typing "Don't use Math.random!" echo in the distance
if I assume that the JS engine is optimising those array and this accesses soundly
@Alion well I'm not :p
I think we should decide the winner based on amount of points they have got for each miliseconds :P
that would completely change the game :')
MC would be last I guess?
2:22 PM
@Night2 DFS would be last.
Yeah, DFSBot is also using lots of time
I'd guess Really good bot 2 would be last.
It's fast but doesn't get any points so...
It dies very fast but could die with 1 point per 0.05 ms
@Alion 1/0.005 is 200 for RGB2. DFS has 454/70 = 6.48..
Oh damn.
2:29 PM
@Night2 while @BetaDecay should run the tournament as described, there's nothing to stop him, say, giving a bounty to the bot which was the most time efficient or had the best average score, or whatever
..why do I feel like MC used to be 20ms but now is 70?
it was 40ish for me before, 70ish now
slower than DFS
Actually... Screw the pathfinding for now.
I wish I had more time for this challenge D:
@Neil I was mostly joking though. He will already have a hard time running so many games. Not sure if we want to add run time calculations to it as well :P
Is this a sign of Trollbot infection? i.imgur.com/Bf8xwkC.png
btw, since DFSBot's score is always positive it should be possible to prune paths early when they can't give a better score than the current known best
2:35 PM
@Night2 Potentially, I think some other bots could've done that as well.
@Night2 any of the troll-ish bot infection.
A: Art Attack KoTH

logicBVClaimEverything function (myself, grid, bots, gameInfo) { let my_c = myself[0], my_x = myself[1], my_y = myself[2], size = grid.length, roundnum = gameInfo[0]; let getDistance = function (x1, y1, x2, y2) { return (Math.abs(x1 - x2) + Math.abs(y1 -...

@Feeds Name sounds terrifying.
@Alion The code isn't long enough to scare me :P
Maybe that's the key
2:38 PM
I think it's just another "alright" bot.
Like how viruses are the most deadly but also the simplest organisms on Earth
@dzaima I guess "John" doesn't save strangers :P
@Night2 the strangers need to show proof of being able to cooperate with John
(aka do nothing (ok it's more complicated than that))
Ah, yes, the classic if (a = b). Damn it.
@dzaima I guess I will leave Jim and John alone
2:41 PM
doing nothing will work against 3/4 trolls, but not TrollBot which needs 2 entries working together to kill it
@Alion Use a smart IDE which warns you about those :P
I'm too lazy to drop Notepad++ for JS.
@dzaima I am innocent... Maybe you didn't run in tournament mode before and do now, and your CPU is throttling or you're noticing HT effects?
@Alion Have you tried WebStorm?
It's a trial though D:
2:45 PM
It has a free trial and you can get a free 1 year license if you have a student email address for personal uses.
I mean email address with academic domains like .ac.x
I'm not a student.
What if my student email doesn't have .ac.x?
I use JS basically exclusively for challenges like this one and stuff anyway, so...
Actually, I'm getting a new student email this week
I could maybe try using VSCode or something, since I already have it installed.
2:48 PM
@BetaDecay I don't know, I used to get free licenses each year for PHPStorm (which is from same company) for my personal uses with my student email. And it was automated. You can get more info here: jetbrains.com/student
Nope, I've gotten way too used to N++ :P
I blame Formic Functions.
I see, I can use my ISIC card
what country do you live in @BetaDecay?
I didn't know what that card was, looked it up, found out the headquarters of the whatever that runs that is based in Amsterdam, while I live in the Netherlands
so I was confused
but ah
2:52 PM
@BetaDecay You probably should be able to use your email as well, if you look at the first FAQ question, any domains in this repository are accepted: github.com/JetBrains/swot
so it is this commit. It made the inputs get copied for each entry and fixed the max round problem. No idea why that'd affect MC specifically though
@dzaima you're copying the grid for each player now?
that might explain why its slower
@SamYonnou it's not counted in the entries thinking time though
and even if it was, it'd be increasing every entries time
if there were any bots that edited the grid object they got it could have weird effects in the old version
@SamYonnou mhm, that's why I added that
3:06 PM
so maybe thats what was happening and causing some bots to be faster because they got an edited version fo the grid or something
although im not convinced about that either...
yeah, editing out the .map(c=>c.slice()); on this.board speeds it up again
test to see who is editing their board
i know DFSBot does, but it looks like it puts it back the way it was afterwards
I'm pretty sure MC does not edit the board, but I can check
it's definitely not the copying time as just adding a lone this.board.map(c=>c.slice()); does nothing to the speed
@SamYonnou yeah, doing that now
MC does grid.map(l => l.slice()) before it does anything with it
3:14 PM
noone seems to be editing the board o.O (yes I tested that it actually checks correctly)
only thing i can think of is GC
instead of creating a new board every time you can create just two and copy from the first into the second for each bot, and give that bot the second version
although you would also have to check in case some people changed the size of the board you give them
or replaced some rows with non-array objects or something crazy like that
so it might be more trouble than its worth
ooh could it be that I'm initializing the board with set-size arrays?
not sure why that would matter (disclaimer: JavaScript is not my strong suit)
A: Art Attack KoTH

Night2Feudal Noble function (me, board, painters, info) { let meX = me[1], meY = me[2], round = info[0], size = board.length, sectionSize = Math.ceil(size / 3), storage, storageKey = 'jijdfoadofsdfasz', section; if (round === 1 || typeof this[storageKey] === 'undefined') { let bounds ...

making the copy filled manually with new Array(this.boardSize)s seems to have sped MC back up again :D
was thinking why it's slowing down engine time, realized I still have the equality checking there ಠ_ಠ
implementing that copying method in MCs copy2D slows it down interestingly enough
heh, replaced the column arrays with Uint8Arrays and that seems to have taken off ~20ms from step average
(aka right back where the speed was before the copying :|)
3:48 PM
@dzaima what were you previously doing, pushing on an empty array?
I wonder why that makes a difference, possibly some v8-specific array optimisation
@tomsmeding .map(l => l.slice())
I guess it prefers to know the arrays size
... but
I suppose the js engine keeps the size of an array you push to as well
I hope
one turn?
@Alion Implemented path-finding?
3:50 PM
What I'm doing absolutely sucks for performance apparently.
@Alion 2 years of tournament :D
@Night2 No, just changed some things around because I needed more functionality.
@dzaima Oh god.
No, I will try to do something to counteract this, but it's probably not going below 100ms anytime soon.
so performance will be right back where it started, except that now if you do grid[1][2] = "Hello, World!" it'll set it to 0 instead.
alternatively, for 13ms improvement you can remove the copying completely :D
@Alion 100ms is still around 24 hours in 10,000 games :D
3:55 PM
@Night2 what? without parallel games 1ms is 5.555 hours
@Night2 ^
That's 23 days.
Oh yeah, I converted the 555 hours to days, but I forgot it 1 second later!
That is how buggy my brain is! Can someone fix it?
@Alion what the hell are you doing that must be done every frame?
Things that could be done more efficiently if I wanted to go low level.
But I don't because brain fries.
00:00 - 16:0016:00 - 23:00

« first day (9 days earlier)      last day (34 days later) »