« first day (2045 days earlier)      last day (2799 days later) » 

12:08 AM
I have a 6-move win against Corner Hugger on a size 4 board.
@trichoplax I actually think this one would be better done in JavaScript, just so the moves and cascades can be shown.
 
Just tried a size 12 game against Corner Hugger and it was cute seeing it get easily pushed back until I realised it had started building from another corner off screen and swept back to decimate me. More interesting dynamics than I'd expected :)
 
-1
Q: Let's improve the leaderboard snippet

Agent CrazyPythonThe leaderboard snippet could use some improvements. Improvements usually fall into three categories: Formatting & CSS - make it look better Functionality - stuff it should do Misc - everything else Please answer with suggestions. I've added a few myself.

 
thanks @BetaDecay - I really enjoyed it; I think all the downvotes are just because the "unique" bit was underspecified when it comes down to it.
 
@trichoplax Try a size 5 against Corner Hugger. I haven't won yet.
 
I'm abandoning my size 12 game. It seems being in the lead is no indication of winning...
 
12:16 AM
@El'endiaStarman I won on size 4 by accident
 
@JonathanAllan :)
 
Finally won a game on size 5. Took 138/2 moves.
 
@El'endiaStarman First attempt: I lost without a single attack...
 
@trichoplax One of the first times I tried, I actually lost within 6 moves or something. :P
 
@El'endiaStarman Whoa
That's real interesting
 
12:18 AM
@BetaDecay I also added an x=0 solution since seeing Dennis's comment
 
I was wondering if there's an optimal strategy, but wondering that less and less the more I play...
 
...I didn't realise an empty program returned 0 because it only does so in a new TryItOnline tab, and not in one you've run stuff on already :/
 
@trichoplax It seems like a relatively good defensive strategy is to try and get rid of all of the 5-piles.
 
@El'endiaStarman I've managed to win a size 5 game now, with 38 score. I'm not sure what your 138/2 signifies
 
@trichoplax I was wondering too. I thought at first that under perfect play the first player wins but the more I play it the more I realize that it's not nearly that simple...
 
12:20 AM
@El'endiaStarman I won on a 5-size board first try
> Corner Hugger playing as player_2 took longer than 5s to play its move so forfeits the game.
 
hahaha
 
Using a slow browser is cheating :P
 
I'm using firefox.
 
exactly
 
12:22 AM
Me too - it seemed to handle a size 12 board fine on firefox for me...
 
red circle is my move that triggered the forfeit
 
@ConorO'Brien lol you would have lost next turn
that's the best part
 
it is XD
 
@trichoplax There were 138 counters at the end of the game, and each move by either player adds exactly one counter (they're just redistributed). Thus, there were 138/2 = 69 turns.
 
@quartata Really?
 
12:23 AM
I can do it out but I'm pretty sure
 
@El'endiaStarman I won first time, but in 73 turns
 
@El'endiaStarman Ah I see. I guess that means I took 19 turns
 
If it not next turn then for sure in two turns. The bot had more or less complete control of the board
 
I always lose most of my cells the turn before I win
 
Are we treating this as golf...?
 
12:24 AM
Most = I own <25% of the board
For my games board control swings more the later in the game it gets
 
I won against size 12 by just click on bottom corner, intervening when bottom corner was possessed :P
 
@ConorO'Brien @Downgoat What's the best way to compare floats in JS?
 
@quartata < and >?
 
Well, == isn't really going to work because of floating point error
 
you could designated a minimal precision difference e and assert that Math.abs(a - b) < e
that's how J does it iirc
 
12:28 AM
Are you coding or golfing JS?
 
That's what I would normally do but I figured that JS's twisted comparison things would allow for a more consice way
@HWalters Very unwillingly coding
 
But still going for concise - you have formed a habit ;)
 
Try playing Hexplode as player 2. Very different ball game.
 
I've come up with a great challenge idea... But it involves installing a keylogger on all of the entrants' computers...
Fewest keystrokes to write a program
 
Ah, a vim challenge
 
12:30 AM
So if you make a mistake when programming and have to backspace, you are penalised
@HWalters Not just vim, hence the keylogger
Python, Golfscript, Java etc.
 
@BetaDecay I'll use a virtual keyboard, does that change anything? :P
 
I dunno
It's fairly easy to cheat at it XD
 
You can write Python, Golfscript, and Java without vim?
2
 
@El'endiaStarman since the algorithms are fully deterministic, I've pitted two corner huggers against each other. Blue wins for 3, 5; red wins for 4, 6. I conjecture that blue wins for odd-length boards, and red for even length boards.
 
12:33 AM
@ConorO'Brien Assuming perfect play? I doubt that Corner Hugger plays perfectly. :P
 
Welp, good night everyone
 
@El'endiaStarman I don't assume perfect play :P just for corner hugger
@BetaDecay night!
 
Hi
Oh my name changed
 
@BetaDecay define program
@BetaDecay Yeah, Ctrl + V
@quartata Unwilling?
 
@ASCII-only That actually took me a second... I was thinking, "you want to highlight a block?"
 
12:36 AM
@ASCII-only I couldn't find a good geolocation service I could use from Python
 
What is this for?
 
@El'endiaStarman I just won with 213 on size 6 as player 1. Shouldn't the score be even? Also, I went down to just one remaining corner hexagon, and playing there took out the entire board, which I really wasn't expecting, so I wonder if it was a bug.
 
@trichoplax No, you're player 1, your turn is the winning turn so it's odd
@trichoplax It's not a bug
 
Hello
 
Then how did I get an even score earlier?
I'm confused now...
 
12:38 AM
I'm not totally sure how that works out either.
 
1 hour ago, by quartata
I'm writing something for myself to create a random walk, literally
 
Have you tried geohashing?
 
@quartata tell me if you need any help ;)
 
@trichoplax I have, but the graticule I live in usually means that the location ends up in the sea
If I set it to another graticule it's not in walking distance
So I'm creating something that works on a smaller scale
 
You could always subdivide the Map smaller, and scale the geohashing result accordingly...
I don't know why Map was capitalised there...
 
12:40 AM
That's what I told myself, but then I realized that at that point I might as well try for something cooler
 
Fair enough
 
Also, I don't really like having to wait until 1 for the day's stock price
I could use yesterday's I suppose
@ConorO'Brien I've already gotten the actual random part working (more or less), now I'm figuring out the Google Maps API
 
ah, that's the hardest part XD
 
Oh, I need this in a Web Worker
 
I found a simple win (as player 2, on size 5) against Corner Hugger that ends at 57 counters.
 
12:44 AM
I just tried clicking the same corner cell repeatedly against the random player. I lost :(
 
Also, the resulting walks are a little big. I'm not sure if Google will like them
> length: 2067129
 
Uh, yeah, no. :P
 
It would probably be better if I graphed it myself over a picture of the map
I only really need straight lines between them
Then I can just use a <canvas>
 
hello
 
Hi derpfacepython
 
12:50 AM
This is going to look like spaghetti I just know it
Maybe the walk should take bigger steps
 
@CubeDragon137 Hello! Welcome to The Nineteenth Byte!
 
@ConorO'Brien Not enough rep to talk yet
 
Hey @CubeDragon137!
Welcome to chat!
 
> You can place a Google Google Static Maps API anywhere on your webpage where you can place an image.
 
@ASCII-only Could you upload your version of the interpreter to my GH repo?
 
12:52 AM
Needs 20 rep right?
 
Google sure likes their own name...
 
The history link for Hexplode mentions it has been implemented with not only bigger boards but more players - sounds even more suitable for a KotH...
 
@El'endiaStarman haha
 
"You can use the Google Google Googler in the same way you can use Google to Google Googleable items"
 
Aah, I remember when I only had 1 rep
And I got downvoted so hard on my 1st question on SO
Ooh hey, the name changed!
 
12:55 AM
I have found a foolproof strategy against Corner Hugger that works for all board sizes.
 
@Qwerp-Derp Submitted PR, if you don't want it overwriting the old one I can make another PR
 
Ooh, do tell
 
@El'endiaStarman oh? do tell
 
@Qwerp-Derp Oh wait I don't think out works in conditionals
 
While I was getting a new API key for Google Maps I checked on a Python script that uses the Google Calendar API that I made over 3 years ago
> Error ratio: 100%
lovely
The best part is that I was not aware at all that it was broken and as far as I could tell it was still doing exactly what it was supposed to do
I was even about to comment about how satisfying it is when something just works and runs for years until I saw that....
 
1:01 AM
@ConorO'Brien (cc @quartata) Basically, steal their corners. When they're building up a corner, build up on a different, unoccupied corner. Once their corner explodes, put a single counter there. When they try to build up an edge hex, build up the adjacent corner and capture it. Continue until all opponent counters have been converted.
 
@El'endiaStarman whoa, cool
 
I can see why I didn't notice though. The last time it tried to do anything was two months ago
 
It is very much a strategy tailored to counter Corner Hugger.
 
Wot u mean?
 
What game is this?
 
1:05 AM
Oof, just realized since I need an API key for this I need a PHP service for the map pull so that API key stays secret. RIP hosting this on GH pages
and more importantly rip this being a "simple" project
 
@DJMcMayhem Hexplode
 
CMC: implement Hexplode in Hexagony
 
Although, I think there's a way to limit the key to only use one service
 
@ASCII-only You can theoretically have multiple "+"'s in a circ.
 
Ah good, the key only can use Static Maps API
 
1:09 AM
@Qwerp-Derp Does it not work?
 
Ummm
Nvm, it works
Didn't read the code properly
 
@Downgoat It's not square so it gets all squished.
 
Hang on
 
@DJMcMayhem Link.
 
This version doesn't support input yet right?
 
1:12 AM
@Qwerp-Derp Yeah, there are no input specs on the readme
 
Ah
I'm thinking of adding input
 
Also is this supposed to work? (truth-machine.lgc) cond 0->out r(1)/out 0
 
Just the string input in a var or circ indicates input
Ummm
I think so
I fixed it
 
@El'endiaStarman I just beat corner hugger!
 
1:14 AM
I don't think that should be valid
If you have a number as an argument you don't even need the conditional at all
 
@DJMcMayhem Nice!
 
Actually, random is much harder
Yeah, if you snag as many corners as possible it's super easy
 
@ASCII-only Ummm yes that is supposed to work
 
@Qwerp-Derp But why
 
Also, I'm getting an error:
unhashable type: list
 
1:19 AM
Something fun to do against random: build up all of the outer ring of hexes to the point where they're ready to explode.
 
@Qwerp-Derp Stacktrace?
 
Wait whoops
Don't worry
It's cause I did input
Dammit
Ummm
How would you implement input?
Would you put it in "Alpha"?
 
@Qwerp-Derp That would probably go as a new token type in Literal?
 
Ah
Do I need a new function as well?
 
@Qwerp-Derp Yeah
 
1:26 AM
Ah
??? Still doesn't work
@ASCII-only Hello?
 
@Qwerp-Derp What doesn't work
 
It should be possible to figure out who wins with perfect play in Hexplode on a size-2 board, right? 17 is the maximum number of turns.
 
Input
 
@Qwerp-Derp What did you change
 
I added a new function
def Input(result):
    return lambda scope: [raw_input(">>> ")]
"Input": Input
in Transform
 
1:40 AM
@El'endiaStarman yeah, probably
 
@Qwerp-Derp A size 2 board has 7 tiles right?
 
a brute force could finish in a few minutes, probably
 
Yup
 
Woops, meant to reply to elendia
 
:(
Wait how did you type Qwerp-Derp instead of El'endia Starman?
I don't understand
 
1:42 AM
I hit reply
 
@DJMcMayhem Correct. All the outer ones can have at most 2, and the inner one can have at most 5, so that's a maximum of 17.
 
wat
The outer ones have 3 and the inner one has 6?
 
@DJMcMayhem Yeah but if they have that many they're already exploded
 
Ooh, so a max of 17 moves are possible?
 
Would it be interesting to have a KotH where the board is a randomly generated shape each time (a random connected hex grid) to prevent tailored approaches?
You could just randomly place hexagons until they are all connected and above a minimum number of cells
 
1:46 AM
@trichoplax Ooooh, yes, that could be very interesting.
 
isn't there one in the sandbox?
 
Would we need to ensure all cells have at least 2 neighbours? Otherwise there would be a weird reflection of explosion at dead ends
 
That could perhaps add to the fun. :P
 
@DestructibleWatermelon I meant specifically for Hexplode - Nathan's hex based KotH looks interesting too...
 
my language interpreter is nearly done, except for a bug
 
1:53 AM
it's always a bug
 
:%s/\d/\=submatch(0) + 1/g
Vim is beautiful. <3
 
what does this do
 
@ASCII-only I'll upload my code, can you fix it?
 
Increments every digit in the file
CMC: Given a positive integer N, output the maximum number of moves possible on a hexplode board of size N. The first 4 terms are 0, 17, 65, 143, which is dissappointingly not on OEIS
 
@DJMcMayhem :%!tr 0-9 1-90
 
2:00 AM
@Doorknob Windows...
 
@DJMcMayhem non-negative N?
 
No, positive.
I guess the first term should be 1
 
Oh yeah - no moves on a size 1 board...
 
I'm not actually sure. I guess you could do 1?
 
If I move a question of mine from the sandbox to the main board, should I delete it from the sandbox
 
2:01 AM
Yes, definitely
 
It doesn't have any neighbours, so should explode before the first move - call it undefined?
 
You should also edit it down to a summary and link, so that users with 10K don't have to see it.
 
Pretend I said something useful here...
 
@Doorknob My best vim-golf:
yesterday, by DJMcMayhem
:h<cr>yEZZp:s/./<C-r><C-a>/g<cr>@:@:@:@::s//foo/g<cr>
 
2:02 AM
@Qwerp-Derp No, I'm almost done and I don't want to redo it ;_;
 
0
Q: What questions should be tagged [chess]?

DLoscThe chess tag wiki currently states, "This tag is for challenges related to chess or any derivative of it." This wording technically excludes games like Xiangqi (aka "Chinese chess"), which are part of the same family but aren't derivatives (more like cousins). If we're going to include fairy che...

 
@trichoplax Undefined sounds good.
 
@DJMcMayhem that's insane
 
Thankyou
I got the :h<cr> idea from Lynn
 
@DJMcMayhem what does this do?
 
2:04 AM
I think the <C-a> should actually be a "
 
It works as it is
 
Oh really? How?
yesterday, by DJMcMayhem
CMC: Print "foo" 100000 times with 0 numbers in your source code.
 
@Qwerp-Derp Pushed one that should work
Plus it accepts input from commandline too so you can add it to TIO
EDIT: wait, TIO can just directly input it into STDIN
 
0
Q: Dimensional countdown

Eric TresslerTetrahedron countdown Write a function f(n,k) that displays the k-dimensional countdown from n. A 1-dimensional countdown from 5 looks like 54321 A 2-dimensional countdown from 5 looks like 54321 4321 321 21 1 Finally, a 3-dimensional countdown from 5 looks like 54321 4321 321 ...

 
whoops, forgot to remove the inline title
 
2:08 AM
 
@DJMcMayhem Or, perhaps not disappointingly, this means we can add a new sequence to the OEIS!
 
@El'endiaStarman Haha yeah I was thinking about that. I also searched for "sum of number of neighbors of each cell" but they didn't have that either
@Doorknob Woah, I didn't know you could do that! That's beautiful, I can finally get rid of that pesky ^M
 
@DJMcMayhem Turns out that's not actually what it does though
			CTRL-A	the WORD under the cursor; see |WORD|
From :h c_CTRL-R_CTRL-A
 
Oh. Can you do @<C-a>? That would be awesome for golf.
 
E354: Invalid register name: '^A'
 
2:12 AM
Eh, worth a shot
nnoremap @<C-a> yiw@"
 
@DJMcMayhem with or without newlines?
 
Isn't \b backspace?
Why is it there
 
I didn't specify. Idrc my answer was without, but with is fine too
@El'endiaStarman Wouldn't it actually be 18 since you need the last move to trigger the chain?
 
@DJMcMayhem No, 17 means every cell is full
I think
 
Yeah, exactly. 17, then the 18th ends the game
 
2:18 AM
@DJMcMayhem Oh, yes, you're right.
 
@DJMcMayhem JS ES6, 41 bytes: _=>"foo".repeat(+((a=+!_)+"e"+(++a*++a)))
 
Although the 18th move would set off an infinite chain reaction.
 
@El'endiaStarman now I want to try that and see how it responds. :D
 
@DJMcMayhem I'm not even sure it's possible to achieve the theoretical maximum on a size-3 board.
 
with open(f) as f should be fine in python, right?
 
2:25 AM
I think so, yes, but that's awful. :P
 
@HelkaHomba Yes, that looks good to me
 
Yes, but might need to import from __future__ in Python 2 (older versions)
 
I'm in 3
@El'endiaStarman I don't need f no more :P
 
Should definitely be fine then :P how come?
 
@Sp3000 IIRC the with syntax was added in 2.6 or 2.7, but I'm too lazy to check the docs right now.
 
2:28 AM
Yeah, something like that sounds about right (also too lazy to check atm)
 
does for i in i: make people cringe?
 
I don't think that's even valid
 
Yes in production, no in code golf
 
Oh god, it is valid...
Yes, that totally makes me cringe
 
It's scopiness!
 
2:30 AM
@El'endiaStarman It is. If it works out like this:
First: 2 2 2 3 3 5 5 5 5
Second: 2 2 2 3 3 3 3 5 5 5
In terms of which types of tiles each player claims
 
@HelkaHomba Well, not exactly scopiness, because if i was [1,2,3] to start with, after the for loop it's 3.
 
Managed to get within 1 of the maximum by hand. :P
 
My guess is that the iterable gets evaluated once, at the beginning of the loop, and it doesn't affect the loop if you modify it.
 
@DLosc yeah :/
 
@El'endiaStarman I did that by hand.
 
2:32 AM
I am slowly learning how to obfuscate in python
 
@DJMcMayhem It's 1 short as well.
 
@El'endiaStarman Yeah, I just realized that now...
 
Hey wait, the board after you click still has way fewer counters...
 
Cause a bunch of them get cleared
 
But exploding hexes only redistribute counters.
 
2:36 AM
@HelkaHomba What about for sys in [__import__('sys')]
 
Oh, you don't need to hit the theoretical maximum in order to have infinite explosion.
 
Oh yeah. I don't how that works
 
I really wish they gave the option to watch the cascade...
 
Hexplode is a computer board game originally designed for the BBC Micro but since ported to many other platforms. The board comprises an array of 25 hexagonal cells. Its novel feature for a two-player alternate-turns game is that when the number of tokens in each cell reaches a critical threshold, the cell "hexplodes" such that the contents of the cell are equally distributed to each of the adjacent cells. This process can often generate a chain reaction which means that predicting the outcome of a turn is quite difficult for human players. == History == The game first appeared in the Bri...
Just find another implementation maybe?
 
2:39 AM
@DJMcMayhem I call hax. :P
 
Nope, just patience. :P
So now the question is, can that be reached with any size board?
Omigosh, I love this game, the PPCG challenges inspired by it are endless!
 
@DJMcMayhem Why can't it?
 
¯\_(ツ)_/¯
idk, I have no proof either way
 
@DJMcMayhem Alright, I confirmed it. :P
 
@ASCII-only Actually, I think it's impossible for a board with size 2. Because the tiles are 2, 2, 2, 2, 2, 2, 5 and you need a group of 3 and a group of 4 to some 7 and 8 (or 8 and 7)
 
2:44 AM
@DJMcMayhem 7 = 5+2, 8 = 2+2+2+2
 
Oh, duh I don't know why I thought group size mattered
 
This question is essentially the packing problem, isn't it?
 
@DJMcMayhem s/some/sum
 
majik self-reply powers freak me out
3
 
@EᴀsᴛᴇʀʟʏIʀᴋ Why
 
2:46 AM
because they make me think people aer mods in disguise
 
Yeah, I just achieved the theoretical maximum on a size 2 board.
 
@EᴀsᴛᴇʀʟʏIʀᴋ How
 
like teh gaot
 
@EᴀsᴛᴇʀʟʏIʀᴋ It's not like I have voices in my head or anything
 
@ASCII-only mods have self-replies
 
2:46 AM
@DJMcMayhem Shit, they're on to us, they know our secret!
 
@EᴀsᴛᴇʀʟʏIʀᴋ It's very easy to self-reply though
 
@DJMcMayhem Your secret's out, run away!
 
@DJMcMayhem "yes, we must gain the precious reps" 'no we must post teh quality challenges'
 
@DLosc Like this?
 
"but but precious repsssssss" 'but but gold badgeeessss for good questionssss'
@HelkaHomba yes
 
2:48 AM
@EᴀsᴛᴇʀʟʏIʀᴋ for sys in [__import__('sys')] is better :P
 
A size 4 Hexplode board has 6 corners (2), 12 edges (3), and 19 centers (5). It definitely seems like there should be some way to finagle these so that the sums are one apart.
Hey wait, can't you use the same filling strategy?
Yep, got it.
 
Nice!
 
I think it shouldn't be too hard to prove that one can always achieve the theoretical maximum on any size board.
 
Don't we just need a formula for numbers of each type of cell and a way to fill that?
 
Pretty much, yeah.
 

« first day (2045 days earlier)      last day (2799 days later) »