« first day (10 days earlier)      last day (33 days later) » 
01:00 - 16:0016:00 - 23:00

4:03 PM
I find the most obscure edge cases.
 
oh wow I have a handshake already
 
@dzaima hmm yeah that makes sense, I'll try to think of a way to make it less random and somehow favor my other bot
the problem with communicating in game is that any other bot can spoof your communication
e.g. if i make BGH stop its attack if the target waits for two consecutive turns
then anyone program that into their bot as an evasion mechanism
 
@SamYonnou mine extends up to 40 moves (to extend it I'd just have to extend the random data array) but stops as early as you know that anyone can distinctively tell you apart
i.e. by simulating what others would do
 
@dzaima Holy shit you're insane.
 
which brings up a an interesting problem: it favors people who submit their bots (or big changes to their bots) close to the deadline
 
4:09 PM
@Alion well I had been thinking about making a handshake between Jim&John for a while, so I had the idea down
 
@SamYonnou But doesn't spoofing communications by mimicking a bot count as "intentionally targeting a single, pre-chosen bot"?
 
arguably using communications in the first place is already "intentionally targeting a single, pre-chosen bot"
the rules could have been a bit more fleshed out in this area
 
Well, the broader context suggests that this only counts when working against someone.
Then again, "handshakes" may violate the "no communication between bots" rule.
I dunno, we should probably ask the man himself about.
@BetaDecay
 
yeah
 
But I swear if he drops the banhammer on handshakes I'm gonna be pretty pissed.
 
4:13 PM
what if I literally just copy and paste the logic of one of my bots into the other so it could simulate the board from the pov of every other bot to determine which bot follows the exact strategy
 
@Alion you just forced him to allow it :p
 
1000ms BGH here we go lol (I'm just kidding, I'm not that evil)
 
@dzaima I didn't say who I'd be pissed at. The answer is myself. For not verifying this way earlier.
 
@SamYonnou I did that once with TBTPTBCBINAP. It worked beautifully, except that my trolling logic was horrible
 
And I guess him slightly for making the rules unintentionally vague.
 
4:15 PM
@dzaima the main problem is that HeatBot already is in the top 3 slowest bots
 
@Alion Then again, this would mean taking the wraps off the moment I thought of the idea.
 
perhaps to solve some slowness issues the tournament should be ran with random groups of 10 bots on a fixed size board, but its too late to change that now
 
@SamYonnou That was the solution in Formic, although Formic didn't have a fixed game count per tournament so...
 
That could have been a possibility, but it'd change the game mechanics by a lot -- if only by introducing the possibility that your handshake partner is not even in the game
 
And that. Yeah...
 
4:20 PM
yeah
or maybe if there was some straight forward way of compiling javascript to something more reasonable in terms of performance...
 
@SamYonnou V8 is already incredibly fast, though tomsmeding was looking into WASM
 
I am
and slowly I am succeeding
though I now still have a memory out of bounds error
but whether that's my C code, my javascript wrapper, or my hotpatcher that actually parses, modifies and serialises wasm files
that's to find out
by the way: wasm doesn't seem to have a source of nondeterminism built-in, so I basically have to write my own PRNG and use Math.random for seeding
so my stuff doesn't introduce any new randomness sources besides Math.random
ah
I assumed that an upper bound of 25 on the number of bots would be fine for the forseeable future
wrong
can I assume bots.length <= 50 :')
 
4:39 PM
if you're gonna assume, at least make it scream when that isn't true
 
My bots are highly suicidal and nothing I try helps. What do?
 
@Alion if they're about to die, make them not :p
 
@dzaima My spaghetti doesn't let me do that.
 
@Alion then put that before the spaghetti
 
@dzaima But then bots that were in the same place will just step on each other's toes trying to live (because same code).
I have some things in the spaghetti that prevent stepping on toes.
 
4:42 PM
@Alion ooh so that's why 3 bots are good
 
@dzaima running a representative version of HeatBot in Java I'm getting on average 0.6ms per turn
compared to 22ms per turn in JavaScript
 
@dzaima Hm? What do you mean?
 
@Alion if you can't erase your opponent at all in any way, you can have 2 gang up and use the edge-case to erase
 
@dzaima Yep, that's one of the non-obvious things I noticed and used.
But that requires treating 2 bots as one.
And then I put that pair through a role assignment system along with the singular bot.
 
(using a 111x111 board with 38 players that just do random moves, and heatbot just does the heat calculation and doesnt actually select a move)
 
4:46 PM
@SamYonnou Barring bugs, my wasm MC does in ~3.3ms what my js MC does in ~50ms here
so yeah, I'm not surprised :p
 
@Alion And then throughout the rest of my spaghetti I treat the pair as one, but if one bot from the pair is dying I want to treat it as a separate bot.
 
^ this is my test for heatbot performance in java
should at least do the same number of operations, and the other details shouldnt be too important
 
@Alion All while keeping the spaghetti avoidance mechanics intact...
After the deadline I'm so redesigning this whole thing from the ground up.
 
Okay chrome and firefox are completely incomparable in terms of performance
Chrome did 250 turns in ~42 seconds, while firefox only took ~27
in particular, MC (the published JS version) takes ~55ms in chrome, while it takes only ~28ms in firefox
 
@tomsmeding okay what
 
4:53 PM
one problem with my test is i was creating a new heatmap every time, but fixing that the average turn time is till only 1.5ms (pastebin.com/QZgRa4Bk)
 
The benchmark might be slightly unfair since, even though I used the same seed (in dzaima's controller), chrome and firefox seem to have different random number generators since the results are different
 
Okay, I somehow managed to tie in some more spaghetti to handle this perfectly.
 
@Alion The only right way to fix it
@dzaima I used Chromium 68.0.3440.106 and Firefox 62.0b16
 
@tomsmeding no, I get the same results too. Just that I expected the opposite o.O
 
oh wow
yes I also expected v8 to be faster, but only by a small amount
 
4:55 PM
Aaaand now bot 2 is chasing bot 3 who is trying to recover.
 
wasn't sure about wasm performance though
 
hmm i switched to Chrome because Firefox javascript was deathly slow, maybe its time to switch back :-)
 
full game 135ms/step chrome, 91ms firefox
 
firefox is even slightly faster for wasm, but that's only 2.3ms vs 2.7 ms or something
@SamYonnou how long ago? :p
 
i think around version 30ish not sure
 
4:57 PM
the version numbers have literally more than doubled
maybe re-evaluate :p
 
yeah its been a few years
 
mozilla has really been pushing the performance of firefox lately, also the renderer itself
 
my problem wth Firefox now is that stuff that works fine in Chrome and Edge breaks in Firefox
 
stuff like?
 
not actually sure, but related to some web applications we use at work
might be some CSS issues
 
4:59 PM
web standards and adherence to them being what they are, I'm not surprised
all the world is a VAX chrome is a real thing
so how do you do strikethrough here?
 
@tomsmeding ---text---
 
it just surprises me that Edge works better than Firefox in that specific scenario
(although Edge is still super slow)
 
thanks both :p
I guess I'm lazy
 
(and apparently parses Dates differently which breaks some other stuff that I don't thankfuly have to use)
 
5:01 PM
date&time programming is the worst
 
Hm. I'm starting to think that a codebase-wide refactor is in order here. To the point where it actually might save me time.
 
> Barring bugs, my wasm MC does in ~3.3ms what my js MC does in ~50ms he
That was pretty inaccurate
wasm MC is more like 12ms
but still, that's an improvement!
(and chrome timings)
 
@tomsmeding You just saved Beta over a week!
 
🎉
 
Meanwhile my bots are running at 100ms each.
 
5:05 PM
So nobody else wastes their time: Opera is about the same as Chrome in terms of running the game
 
Once @BetaDecay is here again, he's going to check whether firefox is also faster for him, and if so, he's going to use firefox :p
thanks
 
Opera is based on V8 IIRC.
 
Oh I should try the Eclipse built in browser :D
it just crashes :-(
same with Edge
 
Damn the butterfly effect. I had such a nice, isolated case and after what I think is the fix it's just gone :C
 
oh wow firefox (based on my speeds) is saving 10 days off the tournament (times the number of parallel games; excluding Alions bots)
 
5:17 PM
switching to Float32Array makes HeatBot about twice as fast
 
right, I should work on my trio. haven't done anything past the handshake :|
 
5:34 PM
And now my bot is crashing and I have no clue why or how ;_;
Yeah, I should really ditch this codebase and start mostly anew. This is unrecoverable.
Especially since I have a bunch of functionality I still need to implement, and interweaving spaghetti is not fun.
 
eating it is more fun usually
firefox has a really bad downside though: it doesn't support image-rendering: pixelated; on a canvas
so dzaima's controller looks crap
 
@tomsmeding yeah, I noticed
it's good for tournaments though
 
Let's hope no bot uses browser-specific code D:
 
it does support image-rendering: -moz-crisp-edges;
I AM SO HAPPY
 
@tomsmeding pushed
 
5:47 PM
thanks!
I got the idea from here, so potentially you might want to add some more CSS keys as well
but I don't know whether that's a good idea or not
 
@tomsmeding weird, I just checked an existing tab I had open, and the style showed up in style inspector but I had to click it off and on again to get it to apply
 
it doesn't show up for me yet, but maybe that's caching
@dzaima I have to say your commit messages are enlightening
 
hovering a bot is tricky when they keep changing positions...
 
@tomsmeding You might like Canvas. A total of 18 s (plus 16 on the 2nd page, 28 on the 3d) :p
 
6:00 PM
@tomsmeding this is why you make tests kids
 
6:42 PM
along with a change to the controller, you can now get a perma-marker over an entry with this code. (until you hover over another entry in the table, that is.)
 
6:57 PM
that's pretty useful!
 
7:08 PM
protip: making that a bookmarklet (with javascript:that code) improves ergonomics
 
7:23 PM
k now my controller has a 4th item for each bot in the bots array - its name. Use that feature for debugging wisely and remember to always test your code on the reference controller.
 
juicy
 
7:38 PM
I'm finish salvaging all salvageables from my previous bot, and will soon attempt to remake the behavior system... Wish me luck. Or don't if you want to see me fail ._.
 
ಠ_ಠ why are my color erasers going the opposite direction of color
 
@dzaima ಠ_ಠ Why are you so far along if you've basically just started?
Unless you're taking a different route... which is possible.
 
@Alion Jim already had area searching code and a "go to" function. Rest is just simple logic tying it together
 
Yeah, I guess that would make sense.
 
of course I don't have anything fancy beyond that and if there aren't 2 workers who can overwrite the enemy color there is crying in the console and I try the next top target
@dzaima though I seem to have failed doing that "simple logic" part :p
 
7:46 PM
You're much faster at prototyping that I am anyway though. My trio's first kill happened today - after 3 days of dev.
 
oh I have max search distance set to 8 ಠ_ಠ
 
Oh and by the way, I've come to realize why my bot is so slow.
 
@Alion I didn't waste time converting the inputs and setting up a (as you've found, horrible) framework though
 
I was using floodFill basically as grid.filter.
Which is not a good idea, since floodFill is inherently way slower than a simple .filter.
@dzaima Oh, the framework itself is pretty decent. I just made it OO and I'm rolling with it further.
The problem is with spaghetti behavior logic.
 
heh if a bot is in the top left corner and the remaining 1 color is on the bottom right the searcher will attempt looking at 8x the tiles the grid has
 
8:03 PM
I'm starting to copy-paste more and more stuff from my previous attempt. This means one of two things: either the refactoring wasn't that needed, or I'm being stupid.
It's a shame bots can't share info with each other. I mean, it would literally cut the run time by 2/3 and the bots wouldn't gain anything from it.
 
@Alion do you transfer info between bots after the handshake?
 
@dzaima Nope.
I just calculate everything for all bots, on all bots, and then decide in unison.
 
@Alion good, but shouldn't the runtime be only affected during the handshake then?
 
@dzaima Yeah, but the handshake takes basically no time at all, right?
Wait, we're not on the same page, are we?
 
@Alion oh you do all 3 bot thinking jobs that's what you meant
 
8:12 PM
@dzaima Yep, because choices made by the first bot influence the second, and so on...
I guess I could probably cut the thinking time in half by making the first bot's choice independent, then the second's only on the first's, and the third only has to calculate all of them.
 
all I do in unison is pick the target and assign jobs (though I haven't even started thinking about the bot doubling thing)
I don't care if the bots do the same thing accidentally ¯\_(ツ)_/¯
 
Yeah... After copying some more stuff I realized that I didn't really need to refactor the whole thing, and I was simply missing a little something that came to me after a short break.
Oh well, still made everything a little cleaner so not complaining.
Although, wait, the deadline is, like, the day after tomorrow (probably).
There's also potentially an advanced tactic - you can technically clear out bots that you're 3x neutral to if you try to predict where the bot in question will move, since that will neutralize his fresh path and the two leftover bots can clean up the mess. Though it is very unreliable, especially for unpredictable bots.
 
8:43 PM
@dzaima finally figured out why even after fixing that nothing worked. ....I replaced that max size with grid.size*2+2 ಠ______ಠ
 
depending on what you're searching at that max size, that's a deep search
 
hey, at least I found a bug in the controller while at it (it was only visual)
@tomsmeding I'm searching in a rhombus the next color to move to. That's what this was about
it's only called once until the bot's at the place though, compensating the slowness with a bunch of fast moves
ಠ_____ಠ testing the code and it doesn't work still. turns out I made a chat message about the problem but didn't fix it
 
beautiful
 
huh, Leonardo managed to win that speed bot challenge (normal game but without any of the slow bots)
@dzaima count of empty squares y/n?
 
8:59 PM
@Neil ?
 
well, we know how many squares are owned by each bot, but I was wondering whether the count of empty squares could be useful
 
@Neil oh as in the controller GUI?
 
right
 
I did once think of adding that but I decided I was lazy
 
the fact that the first turn is gameInfo[0] == 2 is set in stone now right?
 
9:04 PM
@tomsmeding ...what no
 
I got tired of this and just rolled my own turn counter :P
 
1st turn is gameInfo[0] == 1 and it should stay that way
@Alion what the hell it was 2 for like 1 second and it's been 1 forever now
 
lol I've been living under a stone apparently
 
@dzaima Ah. Well I didn't bother checking if it was fixed.
 
well this is the first time I'd be using it anyway, but good it's been fixed :p
look at me not even bothering checking the controllers before asking here ._.
 
9:07 PM
hey i've been no better :p
oh wow my biggest enemy finder didn't update the biggest score and was just picking the last entry ಠ_ಠ
 
By the way, I've found the exact thing that was making my code really ugly. It was the partner of a bot-doubling being treated as a fully-featured bot, which introduced a whole ton of edge cases and bloated everything. In simpler terms, I mistook an edge case for the average case.
 
9:41 PM
Oh. I didn't really need to store the functions (and then later create a weird object to store an ID of a function). Moreover, it was less concise and more contrived to do that.
 
@dzaima That looks like some "go towards position" code.
Horribly contrived.
What are you trying to do, though?
 
@Alion yeah, it's supposed to be code for going towards a position, preferring to go to a specific color. Looks like I completely forgot a map though while getting absorbed into aligning everything
that makes everything uglier :'(
 
9:56 PM
By the way, I'm also making my trio scalable, so the I can witness the destruction that a massive swarm causes >:)
 
all mine would need for >3 bot support currently is more random keys for the handshake
 
@dzaima Yeah, same here.
...and replacing the magic number 3 everywhere ._.
 
oh yeah..
... I'm doing ax==ay and if that's the case, testing ax+ay==1, but that's obviously false for integers..
 
maybe replace the + by a -
 
no, I needed 2 instead of 1
 
10:09 PM
then it's equally untrue though
what are you even trying to do
oh
 
@tomsmeding checking if I'm on a diagonal from the target, and if I am, prefer to go to one of the targets colors
why does one of the bots have thinking time 1036.463ms?
oh because debugger
 
:') useful
then you're debugging pretty fast, if you can debug a whole move every second
what does a red dot next to a submission (in the edit list) mean in your controller @dzaima, maybe that the submission is edited?
 
@tomsmeding eliminated
 
seems unlikely since I now have a red dot next to TrollBot
OH
 
eliminated entries are striked out in the leaderboard too
I took the disqualification logic, usually for erroring entries/bad outputs and used that for elimination :p
there's also a stupid Disqualified: on the right that should show the error for actually erroring entries, but doesn't ¯\_(ツ)_/¯
 
01:00 - 16:0016:00 - 23:00

« first day (10 days earlier)      last day (33 days later) »