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

1:46 AM
0
A: Art Attack KoTH

12Me21bounce function([,x,y],{length:width,[0]:{length:height},[x++]:{[y++]:floor}},{},[current_round]){ //wait if floor can be painted if(floor===0) return "wait"; //set velocity at lower limit this.vx|=x===1; this.vy|=y===1; //reset velocity at upper limit this.vx&...

 
 
8 hours later…
9:24 AM
Good grief, my code looks so stupid.
But I don't have time to refactor :c
 
10:03 AM
ಠ_ಠ all Big Game Hunter does is randomize the scoreboard
 
@dzaima How can I debug LittleBrother in your controller? LB works well in Beta-Decay's one, but doesn't on yours. I think it's to do with how LB stores it's target's moves, because it doesn't look like its working.
 
@HeinWessels looking trough your code, what the hell is Array.apply(null, Array(bots.length+1)).map(Number.prototype.valueOf,0);?
 
Random piece of code I copied straight for some website that apparently creates a zeroed array.
 
new Array(bots.length+1).fill(0) :p
also, bots.length changes troughout the game as bots get eliminated
 
Thanks :p
 
10:12 AM
you should store it on round 1 and reuse everywhere
also, even better, new Uint32Array(botAmount+1) :p
 
Yeah, I know. But bots.length shows me how much elements there are in the bots array.
 
@HeinWessels there might be bots with IDs higher than bots.length+1 though
bots.length shrinks, the bot IDs don't.
and then for the bots whose IDs didn't fit into the score array, their score will be NaN
 
That makes sense, I'll have to adapt that. Shouldn't be to hard.
Okay, I found the console screen. Is there a way to stop my program and see all the variables? I'm growing tired of all those console.logs
 
@HeinWessels add debugger; at the codes beginning and chromes devtools will allow you to step trough the code lines
 
@dzaima Oh wow, thats awesome. It's so much easier.
 
10:26 AM
Every inch of my being is screaming at me to stop writing the incredibly garbage code I am writing. Why is the deadline so tight?!
I need one more week for this. Desperately.
It's partially my fault, though. I definitely chose something way too large for the time I had :c
 
@Alion if you publish a bot that takes 500ms/round, I'm pretty sure BetaDecay will allow you to optimize it :p
"The 10,000 games is estimated to be run next Monday"
but yeah, the deadline is way too short
 
@dzaima That's not the whole point. The code itself isn't too inefficient. It's just that it's so ugly I want to puke, and if I decide that a behavior needs another parameter I'll probably have to through and update 40 lines of code and break 10 things in the process.
Alright, I've managed to finish a MVP, as long as it's bug-free (which I haven't tested yet).
And of course, it's bugged beyond belief.
Well, okay, to be fair 2/3 work perfectly, which I absolutely didn't expect considering I haven't tested anything in 6 hours of programming.
I guess writing really dumb code has one advantage: I know what it does pretty well because it doesn't use any advanced features of a language I'm not too familiar with.
 
10:51 AM
heh, another bot idea from your struggles: a bot that's always pathfinding
 
@dzaima I found my that caused lilbro to follow so weird. It was the way I store a boolean value in local strorage as a string (so efficient), which didn't work. Works much better now
 
@HeinWessels yeah, localStorage and my controller don't go well together :p
 
Is it possible to call a function from within the debugger?
 
@Alion esc
and then there's a console
 
Oh man.
I should really just learn everything DevTools has to offer.
It will be good for my sanity.
 
10:56 AM
@dzaima The behavior should stay constant though won't it? If it works now, there's not gonna be weird controller edge cases which breaks it
 
@HeinWessels if it works now on both controllers, it should remain that way. It's that my controller doesn't stringify the contents of localStorage which makes it different
 
...can I somehow step through the code I write in the console? ._.
 
@Alion prepend debugger;? idk :p
 
Because I apparently screwed up a grid.at(x, y) function.
Or something. I don't even know anymore.
This is shaping up to be another Bug Of The Year. The third one this week.
 
@Alion a? how many do you have?
that's not even a non-serious question..
 
11:11 AM
@dzaima One. English is hard.
 
phew
I'm guessing it checks for out-of-bounds?
or is it too 500 lines
 
I transform the grid into a 1-dimensional array in pre-processing.
 
ah
 
But apparently I screwed something up at that point.
Because the last cell, despite clearly being a dark blue, is of id 0, according to my grid ._.
How does one even screw that up?!
 
@Alion did you take into account that the xth item of the grid array is the xth column, not row?
 
11:15 AM
@dzaima Yes. I hope.
I'm looking into it right now...
Oh, and by the way, something gobbled up my const gridSize = ...;
Because that thing is undefined.
Even though it's const.
And a number.
¯\_(ツ)_/¯
 
@Alion oh god your grid array items are objects
 
@dzaima Yes, yes they are. Because I tend to add properties to the grid.
And then delete them.
Am I evil yet?
for (var x = 0; x < gridSize; x++) {
  for (var y = 0; y < gridSize; y++) {
    grid[x * gridSize + y] = {id: dataGrid[x][y]}; // TODO: Use toPos()?
  }
}
There doesn't seem to be anything wrong with this...?
I'm running out of options...
Okay, so the grid is fine when it comes out of initialization, but something screws with it later down the line.
 
11:32 AM
im a moron
am I a moron again?
 
@dzaima My grid transformation code?
 
removing the console.logs sped it up to a comfy .2ms
 
I also do a grid = new Array(gridSizeSqr); as initialization, by the way.
I don't know how that affects performance.
 
yeah, I did that too
 
That should improve performance over doing grid = []
 
11:39 AM
I have managed to pin-point the issue.
...kinda.
Because I know exactly which line screws things up.
But I have no clue what that line does that would screw anything up.
1. Code execution enters a place where grid is unreachable.
2. From there, I call a function which can reach grid.
3. grid is now f*cked.
 
@Alion so your grid isn't a global variable in your function but in a closure?
 
@dzaima Well, grid is a const declared in the main bot function body.
Please tell me the various ways I have managed to screw this up.
 
@Alion then how do you make it unreachable
 
Um... I don't know?
 
@Alion well you said it's unreachable, so you must've done it one way or another
 
11:46 AM
Okay, then, let me see step 0. I'll write it down...
 
what I'd suggest is keep doing that reduce alternating with an F11 (while debugging) and when it's incorrect, stop
@Alion aka debug that function
 
@dzaima I do exactly that.
And at some point grid is not defined.
And then it's screwed.
 
juusst to make sure: you're not recursively calling your main function, right?
(not that that'd tell me anything lol)
 
@dzaima Nope.
A'ight, I'll try something else - I'll make that stupid function that makes grid not defined into a () => function.
That should teach it.
Maybe.
 
@Alion oh that'd happen if later in that function you're doing var grid = ..., shadowing the const
 
11:51 AM
@dzaima Nope, nothing of that sort.
 
search for the regex grid\[.+].*(?<![=!])=(?!=), otherwise I'm out of ideas. It's hard to debug others' code without seeing it :p
 
debugger; doesn't work anymore.
What in the world is happening.
 
@Alion code not compiling?
 
@dzaima Nope, putting return "wait" at the top understandably makes the bot stand still.
 
@Alion how about 'up'?
 
11:57 AM
@dzaima It makes the bot go up.
 
huh.
have you exited the existing debugger?
 
Nevermind, I just put the debugger; in a place that, even though gets called, somehow misses that statement.
¯\_(ツ)_/¯
 
so a console.log works there but not debugger;?!?
 
I want to make this shit up, but nothing works there.
Except for the return statement I have there.
I think the next step is exorcism.
 
okay im intrigued
does a throw dkgjkjdf7gjdkfjla work there?
if not, either you've found a bug in V8 or that code's is actually not used and is overridden somewhere
 
12:04 PM
Okay, now I'm getting compile errors when trying to put anything there.
So that's progress, I guess?
 
@Alion is that a lambda? did you wrap the code in {}s?
 
@dzaima Yes and yes.
 
also what errors
 
Was just being dumbo, now compiles fine and doesn't throw.
doesn't throw
 
now make sure that code is actually called
 
12:07 PM
I'm retard.
I was storing the broken function across turns, which is why the new, hotswapped one didn't even get called.
Okay, but that still doesn't explain the mysterious grid.
Or does it?
 
@Alion now you can at least test more stuff I assume though
 
Closures are retarded.
 
oh yeah that would be a side-effect of storing functions.
 
I am creating a function on turn x, and the reusing it in turns x, x+1, x+2...x+n.
And of course it stores a reference to a grid frozen in time.
I thought that I was somehow "escaping" the closure by calling a function inside the main body.
But of course, that is also frozen in time.
Which is also why stuff like const gridSize gets gobbled up.
Because it's simply unused.
Well, here's a lesson: learn how closures work.
So how the heck do I circumvent this?!
 
@Alion or just don't reuse functions that access global variables, or test your gigantic assumptions before relying on them
@Alion either pass grid as an argument to the stored functions or don't store those functions.
 
12:18 PM
I guess I'm going to just pass everything needed as arguments...
 
why would you store functions though
 
That's a good question.
That I don't have a good answer to.
 
the function submission is evaluated only once, compiling all the functions and leaving them that way
 
I guess it just felt the most natural in the code I was writing.
Because I'm using behaviors and stuff, and I just pass some arguments to "behavior creator" functions.
 
this "bug" is one good reason to write pure code :p
 
12:21 PM
I'm surprised I didn't encounter this in my Formic days.
 
@Alion in FF you couldn't store anything though
 
Ah, right.
Well, actually, I'm not sure how I'm supposed to write it without storing functions...
 
@Alion Why would you need to store them at all?
store them for the round, not the game
if the functions need some closure variables, store those not the function
 
Basically, I calculate which behavior I should perform and call a getBehaviorX function with some chosen arguments that returns a function that returns what the bot should do at some point until I deem that behavior complete and choose another one.
 
your best bet is probably to have each behavior have a subfunction that you call at the start of every round that sets the inputs for the function
 
12:33 PM
So I can refactor this into an {args: ..., behaviorID: ...} for example.
 
and... store the functions
@Alion or that if that's feasible
 
And instead of behavior(...args) I can do behaviors[behavior.behaviorID](...behavior.args)(...args).
...ew.
But I don't care.
Or maybe I actually do care. Ew.
Can I maybe somehow wrap that in a helper..?
Ah, of course I can. My brain is starting to melt.
 
oh ಠ_ಠ in my controller any entry which doesn't declare variables with var/let makes them public for all entries
they get what they deserve though
 
Well, wouldn't that happen with Beta's controller too?
 
oh it does? ಠ_ಠ
 
12:46 PM
I don't know, I'd just assume that that's the default behavior.
I haven't tested, obviously.
 
it does indeed happen
 
Don't use global variables, kids.
Now I have closure paranoia, making sure every line I write doesn't do anything bad with closures.
 
1:10 PM
Yes! My grand strategy is finally working!
It's still mildly drunk, but it's working!
And there are a lot of edge cases that I'm not handling yet, which is why I don't even have a reason to test it in a full, 2000-move game (because it would at best not get eliminated).
But I'm getting there. It should be fairly smooth sailing from here.
 
@BetaDecay I think there should be a additional final tournament with no troll bots. The troll bots inhibit the smarts of the bots, and makes it much harder to show how well it's designed. Troll bots essentially try to balance out the leaders.
 
1:28 PM
Does anyone have some ideas about what this can mean? ;)
 
@Alion that output looks remarkably like something that Jim has at one point or another given out :p
 
Well, you might be onto something here. The Big Reveal(tm) will probably have to wait for tomorrow, but I will probably slide in one or two more sneak peeks along the way.
 
I mean I'm probably closed-minded but I don't really know what else could it be other than targeting an area with either the colors of a big enemy (or just white) or an enemy which seems to do good
another guess would be all of the above as different behaviours
 
@dzaima That is technically a part of the story... but definitely not the big picture.
Oops, might've said too much. Don't figure it out yet.
 
1:55 PM
a thing I've been working on adding onto Jim is better near-sighted escaping from bad places. though the scoreboard gives it an average of 573 with 2nd place at 532 (without DFS, MC, HeatBot & scoreboard randomizer), only 10 wins over 2nd places 9
 
@HeinWessels I'm not sure that's fsir
For a start, how do you define a trollbot (apart from Trollbot)
 
Not in place of the actual tournament. Just an additional showdown of the smart bots. The normal tournament still goes on
 
Oh I see. I probably won't do that myself
 
@HeinWessels the trolls which don't target specific bots are fine IMO. It's those who prefer to target top bots which are pure horrible because all they do is randomize the top couple spots
 
@dzaima All the first type does is introduce more randomness to the results then... Pretty bad anyway IMO.
 
2:06 PM
@dzaima Like LittleBrother? But that's exactly what I mean. I really enjoyed coding him, but only later realized how much of a nuisance he really is. That's why I'm thinking there should be a additional show-down without LB for example to minimize the randomness.
 
@HeinWessels oh he prefers better scores too? ಠ_ಠ
 
I mean, a second tournament can't hurt. It just takes time and electricity.
 
Yeah >.<. Above all he wants a target which he can overwrite, but after that the top scorer. The hope is that the top scorer will result in LB accumulating the most points
It's not really working though, because LB is always in the bottom third XD
 
What about hybrid bots, for example?
I don't think there are any, but what if some bots just hit-and-run, and go back to doing their own thing?
 
@Alion the published version of Jim does prefer overwriting the color of the biggest player it can overwrite (but I've since removed that feature, I'm trying to make Jim more nice)
 
2:11 PM
So yeah, a "troll-less" tournament is nebulous...
 
@Alion Yes, they're still horrible, but at least they evenly distribute the damage, averaging out
 
Not evenly if Johnny has anything to say about it...
The fact that I can't do a => {value: a, valueSqr: a * a} always confuses me.
(talking about the brackets here)
 
@Alion yeah, that's annoying. I can see why it doesn't work though
 
(a => ({value: a, valueSqr: a * a}) works though)
@dzaima At least it's a compile time error, which is all too rare in the world of JS ._.
 
well it is a syntax error, there isn't really anything that could be attempting to do at all
 
2:29 PM
I just witnessed the Art Attack equivalent of Pac-Man running away from a ghost only to collect a power pill and reverse the roles.
They even traced the same path.
I have no words.
 
I just realized that I can re-run a whole tournament on @dzaima's controller!
 
Targeting the top bots to try and steal points is actually futile. Usually the top bots can clean up the closest cells, which would be the cells LB just painted. And the LB just overwrites it. This just causes an infinite loop which doesn't help anyone. Maybe I should change it to target middle scoring bots
 
Damn, wish I had found it earlier! Helps a lot to detect if some tiny changes in some parameters improve your bot or not.
 
@Night2 you can't rerun a tournament with the same disabled players though
which it pretty annoying, I should make an issue about that
 
@dzaima I all I need is to edit my bot's source and re-run it again to see how my average over 50 games similar is affected.
And I'm always running with all bots enabled now, don't want to miss something :P
 
2:37 PM
@Night2 note that a single change in the bot can quite drastically change the later moves because butterfly effect, so there isn't much use for specific tournaments
 
@dzaima yes I know, but if I can get improvement on my average score over 50 games, it means that my change has been positive. I was doing this game by game before, now I can do it 50 games by 50 games.
So far I have found a parameter that by increasing it a little bit, Jim's average score goes down =))
 
@Night2 now that's probably just the luck parameter. Jim's getting a big upgrade soon anyways
 
@dzaima I guess every one is waiting for the deadline to publish their big upgrades :P
 
On closer inspection, it wasn't that Pac-Man-like, but felt really good regardless. Here's the clip. Pay attention to the orange guy.
 
@Night2 I'm mostly just procrastinating over why it isn't doing so good (yes, 1st place is not that good) :p
 
2:45 PM
@dzaima Well mine has the 1st place too, both average score and # of wins. But it isn't a massive lead, so I'm still working on small parameters while I have time.
 
@Alion was that intentional?
 
@dzaima Yes.
 
oh so you are making a group of 3 bots with the purpose of destroying everyone
 
Finding target ...
 
2:50 PM
@dzaima Was about to write - by now it's probably obvious.
 
Last target ...
Makes sense ;)
 
I didn't want to make an all-powerful trio because I was nice. Should've suspected that's what you were up to :p
 
@dzaima There's slightly more nuance to that. I'm making a group of 3 bots that destroy everyone important and then protect a VIP.
 
@Alion well yeah that's the obvious part
 
Now, the efficiency of them is... questionable for now. But I'm getting there.
The biggest problem is a fatty that can't easily be cleared up by 3 bots because of its ID relative to my bots'.
 
2:53 PM
@BetaDecay alion has broken the challenge, just award them 1st place :p
 
@dzaima Haha, I need to figure out how to actually make them win now :P
 
hm, can I manage to make my own version of that in the remaining 1 day?
 
Oh no.
You're way faster than me at coding, that's for sure :P
 
but I have way way less time
 
@dzaima we can build 4 bots who will kill Alion's 3 bots, what do you think? :P
 
2:55 PM
@Night2 who takes the win then?
 
We can fight after Alion bots are dead
 
Why did I feel like sharing this already? :P
Good grief, now there's pressure MOAR pressure.
 
eh, I'd probably not manage to get close to a working entry by the deadline
 
@dzaima I don't know how much of Jim you could take apart and piece together to speed up your development, but it'd definitely be close.
 
@Alion rewriting would probably be my best bet
 
2:58 PM
@dzaima We could setup a meeting point at a corner and get big there, setting trap for Alion hunters to arrive and then finish them in that same corner
 
@Alion I'd say there's much more pressure on me because it's a maybe_something-or-nothing for me vs your all-or-alot :p
 
But I'm just kidding, I already decided to not make a 3rd bot, don't want to give @BetaDecay a hard time running them
 
@dzaima If you make Jim nice enough, my bots won't bother to try and kill him.
...which might be a vulnerability that I should patch up.
 
@Alion well the current setup is prefer white over everything
also if I do make an all-powerful trio too, it's definitely gonna be <3ms/round each bot, otherwise I'm not posting anything
 
@dzaima Well, my trio is 13.5ms on a 54x54 board. Whoops.
 
3:01 PM
If on average any good bot gets ~600 points per game (with current amount of bots), Alion's 3 bots can kill 3-4 good bots in each game.
Is that enough to win?
 
@Night2 Yeah, that's the question I've been asking myself.
 
And will you target the actual good bots?
 
@Night2 kill them in the very beginning and you win
 
@dzaima he doesn't know which bots are going to win that game to kill them on start
 
@dzaima Yeah, but at the beginning I don't know which ones are good :P
 
3:02 PM
And I doubt if he can take on all 35 bots
 
@Alion better take good guesses then
 
He is limited to 2000 turns
 
That's what I've been talking about a while ago - "my bot [trio] is very late-game".
 
Now that I think, actually my bot could end up being the VIP :D
 
@Night2 What do you mean?
 
3:04 PM
@Alion yeah, all the strange things you've been saying start making sense
 
@Alion If I don't go as a top bot on beginning and mid-game and then suddenly go mad at end-game, your bots could have killed all my top opponents.
Doesn't that make me the VIP who is going to win the game?
 
@Night2 Yeah, staying low could be a strategy. I haven't thought about the counters too much :P
 
I will just keep tweaking my bots and hope for the best to win :P
These are all guesses and I can't actually say anything until I have your bot sources and can start test games with them.
I couldn't even guess that changing a 2 to 4 in my bot will end up in Jim's average going lower by around ~50 and FarSightedGreed's average going up by about ~40!
 
And now my bot's collapsing in the second test game D:
 
3:25 PM
Missed an else before an if, missed a delete b.marked and forgot to return. Combo-bugs...
 
@Alion Half of your problems are because of not using an IDE :P
 
@Night2 Or I could just use TypeScript or something, that would solve my problems as well.
 
@Alion A compiler can detect lots of errors, but I believe an IDE can detect more, you should combine those together.
 
By the way, there are some interesting details about the strategical and tactical troubles and solutions I've found whilst making the trio; I'll leave that for the bot description once I submit it though, because boy is that gonna be an essay.
Some of them are not obvious at a first glance, at least to me ._.
 
If I'm using a function which has a parameter named "x" and a second parameter called "y" and I pass two variables called dY and dX into it in this order, my IDE shows a warning telling me that your variable names look to be wrong based on parameter names.
 
3:32 PM
@Night2 Woah, that sounds pretty smart.
 
what am i doing, i've told everyone to use debugger; but im not doing that myself ._.
 
Oh no, one of the bots in my trio has sacrificed himself for the greater good.
 
@Alion one example of the hundreds of things an IDE can help with! i.imgur.com/lPOiS1D.png
 
@Alion ...which made it my entire plan dysfunctional because how the heck are you gonna kill someone with just two bots?
(well, aside from the special case of luring someone like Jim+John)
 
@Alion well you've still got the upper hand
trail with one while the 2nd erases previous tracks
 
3:38 PM
@dzaima Yeah, but that's an edge case I'd rather not care about and instead fix the underlying problem - sacrificial bots...
@dzaima Yep, the same strategy does work but it vastly reduces the pool of bots that can be murdered.
 
the main reason for big game hunter is that without it I find that often whichever bots just sits in the same general area and makes a big blob ends up winning because by virtue of staying in one area it has a bigger chance of avoiding trollbot and company
 
@SamYonnou but it tracks moving people just as fine
 
and non-trollbot-y bots too because those usually try to avoid other colors
right, but if I just make it attack less mobile targets it doesn't seem quite deserving of its name
and i came up with the name before the bot :-)
so it is more important to me
and by "came up with the name" i mean "stole it from MTG/Hearthstone"
always enjoyed the MTG art for that card
you can always avoid it by avoiding to get top score until the last couple of hundred moves of the game
it also only attacks the leading bot down to Math.max(maxScore - bots.length, maxScore * 8 / 9) so if anything it just keeps the game more interesting/exciting until the end
 
3:59 PM
@SamYonnou in my experience it just drags anyone who was at 1st place down from it, making the final 1st place the person who just managed to escape BGH.
 
01:00 - 16:0016:00 - 23:00

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