Longest alternating subsequence self-scoring
inspired by Longest Increasing Substring
Task
Given a list of non-negative integers, output the length of its longest alternating subsequence.
An alternating sequence is a sequence of numbers which alternates between strictly increasing and strictly de...
@JoKing That's a good question...if you google "100 digits of pi" the first result seems to not include the 3 but I can't be bothered to check them all
@emanresuA Potentially: given n, output a sequence of n digits. The sequence must appear in pi, and you must provide the starting index for the first 10 possible inputs
Print 100 digits of π
Your challenge is to print any 100 consecutive digits of π. You must give the index at which that subsequence appears, and you may not assume π is normal. You may not use built-ins that calculate π or its digits. The 3 is not included.
For example, you could print any of the...
Like, if I find a super easy to compress section, and post it in Python, someone can just copy that into Jelly with no extra effort and be 3x shorter. Even in regular code golf, you have to show effort in using the golfing language, rather than just "It's Python, but shorter cause Jelly"
@lyxal algo to get the things being printed? what did you mean by "optimal section" if not "section that can be algorithmically generated with the least code"
It's similar to a challenge being "Output a 100 character excerpt from Shakespeare". Once someone finds something easy/short to output, everyone will copy it
@thejonymyster The challenge itself isn't flawed - the scoring criteria is. It lends no effort to doing anything more than waiting for someone else to find a "good" section
You aren't doing anything besides copying someone else's method, because they've shown that basically everything else is terrible compared to what they found
(obviously, not "you, you", more "you" as in the general golfer)
Plus, e.g. 20 digits is less likely to be "all the same digit", but also more likely to lead to patterns that are easily reachable, and can compress decently well
@cairdcoinheringaahing Different sequences will be more optimal for different langs though. And I think it'll be quite hard to find an "optimal" sequence.
@emanresuA I'm currently almost done with a rewrite of how functions are implemented (well, done with the function implementation, just porting a few more builtins to the new system). After that, I'm not sure whether to push forward with adding a SBCS mode, adding more builtins first, or rearranging some stuff with the data types.
As it stands, it's very powerful for certain integer/list challenges, but is still lacking a lot of important builtins and has very little in the way of string functions.
@emanresuA Yeah, true. That's kinda what I meant. It's just easier to think of it as being 5 bytes if you can see the code represented as 5 characters.
I also want to make pretty pictures to explain all the modifiers, like BQN has. :)
@emanresuA I was confused about how ⁺ worked, so I thought your original code was starting with 11. I tried substituting 11 and it still worked. So then I took the next logical step to 1. :P
I've got a code challenge on the go. Starting with this and I've got a few ideas for later iterations... The big question is, is this first run too simple a problem to solve?
So that's my first question. I think the second iteration would be running it through a few different board sizes and shapes. Different starting positions.
So is it worth doing it with a fixed board as a first instance, or is that too simple?
(I'm thinking that would allow some feedback on the API, game dynamics etc)
maybe if the sensors created more a circle rather than a cross it would make the no-sensor strategy more viable, since you don't leave as many 1 cell gaps
It could almost be entirely sensing forward in a line...
But you're right that it would make more sense.
I'm a little concerned that it would explore a lot more with each enhancement, 'tho that would go well with the increasing costs.
Really helpful ideas, thanks!
There's still the question of whether or not to do a one-board challenge... I suspect with the sensor tweaks it would still be worth doing
The end-game, you might have guessed, would be to make it a KotH challenge. Replace exploration with claiming land and score based on who has the most land when the challenge ends...
i guess its like, i thought itd be just finding all the places to insert a split between N elements, which is doable closed form, but then you have to get rid of all the equivalent ones, which makes sense that it isnt easy
This is a fixed output challenge. Output a textual representation of a chessboard hosting 8 queens, none of which are attacking each other. There are 92 ways of arranging them, 12 if rot...
Hey - quick question - are we okay with users adding tags to old questions that invalidate existing answers and then deleting those pre-existing answers
I had two 5 year old answers to this question removed after a user added the ascii-art tag
@ParclyTaxel thats fine, what i usually see is people posting both the builtin along with a non builtin solution, but unless theres a specific reason not to use a builtin theres no like, sitewide ban
@TaylorAlexRaine there isnt a way for a tag to invalidate an answer, not sure why your answer got deleted
ascii art tag doesnt even have any default rules in it, and default tag rules typically reflect expected allowances rather than new restrictions (iirc)
"Your challenge is to print/output/return this text" is the reason its invalid, not the ascii-art tag. probably since the post got boosted by the tag edit, it got more attention and a mod looked in. the person who added the tag was not jo king
if you end up re-attempting the challenge, id leave the old invalid solution in to show it off too
Futoshiki is a logic puzzle where an \$n×n\$ Latin square using numbers from \$1\$ to \$n\$ must be completed based on given numbers and inequalities between adjacent cells.
In a solved Futoshiki puzzle any row (or column) forms a linear extension of the poset induced by that row's inequalities....
The vyxal clone will not have a single huffman tree btw but one for each character, since the distribution can change depening on what characters appeared earlier in the string
Though it will be hard to find enough data so there will be some guestimating involved
@Seggan There is a separate table for the first character
@Seggan I scanned all vyxal answers on here, computed the frequency of every character, then repeatedly combined the two trees with the lowest frequency until only 1 tree remained