« first day (2655 days earlier)      last day (2192 days later) » 

12:52 AM
@Pavel I feel like I might need to use this
but I have a significant backlog
 
1:21 AM
You're welcome
 
 
2 hours later…
3:18 AM
i had an idea for a minimalist koth challenge
basically, there are a set number of turns
each turn, bots bet on the result of a coin flip, heads or tails, with as much points as they want to bet
then, the bots get the results of the last coin flip: how much money people now have, who bet what etc.
then they get to do it again the next turn, taking into account they aren't aiming for money, they're aiming to have the most money
if a bot has -100 points, they win if everyone else has -200 points
also, i was thinking this might be a good place to apply my "many worlds" method of determining the best bot
although it takes a lot to do, relatively, this is a simple one
basically, whichever bot is more likely to end up having the most points wins
it doesn't matter how much above other players they have... except that in the event of a tie, each winning player gets 1/number of tying players for that possibility
 
@DestructibleLemon with "Many worlds": Let's say that you have 8 bots: This means that there are 2^8 branches for every coin flip
after a single flip, you have to run each bot 256 times to get their next choice
 
i thought of that: they all use the same coin
 
ok, that's far better
 
and also remember that i don't run the bots 256 times for an 8 turn game, for example
wait
 
ok, so lets say you've done 20 turns (which is about 1 million executions)
 
3:30 AM
i mean
i don't run them 256*8 times
 
you have 1 million possible outcomes
all of them equally likely
it's possible you can merge them
 
i can optimise by having the splits occur during the middle of the game... if it was only 8 turns, i don't get 256*8, i get something a bit smaller, which might be a little bit difficult to calculate
 
so, you're going to take all 1 million outcomes, and whoever appears at the top across most of them wins?
 
ok so i run bots 2 times on the starting turn, then 4 times on the next turn, then 8 times on the next turn, rather than 256 times on the first turn, 256 at the second turn, 256 third etc.
which will allow a sort of significant optimisation
 
@DestructibleLemon huh?
 
3:32 AM
I've already moved on
 
@NathanMerrill it doesn't need to be 20 turns
 
you'll want a lot of turns. 20 seems like a decent number
 
@DestructibleLemon but if it's fewer turns then there's probably no significant difference
 
regardless, this is a one-up challenge: You always want your bid to put you 1 higher than everybody else's bid
 
even if you just reduce to 18 turns, it becomes more manageable
 
3:34 AM
you're going to run out of maximum integer size
 
@NathanMerrill is that really the optimum strategy?
 
unless you use a BigInt-type number, in which case, you'll run out of memory (or cpu time)
@DestructibleLemon yes. I have a 50% chance to be higher than everybody else
 
@NathanMerrill over multiple turns?
 
how much I lose is irrelevant because I can simply bid higher
 
3:35 AM
i would think the main issue with this koth is going to be the martingale and what you've said
 
although I wonder what would happen when multiple bots do that
 
i guess people start the game with limited money then
 
@ASCII-only it becomes a one-up challenge :)
if my initial bid is 2 billion, the one-upper will start off with 2 billion and 1
 
oh, right
 
ok nathan, your bot has a 50% chance of being in the negative on the last turn, does it not?
 
3:36 AM
that can probably be mitigated by having a limited money pool
 
well actually i guess that's an acceptable loss isn't it
 
yep, but after that 50% I can simply add my negative into the next bid
this is why you should never accept double-or-nothings.
 
ok how much should bots start with and should that be floating point?
 
if somebody will keep letting you double-or-nothing, you will eventually win
 
@DestructibleLemon IMO no floating point
 
3:38 AM
ok
 
I don't think I understand this koth.
 
if bots start with 8 coins, at 20 turns the number of coins stays within integer range, without becoming a long
 
@DestructibleLemon who knows, maybe a bot will bet int.MAX_VALUE every turn :P
 
@ASCII-only that's cheating though
 
@DestructibleLemon how is that cheating
 
3:42 AM
@ASCII-only they have 8 coins
alternately: you can go into debt, but if you lose the bet you get your kneecaps broken and can no longer participate in the game
problem: anyone who lowers themselves to 0 coins can just bet any amount
won't work
or...... i could allow the betting of transfinite values
 
4:04 AM
@DestructibleLemon :|
@DestructibleLemon what's wrong with this...
 
4:19 AM
@ASCII-only because there's no reason for a bot to bet x when they could bet x + 1
 
@DestructibleLemon and?
 
that makes half of the challenge: "generate a really big number"
and also my max_int size
 
@DestructibleLemon then don't allow debt. problem solved.
 
yes, i was saying that was a problem with the idea
 
4:35 AM
@DestructibleLemon Even if you don't allow players to bid more than they have (no negatives), you still have an issue with one-upping
I'm not sure how the math works out, but there are essentially two cases:
 
@NathanMerrill elaborate?
 
1. Bidding all of your money at the start is the best strategy, or
2. It's not
In the case that #1 is true, we've got a boring game
however, if #2 is true, then that means that I can pretty much always one-up another player
 
8 coins, no floating point
 
right, but lets say that another player bids 4 of those
I will beat that player if I bid 5 coins
(on average)
 
not necessarily?
perhaps bidding 5 coins is too risky
and anyway, you don't get told what they're going to bid
 
4:38 AM
@DestructibleLemon then let's assume another player does that
 
if 8 is not worth playing, then you can't one up someone playing 7 coins
and if you say well, it depends on the other players, i'm thinking that the idea is that you're trying to do better than other players, not do well
 
@DestructibleLemon yes. but you can't change your strategy if you don't know anything about the other players...
 
@ASCII-only yes but like, i guess it's a little bit like how trichoplax allowed vampire in the ant koth or something?
 
@DestructibleLemon but vampire can tell which player the opponent is...
 
Ok...let's say I wrote 20K bots (One for each possible set of voting rules)
there's two possible solutions: 1. There's an optimal bot, or 2. There's a set of equivalent bots
I suspect that if #1 is the case, it will be found mathematically
If #2 is the case, the bot(s) that end up winning will be dependent on which bots currently exist
because there will be a RPS mechanic going on
this is what I mean by the "one-up" mechanic. I think that it's pretty fundamental to this challenge. If you are willing to accept that, that's fine
(I don't think trying to ban it is a bad idea as well: You simply need to hope for good sportsmanship)
One of the reasons the Ant KotH had that sportsmanship is because the one-up mechanic was pretty limited, and between only a few bots.
When it's true for all submissions, it's far harder to get everybody to cooperate
 
4:57 AM
i think it has a one up mechanic in the way rock paper scissors bots have a one up mechanic
 
@DestructibleLemon :| isn't that what Nathan just said
 
absolutely. We have plenty of one-up KotHs
the RPSLS is a great example of that
 
yes... it's really a matter of whether the koth is interesting
which it might not be
 
 
2 hours later…
6:56 AM
0
A: Loopholes that are forbidden by default

isaacgExactly duplicating another answer This specifically came up for me in a king-of-the-hill contest. In particular, this contest had a random component, so replicating a submission could allow one to win by luck. In general, duplicate submissions are uninteresting, and do not add anything to any ...

 
 
2 hours later…
 
3 hours later…
11:44 AM
0
A: Sandbox for Proposed Challenges

Ciaran_McCarthyPressure unit conversion code-golf In my line of work I often need to convert between four different pressure units: bar, psi, MPa and kgf/cm2. Challenge Write a program or function that does the following: The user enters a value, the original unit and the conversion unit The program or fu...

 
Okx
12:39 PM
CMC: Remove the last character from a string and append the first character to the start hello -> hhell. Assume the input is at least 2 characters long.
 
Okx
Panacea, 4 bytes: s>s<
 
@Adám ninja
 
More interesting general problem would be:
CMC: Given a string S and a non-negative integer N, remove the last N characters from S and append the first N characters of S to the start of S: 1 hello -> hhell. 3 hello -> helhe. Assume the input is at least N characters long.
 
12:51 PM
@Adám Dyalog, 7 bytes: ↑,↓⍨∘-⍨
 
@EriktheOutgolfer That's very complicated-looking. How about ⊢∘≢↑↑,⊢ ?
@Okx How do you do the general one in Panacea?
 
@Adám that looks more complicated to me lol
just now did I understand how it works...
 
@EriktheOutgolfer If so, then it is because you're not used to ⊢∘f to mean f of .
 
@Adám I did try using ⊢∘≢, the complication is mostly at the second
unfortunately, using ⊢∘≢ doesn't save any here
 
12:55 PM
@EriktheOutgolfer The second ‽ But that's exactly the same as yours.
 
@Adám mine actually negates the left argument and then uses that as the left argument of the (the right argument is, of course, S)
 
@EriktheOutgolfer I understand what your does, but you said the second .
 
@Adám the second of yours. well, yours seems to work by "pushing" the string to the right and then cutting it to the length of the original one
 
@EriktheOutgolfer Right.
 
mine actually cuts in the correct position and then fills from the left
 
Nit
1:09 PM
@Okx Japt, 7 bytes: iUg0)¯J
But I'm not that proficient with it yet, there might be a shorter solution.
 
@betseg no, it's 20, but you are defining a parameter you'll never use
 
@Okx SOGL, 5 bytes: jK2*Κ
 
@EriktheOutgolfer oops
 
@Adám SOGL, 7 bytes: m.,;⌡j+
 
@dzaima How work?
 
1:25 PM
@Adám Canvas, 6 5 bytes
 
Anonymous
@Adám Actually, 10 bytes: ;;l))H(@+H
 
@Adám SOGL, 6 bytes: dmΚd⁄m, port of Canvas answer. Longer because Canvas has a more sophisticated type system
@Okx SOGL, 4 bytes: K,+j. Many answers :p
 
1:47 PM
This sandboxed challenge has 2 upvotes but no comments after five days. Ready?
 
The Old 3DS hardware is strange. For one, it has 3 *diffrent* CPUs, a ARM11, a ARM9, and a ARM7. What's the ARM7 do, you ask? Why it's a Gameboy Advance on a chip.
Seriously, why do they need so much backwards compat?
Also games (applications) can at most use 64MB of RAM, but it's age makes that a bit less suprising
it's essentially MSDOS but with 3D
 
Nit
@Adám What's { F, B, P, E } and how are they related to one another?
Or is there no relation and the letters are arbitrary?
 
2:03 PM
@Nit They really don't matter, but they stand for First, Business, economy Plus, and Economy.
 
2:19 PM
what's the name of a data type with 3 possible values? (i.e. boolean but with a 3rd option)
 
Okx
Java Booleans can have 3 values
true, false, and null
 
0
Q: Produce a m*n table in HTML

potatoInput : m n : two decimal integers separacted by a space. Output : A table in HTML that has m rows and n columns. For equity purposes, the output code should be properly displayed by Firefox 57 on a Linux machine on http://browsershots.org/ Please feel free to comment if you know a better al...

 
2:38 PM
@moonheart08 trite?
but spelled correctly
trit
 
For some reason, java booleans occupy 4 bytes of space. So do shorts, chars, and bytes.
Though I think if you pack them in an array they'll use the expected amount of space.
 
Okx
boolean semitrue = truetruefalsefalse
 
@moonheart08 data Foo = True | False | Wat
But if you're using C++, I'd use an enum
 
I'm using [InsertGolfLanguageMoonyHasBeenWorkingOnHere]
 
Why would a golfing language possibly want such a datatype?
I don't see why it would even want to have a normal boolean.
 
2:47 PM
Magical reasons. The more datatypes i have, the more operations can be avaliable per byte. Of course, i just settled with Numbers, Arrays, and Booleans
 
Not characters?
 
@isaacg what is evolutionary scoring?
 
Bytes. Well, kinda bytes. it's only a byte if the least significant bit is 0. Otherwise the op is 1.25 bytes. See? Magic.
so there's two sets of instructions, a 128 op one and a 512 op one.
 
I see that you perform one round of all-pairs matchups, but then you weigh the results of that 100 times. Wouldn't that mean a lucky win gets over-weighted?
thanks for optimizing my transition table, also
 
@moonheart08 the term you're looking for is "trit"
 
2:51 PM
Thanks
 
3:05 PM
I have the weirdest Factoria bug. All keystrokes are interpreted by Factorio as the APL character at the key I press, even if I have the APL keyboard layout disabled.
I had to manually rebind nearly every key to the APL equivalent.
It took me hours to figure that out.
 
@Pavel Why manually?
 
@Adám How else would I do it? I just went to the controls screen and set every keybind.
 
@Pavel I don't know what Factorio is, but couldn't you make a program to write a settings file or something?
 
Wow. That's actually amazing.
How could you not have heard of Factorio in all the time you've spent in TNB.
You should go play Factorio.
 
3:20 PM
0
Q: Nim Multiplication

MnemonicBackground If you do much code golfing, you're likely aware of the bitwise XOR operation. Given two integers, it gives another integer with 1s in the bits where the two inputs differ. So, for example, 1010 XOR 0011 = 1001. It turns out to be very useful in game theory, where it's better known ...

 
@Pavel Where?
 
@Pavel for those of us who don't have the (30)$ to get it, it's not really something you can just download
 
There's a demo
 
but that's only a subset
 
3:27 PM
But it does a pretty good job of convincing you to save up those $30 :P
 
It's well worth the money. Luckily I got it back when it was 20$
 
I don't think I'll be buying it in the coming years, if only I just find another...way to get it (and no, I'll not share)
and, since I'm not really into video-gaming, I'm not going to risk buying another kind of Steam game or something
 
3:40 PM
@JonathanAllan uh, does that mean that there's something that makes you not want to use them? like, "I almost fell for the trap to use them"?
...and I almost used both! — Jonathan Allan 33 mins ago
 
@EriktheOutgolfer No, I mean I actually considered both and decided on he ones I used.
 
@Pavel When I was about half my age, I would probably have loved it, as I liked TIM and AoE and Colonization. Now I have a family…
 
2
Q: Blackjack Bust Calculator

DevelopingDeveloperBlackjack, also known as twenty-one, is a comparing card game between yourself and a dealer, where each player in turn competes against the dealer, but players do not play against each other. Play goes as follows, the dealer deals you a card. The dealer then deals them-self a card, face down. ...

 
4:02 PM
Q# On TIO:
https://tio.run/##fZA9T8MwEIZ3/4ojYkgkcAQjlVhgYKn4aCUGxHB1TGMRf9RnU1Wovz24JGkDKtxw8r33oef1AqluW@Hg3ENpXSi1Et6SfQtlbbUsOXAmKlhRjd4xKWoL2elFBtdw69WH9FzQoF7u1HsnPQZlDV8Rq2wwMoCPhrVtG0mZJcw2FKSesHHF57WXWCWBz5HeaehOBxb@GNGEqPlM6dh09/un9WmcGdSSHAo5kH4ySOHiolECRINEPfC33nVHExTSUQFIGyNgxwBTVCan4BPHyyugX1IxWtsFrlGFkeGnaHIj19Cz7vnyopjsF7esy9v2D2TrpDli/MErrUIyMPlv6gaNNek7@pEO7IAIeQFXKf36g4WtNvvip8epJMKlzLM72TT2DJ6tb6qT7JihLw
Quantum Stuff:
https://tio.run/##7VxbbxzJdX6fX1HLDawZeNgk5TcxXIDLlRIC1mUlGpIlCKuanhpOR31TVzfJ8UrA7gIG1kEeA@Q9j36y/ZKHPATIc2D/B/2B/ATlXKqqq7trhqRWRnYTEZBI9nSdqjqX71zqFGdS
 
@Pavel wrong chat room?
 
No, I wanted to share with everyone
Wow, Microsft.Quantum.Canon function names are stupidlye long. AmpAmpObliviousByReflectionPhases, anyone?
 
Dangit, Microsoft ... I really wanted to use ConvertTo-HTML for the HTML table challenge, but it doesn't work with arrays the way I need it to. :-/
 
was it clarified?
 
4:20 PM
Is there any documentation on in-place operations on data in mov instructions, i.e. mov [r8 * r9 + r10], rax ?
 
@EriktheOutgolfer Was what clarified? The HTML Table challenge? Yeah. The only open issue is whether we're guaranteed m,n > 0
 
but it doesn't seem like it
 
@Lynn o_O Wow, that's really impressively detailed. I saw it on the starboard, but I didn't actually look at it until now.
 
what is an HTML table, for example?
 
... i just realised that AVX512 makes it so that there's more XMM/YMM/ZMM registers than there is general purpose
why
we could really use a few more general purpose ones too
 
4:29 PM
@EriktheOutgolfer <img src="https://www.ikea.com/PIAimages/35716_PE126584_S5.JPG">, obviously.
 
4:44 PM
@moonheart08 How many ZMM registers are there?
 
32
twice as many than there are GPR
as a result, you can technically use that as a super-insane-cache if you're insane enough. The ZMM registers, combined, are 2048 bytes of storage.
Even with just the 16 XMM registers, you have 256 bytes of storage.
it's a little silly, don't you think?
 
ngn
@moonheart08 are the zmms extensions to the xmms, or are they completely separate storage?
 
Extensions to them.
The lower quarter of the ZMMs map to the XMMs
The lower half, respectively, maps to the YMMs
with the XMMs being the YMM's lower half
my main question is still why there are more ZMM registers, which are massive for a register, than GPRs
 
ngn
@moonheart08 history... I guess
 
@ngn They probably could just add another extension byte. Like they did for XMM, YMM, and ZMM
(And yes, XMM, YMM, AND ZMM all have their own extension opcode, all to themselves)
 
4:53 PM
Some AVX instructions can have rather high latencies. Having a large number means you can do stuff in parallel.
 
True.
 
5:03 PM
0
A: Sandbox for Proposed Challenges

SoakuConway's Battlegrounds game-of-life king-of-the-hill python Related Conway's Battlegrounds will be a mix of PUBG and Conway's Game of Life. In this challenge, you will need to make a Python bot that will play it. Game rules The controller, at the beginning of the round, will create a two...

 
@miles Evolutionary scoring is similar to the PageRank algorithm
Your weight is proportional to your average weight against opponents, weighted by their average weight
The number of steps is unimportant, because it converges
Luck matters, so the game is played 100 times
 
5:32 PM
Hey guys, had to change my PC at work and I lost my userscript settings. Does anyone know a way to make the user options menu appear in the navbar?
 
@isaacg But each game is only scored once, then using that probability for 100 rounds. Wouldn't luck factor into starting with a high probability?
 
@miles Once you average over 100 games, the luck is basically gone. Even after averaging over 10 games, it's mostly gone.
But if you only did 1 game, as I was doing earlier due to a bug, there would be a sizable amount of luck.
 
I see.] now about the evolutionary scoring. Thanks for explaining
 
 
3 hours later…
8:55 PM
Alexander Graham Bell's voice was recovered from a wax disc: youtube.com/watch?v=qf97H6cV5QQ&feature=youtu.be
 
9:46 PM
0
A: Sandbox for Proposed Challenges

Stephen LeppikCalculate pH for a Titration code-golf chemistry There are quite a few equations for calculating the pH of a solution, each for a different part of the titration. The challenge here will be to decide which one to use to give the pH for the titration of a weak monoprotic acid with a strong bas...

 
10:19 PM
@moonheart08 yeah it's for vector calculations. 2kb = a decent amount of vector calculations = faster
 
10:46 PM
@DJMcMayhem where is the V codepage :| (also could you list the characters you haven't used for the quines yet)
 
@ASCII-only It's Latin 8
 
inb4 there was already an Emacs extension for that
 
ok so i just went back to code-golf.io and there are suddenly a lot more lisp people now
 

« first day (2655 days earlier)      last day (2192 days later) »