š„ gets the length of the input array, ¶ pushes 24, š implicitly converts 24 to a list [2 4], and checks whether the result of š„ is in that list
@Mayube Thanks for spotting this. I've found my mistake now. I was checking the type of the cell instead of the ant, which is meaningless so it was treating the queen as a worker and never creating new workers. I'm testing the corrected version now.
@trichoplax the worker counts don't work, one of them made a worker, and I can see the worker moving around, but the table still reports 0 of all types
@Mayube Thanks - having a look now. On my machine both queen and worker froze up as soon as the first worker moved one square (although all other players continued running around)
@PhiNotPi I'd love to see that too, but in a future KotH :P Although there is the potential to surround other ants, use colours that control them, and modify the paths they leave while they're away. I think there should be a fair bit of sabotage and conflict possible...
@trichoplax I made a test ant that's a modification of the straight-line ant. The queen will also grab food if it sees it, and if the queen has food it will spawn a worker, other than that the workers and queen behave the same as the straight-line ant. Not at all competitive as the queen uses any food she gets as soon as she gets it, so best-case scenario will end the game with 1 food, but it's fun to watch
plus it helped test the worker table while your worker test wasn't working
It will be interesting to see how people implement their queens, as to balance worker production with food accumulation, using only colors to store information.
@Mayube It'll help me track down what's wrong with the worker count - it was working before I posted to meta because I used it to work on other strategies so I'm stumped
@PhiNotPi This is another reason I'm half tempted to increase the number of moves - makes it harder to count how many moves have passed without running out of numbers, forcing other ways of deciding when to produce a worker
@trichoplax you have to count more than just moves, you have to count number of workers as well, and in a way that has some error correction and also works no matter your orientation.
@Mayube I worked out why my workers player froze after creating a worker - I forgot to stop them moving onto other ants so the player got disqualified... Fixed now.
@Mayube Ah - you spotted that before I got around to telling you I'd fixed it...
That's before the latest update though - it now moves diagonally
@PhiNotPi I was thinking of a very simple strategy where you produce workers every time you have food, up until move 5000 and then you don't produce any more workers. The more sophisticated approaches you mention are part of what makes me want to have more moves
@Mayube No that's what we're discussing. The queen would have to set colours around her, and stay in one place, in order to keep track of the turn number (which she doesn't have access to).
I'm not going to give access to the turn number, but I'm considering having a larger number of moves so it's harder for the ants to track how many have passed
@trichoplax realistically it seems infeasible to do anything other than blindly run around (or run in a straight line) and grab any food you see, that seems to be the only competitive strategy given how little information the ants have
@Mayube I've made some test strategies in private that fix the queen in one place and have workers run back and for with food, and that allows using at least some of the cells adjacent to the queen for encoding numbers (although I haven't implemented that)
You can encode in base 8 if you use all the available colours
I'm looking forward to seeing all the different tricks people come up with once this gets to main
Actually yeah, I think I do want more moves to bust up the simple-move counting strategies. I feel like this KOTH is aiming towards "rules are simple but complex strategies are necessary" which I like.
@Mayube Yes it's interesting how the straight line players ricochet off the others. I'm looking forward to seeing what happens when there are 16 competitive players all colliding like that...
Find the closest Fibonacci Number
We are all familiar with the famous Fibonacci sequence, that starts with 0 and 1, and each element is the sum of the previous two. Here are the first few terms (OEIS A000045):
0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 947, 1557, 2504
Give...
@Mayube On my machine, no var test doesn't get disqualified, which means you can use a variable without declaring it, you just can't access or modify globals. If it gets disqualified on your machine let me know as I'd need to look into why
hm I wonder why nobody's raised a meta post about where Alex went and what to do about essentially a missing mod (probably nothing, since the remaining 3 handle things pretty well from what I can see)
@HyperNeutrino Well, we also have a very high high-rep-user-to-post ratio compared to other sites, and most of our high-rep users patrol things pretty well.
@Mr.Xcoder That looks pretty well defined to me. The only potential problem I can think of is if it is close enough to similar challenges to be a duplicate. We've had some "closest number to" challenges before but I don't know if they are too similar or not.
@trichoplax I trawled through the fibonacci tag and didn't see anything similar. But, I didn't look the other direction to see if the Fibonacci portion is just a trivial substitution.
@Mayube I've wondered about ways of getting a straight line ant to periodically change direction, and that was one reason why I restricted to only 8 colours. I had initially allowed 16 different colours
@Mr.Xcoder No I'm not saying it is a duplicate of anything. I'm just saying it looks good unless anyone finds a duplicate. In other words "I can't think of a single criticism"
@trichoplax Kind of what happened to my Sophie-Germain challenge, it's been closed because a trivial modification could be done, check if 2p+1 is prime, not a perfect duplicate but too closely realted.
What? Did @NewSandboxedPosts Just ask me if I like my challenge?
@Mr.Xcoder The onebox was already present, so I edited the second one to just link back to yours, not realising how odd it would look asking you about your own post. Oops...
@DJMcMayhem I was disputing "we get affected as much as they do", but I didn't realise there were individual weightings by traffic in addition to based on how many questions hit HNQ
It would be fun to write a script that checks the HNQ every 30 minutes or so, and logs the data from it. Get some interesting stats like How many different sites are there? How many from PPCG are there? How long does a single post stay on? etc.
Here is the data I've collected. This updates every hour. Note that times are in BST (GMT+1).
It starts at 00:00 2017-06-06 GMT. As of writing this post, it has data for 210 hours (one hour the internet connection failed).
Here's a graph of the number of Code Golf questions on the front page of...
@trichoplax it takes site traffic and questions into account, I didn't think it took traffic into account, so my claim that we get affected as much as SO was wrong
Basically what's documented here:
What formula should be used to determine "hot" questions?
We have a few tweaks:
Succeeding questions from the same site are penalized by increasing amounts. So, the first question from SO in the list gets multiplied by 1.0, the second by 0.98, the third ...
@trichoplax We are quite low in traffic (right next to Sports and Cryptography) so I think that's part of why we get so many HNQs - highly voted highly answered questions on a site with comparatively low traffic.