« first day (5 days earlier)      last day (38 days later) » 

8:41 AM
0
Q: Art Attack KoTH

Beta Decay Join the chat! Challenge Try to fill the canvas with as much paint as possible. Be careful of other bots that may paint over your hard work though! Note: In this challenge description, paint means to change the colour of the square on the grid and unpainted means that the square on the grid ...

2
 
 
1 hour later…
9:46 AM
@BetaDecay you should really mention the grids format somewhere. I wasted 10 minutes trying to figure out why my bot isn't working and turns out the grid is a transpose of what I'd expect it to be ಠ_ಠ
 
@dzaima I do say that (0,0) is at the top left
 
@BetaDecay but not that (1,0) is to the right of that
I always expect 2D array indexing to be arr[y][x], but that wasn't the case here
 
I see. No, I used cartesian coordinates
 
@BetaDecay I don't see how that relates to the array layout. Later you use the human form of up/right either way which is also pretty annoying.
I'd suggest to say To get the color at position (x;y), do `grid[x][y]` at the grid section since that is what confused me.
 
10:02 AM
Is grid[y][x] a common format? I've never heard of it
 
@BetaDecay I can't say how common it is, but it's what I've used.
I wanted to see how Formic Functions did it, but both implementations just store a 1-dimensional array :p
 
I've used the same format as Gold Collectors
 
@dzaima, I believe x,y is the common format and since bot information are also in form of [id, x, y], it is kind of self explaining.
@BetaDecay don't you want to set any limit for amount of bots per user?
 
@Night2 Uhh I don't know. Is there any reason to?
 
@Night2 for humans x;y is obviously the more pleasing order, but when taking the memory layout of 2D arrays in consideration (though with a small board that doesn't really apply here), [y][x] becomes better as people often go trough arrays left-to-right, then top-to-down, not the other way around.
 
10:23 AM
@BetaDecay Yes, so I don't create 10 bots that each of them works on a specific part of the board to increase my winning chance.
You are allowing bots to work together, so someone can take advantage of this
 
Okay, I'll add that now. Max 3 bots
 
@dzaima I think it is about consistency, if it is mentioned x,y somewhere, then it should be x,y everywhere. I would look at grid as a function which gives me information of point x,y. I don't care how people usually loop over arrays, this game is using x,y positions, so it should be the same everywhere. Just my opinion. I agree that on an array you would go row by row, but in this case, it isn't about an array, it is about information of a position of x,y which is stored in an array.
 
@Night2 I said, it doesn't really apply here, but I'm just noting that often [y][x] is useful so shouldn't be expected to not be thought of
 
A 2d axis in math has a different position system (0,0 is the middle), but still x tends to come before y in format of (x,y). Sample: eduplace.com/math/mathsteps/artwork/4_coord_what2.gif
That is why I say x,y is the common thing, because we are talking about a 2d position
 
@Night2 of course x,y is the common thing, it's real-world speed-first programs that can benefit from thinking about cache & memory layout and swapping axis if necessary (which is not this KotH, I know, just that I've just grown to expect [y][x] unless said otherwise.)
 
10:41 AM
@BetaDecay could you add live views of the scores in your simulation?
 
I think you are grown with [i][j] though :P Because that usually is not a position and is normal to go row by row. Anyways you can always code to go column by column without any performance difference (in the case of this game).
@HeinWessels I would up-vote this as well. Being able to see score of bots in the graphical interface would be very nice.
 
@HeinWessels Sure, that'll be a great idea!
 
Thank you! That would be awesome :D
 
@BetaDecay, have you seen the raking table which I believe @Ramillies implemented in Gold Collector KoTH controller?
 
@Night2 FWIW here's some of my code that does indeed use [y][x], though there it's kind of necessary as I'm storing ±a multiline string and getting/modifying the lines of that is pretty useful
 
10:47 AM
@dzaima Yes, I agree that it could be useful on many special cases. But all I was saying was it isn't the common thing for 2d positions.
 
@Night2 Yes, that was nice. I'll try and do something similar
 
@BetaDecay Something like this would be awesome, knowing current score, current rank and total games won (the controller could support playing multiple games as well): i.stack.imgur.com/t29sF.png
 
11:02 AM
@Night2 That's a good idea. Then it would be good to add each bot's UID as well, as it plays such an significant roll.
 
@BetaDecay uhh why is the bots array one array with integers? (unlike arrays of arrays as said in the challenge?) Test with function(myself, grid, bots, gameInfo) { console.log(bots) }
 
@dzaima Whoops, forgot some square brackets when pushing to the bots array :P
 
I kinda feel like making an implementation of the controller in daves koth webplayer for the fancy live editor & other fancy features but then again I don't want to ever touch that thing's code ever again from FF :p
 
Alright, it should be fixed and the leaderboard added
 
11:19 AM
oh if i click run game twice stopping stops working :|
that's why the controller's extremely annoying
btw step a single round
also sort the player table by score
 
11:33 AM
also why window.localStorage? I want some data of the previous moves stored for a single game, and using localStorage for that makes parallel games impossible (well, very glitchy). Besides, localStorage is way slower than regular variables
 
Because it was the only way I thought it was possible for the bots to store data
 
you could've made submissions classes initialized once per game and then have class properties (well too late now).
Another option is to have submissions be functions returning the function (example). All that would change in submissions is an extra return
 
I think the most important thing at first is to decide if bots are allowed to transfer data from a game to next game or not.
 
@Night2 with the current localStorage it's impossible to not to
 
@dzaima He can do a localStorage.clear(); before each game
 
11:41 AM
@Night2 ah
 
But it should be mentioned in the post if that is allowed or not
 
@BetaDecay also what's the policy with editing answers?
 
Completely allowed. I'll update the botData all the time
 
If bots aren't allowed to move data to next game, then there could be rule to mention that you should prefix your storage keys with bot_<id>_ to avoid any conflicts with other bots.
 
12:00 PM
oh localStorage can only store strings ಠ____________________ಠ
@BetaDecay also why localStorage when you could've made a BetaDecayStorage variable?
 
Is it okay if the leaderboard isn't sorted by score? It becomes very hard to read the leaderboard with so many colours moving around
@dzaima We never expected anyone to want to store anything
19 hours ago, by Ramillies
@BetaDecay, I think that window.localStorage is a huge overkill. Storing things across rounds of one game is useful to keep state, storing things across multiple games probably isn't so much.
 
@BetaDecay that's understandable. The only reason I want to store things is because I'm too lazy to actually make my bot not do stupid things when it can't do smart things :p
@BetaDecay yeah that's a thing I was afraid of. maybe a button to sort the table (or sort at the end of the game?)
 
Yeah maybe. I've added an indicator to show the bot in the lead for the mean time
 
ooh that's what that is
 
12:28 PM
@BetaDecay, feel free to steal my code for the ranking. It didn't change the order of rows in the table, it just showed the current ranking for each bot.
 
@Ramillies Okay, thanks! I'll work on it later
It's funny seeing the bots run on such a small grid
 
ok now on to the hard part - naming the bot
 
Jim
 
sure
 
12:44 PM
@dzaima Your bot gives me SyntaxError: Unexpected token u in JSON at position 0
 
@LuisfelipeDejesusMunoz huh. browser?
 
Same here: JSON.parse: unexpected character at line 1 column 1 of the JSON data
FF
 
works for me on chrome
 
@dzaima Im using chrome too.
 
ಠ__________________________________ಠ I cleared localStorage and now it doesn't work
@BetaDecay oh you aren't clearing localStorage. There I was thinking a modification of mine didn't do much ಠ_ಠ
 
bot fixed (hopefully)
 
Yup
It's good at eating random moves
 
1:03 PM
suggestion: add a feed to this room that posts new answers to the question
 
Beta Decay has made a change to the feeds posted into this room
 
1:15 PM
10
Q: Art Attack KoTH

Beta Decay Join the chat! Challenge Try to fill the canvas with as much paint as possible. Be careful of other bots that may paint over your hard work though! Note: In this challenge description, paint means to change the colour of the square on the grid and unpainted means that the square on the grid ...

3
A: Art Attack KoTH

Luis felipe De jesus Munoz¯\_(ツ)_/¯ (Random moves) function(myself, grid, bots, gameInfo) { return ["up","down","left","right"][Math.random() *4 |0] }

3
A: Art Attack KoTH

dzaimaJim function(myself, grid, bots, gameInfo) { var mc = myself[0]; var mx = myself[1]; var my = myself[2]; var pastMoves, nowMoves; var allowRetracing = false; var output = null; // annoying localStorage if (!localStorage.dzaima_pastMoves) { pastMoves = new Array(10).fill(...

0
A: Art Attack KoTH

Beta DecayBorderline function(myself, grid, bots, gameInfo) { // Check if already on border if (myself[1] == 0 || myself[1] == grid.length-1 || myself[2] == 0 || myself[2] == grid.length-1) { // Move anticlockwise around the border if (myself[1] == 0 && myself[2] != 0 && myself[2] ...

 
1:28 PM
I just tried making a bot just to see if I could, and it actually won because Jim kept trying to eat Borderline...
 
0
A: Art Attack KoTH

SanchisesCandyButton Goes up and down the grid pretending to be a Turing machine. Based on the idea that it should be as long as possible before revisiting the same location again. function(myself, grid, bots, gameInfo) { var mc = myself[0]; var mx = myself[1]; var my = myself[2]; if(mx==grid.length-1 &&...

 
Admittedly, the advantage seems to disappear rapidly for larger grids...
 
@Sanchises yeah, my bot wasn't made for such small grids. It also depends on whether Jim can paint over Borderlines colors, because if it can't it has a higher chance of success
 
1:44 PM
Hmmm, I will need to write a bot then, too.
 
0
A: Art Attack KoTH

AdyremNearSightedGreed function(myself, grid, bots, gameInfo) { let ret = []; let col = myself[0]; let myX = myself[1]; let myY = myself[2]; if(grid[myX][myY] != col){ return "wait"; } if(myX != 0 && grid[myX-1][myY] != col){ ret.push("up") } if(m...

1
A: Art Attack KoTH

NeilRandom Filler function([id, x, y], grid, bots, gameInfo) { let painted = { un: [], other: [], me: [], }; let whose = n => n ? n == id || Math.abs(id - n) % 3 > 1 ? "me" : "other" : "un"; if (x > 0) painted[whose(grid[x - 1][y])].push("left"); if (y > 0...

0
A: Art Attack KoTH

Night2The Bot That Paints The Board Constantly But Is Not A Painter function (me, board, painters, info) { let id = me[0], meX = me[1], meY = me[2], size = board.length, round = info[0], end = info[1], i; let getDistance = function (x1, y1, x2, y2) { return (Math.abs(x1 - x2) + Math.a...

 
@Night2 I'm disappointed, you could have gone longer
 
I want to keep the style of this naming system: codegolf.stackexchange.com/a/170251/81663 :P
You can call it "TBTPTBCBINAP" to avoid super huge score boards though.
 
It's alright, I'm using The Bot That Paints The Board
 
But it is important that people know this bot is not a painter
I would prefer "TBTPTBCBINAP"
 
1:50 PM
@Night2 isn't probably still tired of me mangling his bot name...
So I will be probably forced to call the bot TBToijfwoejflwhatever, in the similar vein as before.
 
Yeah, don't let @Ramillies touch my bot's name please
 
I thought you would learn and give your bot a reasonable name :—P.
 
That is a reasonable name
And unique
 
But at least now it's not my controller with this mangled name that would be circling around.
 
@Ramillies when I was trying to copy colors from your controller for final botData, almost any name was wrong (except your own bot).
 
1:53 PM
I know. The problem was that some bots had too long names.
1) I had to type them in by hand and 2) I needed space for console to look at the debug output, errors etc.
 
I think the main problem was the typing part :P
 
I'm ready to admit that :D
(though, technically, I could have put name into one clipboard and the code into the other)
 
The issue with this challenge is that I can't eat a Noble at the end :D
 
You can eliminate him (at least if you write one first).
 
There is no benefit in that (yet)
 
2:01 PM
Why don't you just make each bot store its info in its function object instead? tio.run/##y0osSyxOLsosKNHNy09J/f8/rTQvuSQzP08hUUOzOjk/rzg/…user202729 2 mins ago
@user202729 Well they can if they want, I'm just saying that localStorage is available for use — Beta Decay 23 secs ago
 
@Night2, of course I know, but I mean that nothing prevents you from destroying him :).
 
😊
@BetaDecay but it still is very dependent on the id each bot gets. I had a case that a Random bot was scoring more than me, because no other bots that I could re-paint them was alive anymore.
 
I guess that should even out over 10000 rounds
*games
 
Yes, unless someone is very very unlucky :D
 
2:08 PM
Night2 bot is pretty awesome xD
 
Thanks @LuisfelipeDejesusMunoz <3 I was testing for a few games and angry why my bot is doing so bad now (thinking I have a bug), I then realized colors change each game and I am so used to have a fixed color and keep tracking that :-/
@BetaDecay, I think there is a bug happening
I have a case where my bug is sitting on [16,18] and grid[16][18]=0
My bot keeps returning wait but grid[16][18]=0 stays at 0
 
@Night2 coloring only happens after moving
 
wait is also a move
But now I see, it is not a bug
"Random Filler" is also on 16,18
 
@Night2 move != moving
 
not moving from it
But my bot is rendered on top of it, so I was thinking it is only me there
 
2:20 PM
@Night2 oh yeah there's a special case that 2 entries on 1 square = 0
 
@dzaima Anyways wait is also a move and if you wait, you should still paint the spot you are on it (of course unless someone else is there as well). So returning wait in bot is not a reason to not color a spot.
I updated my bot to stop dating other bots on unpainted spots :P
 
2:40 PM
What a familiar looking display :P
 
I mean, I did build the controller from the ground up
But ultimately it was inspired by Gold Collectors
 
3:17 PM
@BetaDecay, were searching for something near "Fort William"?
 
3:33 PM
Yeah haha, holiday
Hold on, how do you know that? It's not in any of my screenshots!
 
@BetaDecay Yes it is, just try to not share much personal information in your screen shots, I already know a lot about you with 1 screen shot :D
 
Your Googling skills are good :D
 
4:19 PM
@Night2, how do you know? I only see that "Large five-star self-cat...". Did you google that one?
(Anyway, that's why I always cut out only the part of my screen that I want to share :))
 
@Ramillies, yes
 
I see.
 
0
A: Art Attack KoTH

Lispy LouieTrollbot Picks the closest bot it can paint over and just follows it. If it can't find a valid bot, go to the nearest empty space. If it can't find an empty space, move randomly. Note: I've never coded in Javascript before, and I haven't had the chance to test this code yet. It probably works b...

 
4:43 PM
TBTPTBCBINAP already keeps attacking me, I don't need a trollbot
actually it looks as if trollbot is broken right now
whoa, Jim killed me that time, that was quite a killfest, candy button barely survived, and That Bot was holding its own
 
Borderline died... and I won a round! not bad
 
5:11 PM
@dzaima oo that's nice
 
5:30 PM
0
A: Art Attack KoTH

ZacharýNo Do Overs function(myself, grid, bots, gameInfo) { var c = myself[0]; var x = myself[1]; var y = myself[2]; var n = grid.length; var dirs = ["left", "up", "down", "right"] for(var _ = 0; _ < 4; _++) { var dir = dirs.splice(Math.random() * dirs.length | 0, 1); ...

 
5:53 PM
There seems to be a slight issue where an eliminated bot is not removed from the lsit
So it's just treated as waiting there the whole game.
 
6:46 PM
0
A: Art Attack KoTH

SpitemasterHunter-Killer function(myself, grid, bots, gameInfo) { targetColour = myself[0] % 3; // If I can paint someone else's space to my colour, do so. var options = []; if (myself[1] !== 0 && grid[myself[1] - 1][myself[2]] % 3 === targetColour && grid[myself[1] - 1][myself[2]] !== myse...

 
7:10 PM
Would anyone be willing to become a collaborator on the controller's repo so they can update botData.js when I'm not available?
 
7:27 PM
@BetaDecay don't you think it'd be more efficient to make it automatically load from SE?
 
That would be neat. I'll work on it tomorrow
 
also I finally got leaderboard to work nicely on daves framework
 
Nice work
 
they've reached a stalemate
 
7:44 PM
@BetaDecay I made a PR to fix the little issue I mentioned. Let me know if you don't want to change it so that I can make my bot work without it.
 
8:24 PM
here's my controller for this challenge. Currently no indicator of where the players are but it works! (not fully conformantly to the spec though, haven't made player+player = 0)
console.log doesn't seem to work either, but at least it's fully deterministic (at least for the same answers)
 
@snail_ yeah, it keeps attacking me :-(
@dzaima it doesn't seem to eliminate bots
mind you, the game I had just now, random filler was at the bottom on 1 square for a long time, but eventually climbed up to second place
seed GtηnψλζτkX0QdγbνexKβD if anyone's interested
ah, my bot's not entirely useless, GrzvCNq0εμZYMswFaJοGU was a win for it
 
Yeah, I'm not killing anyone on dzaima's controller. :(
 
8:41 PM
@Neil I didn't bother to implement that yet either
 
9:11 PM
disqualification, 0-on-collision & console.log implemented
 
9:49 PM
finally forced myself to add the markers :D There's currently no color indicator on the markers (that works, ignore that small square :|) but you can hover over them to get the name and color/ID
 
10:20 PM
@Spitemaster Is that the list given in the arguments to each bot?
If so, that's a simple fix
 
10:35 PM
@BetaDecay The formula for painting over squares seems rather unbalanced... E.g., bot 1 can erase 2, 5, and 8's squares, overwrite 4 and 7s, and do nothing to 3's. is that intentional?
 
@ConorO'Brien but 2, 5 & 8 can erase 1 back, likewise for the rest of the cases. Over 10000 games I'd expect the nuances to balance out
 
I suppose... it just seems like a sub-par mechanic
 
@ConorO'Brien it's a strange thing, but it makes way for optimizing for the types - overwriting what you can as often as possible, try to avoid what you can't, ect
 
0
A: Art Attack KoTH

John AaronM.A.D.S. function(myself, grid, bots, gameInfo) { const w = 6, h = 6; let my_c = myself[0], my_x = myself[1], my_y = myself[2], size = grid.length, roundnum = gameInfo[0]; if (!localStorage.steelyeyedmissileman) { var offset_x = Math.random() *(size-w-1) |0; var offs...

 
11:05 PM
also, "BurlyWood" and "Bisque" are annoyingly similar colors
 
I’ll remove one then
 
awesome
 
oh wow Jim v2 is close to The Bot With The Long Name
oh wait changing the stored history length around I got it to average 312 score (with TBTPTBCBINAP at 198) :D
 
11:42 PM
@BetaDecay You must not create a bot which intentionally targets a single, pre-chosen bot. does "targetting" include avoiding? e.g. intentionally not painting in the border because of borderline
 
11:52 PM
@dzaima Yeah, that’s fine
 

« first day (5 days earlier)      last day (38 days later) »