5 kyu

Firing squad synchronisation

20 of 23lil2
Description
Loading description...
Cellular Automata
Puzzles
  • Please sign in or sign up to leave a comment.
  • DeadKings6 Avatar

    Great information in this discourse section. Voile sorry you had to deal with this. -.-

    That kacarott dude really is a troll displayed by his actions in this discourse section. I've seen him doing this in other discourses and other malicious activities. We found him. Everyone please be aware of this behavior from said person. -.-

  • xianjin Avatar

    The description should disclose number of tests: 30 tests up to 1000 soldiers each. This would allow to deduct that any HashMap solution will likely not pass.

  • xianjin Avatar

    Rust code does not take into account that Balzer starts from the last element.

    Modifying initial tests squad[0] = TRIGGER_STATE; to squad[size-1] = TRIGGER_STATE; does not help, because the final tests have it hard-coded as well.

    The same problem may exist in other translations.

  • Grovre Avatar

    Not enough information and available information scattered everywhere. You say the first few robots will have an updated state and transition_rule will be used to update the states of all robots. The rest is left to assumption from the description. Confirming a state for the previous robot and returning that clearly isn't enough and there's nothing else to gather from the description. Find a finite set of states and transition rules? We're only given 3 optional states, immutable in Rust.

    What I'm taking away from 80% of the description with the other 20% left up in the air is that this function is called over a collection of robots and the return value is what the target robot's new state is, with all robots being the correct state expected

  • Voile Avatar

    Using next as function argument is not a good idea in Python: there's a built-in function also named next.

  • Voile Avatar

    This comment has been hidden.

    • Kacarott Avatar

      "not knowing what this is from" is an artificial difficulty barrier

      "Not knowing where a problem is from" ie. "Not having seen a solution to this problem". This could be applied to literally any kata on this site. Or should we be updating descriptions of all katas with links to any and all papers, videos and articles we find, which explain (and provide a solution to) that specific problem??

    • Voile Avatar

      What are you trying to argue here? This is a very specific problem with academic researches and established, published "algorithms" as solutions. How many % of katas belong to that category?

      (Also, before you even try to argue further: for those that are in CW, this is usually done.)

    • Kacarott Avatar

      This is a very specific problem with academic researches and established, published "algorithms" as solutions.

      And why does that mean that it should require a link to such solutions in the desription? There are hundreds of katas which are much easier (or trivial), if one already knows some algorithms. See literally any pathfinding kata. Any high ranked mathematical kata. Even text parsing/evaluating has all sorts of research and online solutions. I don't see any of these providing direct links to their solutions, in their descriptions.

      This is a suggestion at best.

    • Voile Avatar

      See literally any pathfinding kata

      Pathfinding on what? With what constraints? Using what search method? (Hint: there are many) Is there a pathfinding kata that requires a highly specific algorithm to solve it, so specific that it has an established name? Do you even realize what you're talking about?

      Any high ranked mathematical kata

      "Any" is a massive overstatement here. You're talking about 10% of them at best.

      text parsing/evaluating

      Is there a single kata of that, except the "match parenthesis" katas, that requires one specific algorithm to be used to solve it?

      Seriously, why are you still arguing? It's clear you don't understand the situation before starting the argument. You're wasting the time of all of us.

    • Kacarott Avatar

      Pathfinding on what? With what constraints? ... etc. etc.

      Do you not know what any means? Countless variations of pathfinding algorithms have been researched and published about, and any pathfinding kata is going to be significantly easier for people who have read such research or are aware of such algorithms. So according to your logic, that would make it an "artificial difficulty barrier" since users will not know where the valid algorithms are from.

      "Any" is a massive overstatement here. You're talking about 10% of them at best.

      Lol do you really believe that over 90% of high ranked mathematical katas were made up purely by the authors, and don't exist anywhere else? Fibonacci (and clones), power tower with modulus, linear equations, binomial expansions, differentiation... I'm sorry I am having trouble finding all these unique unresearched mathematical katas that you are talking about, so far they are all extremely well known problems. So I suppose that they should all have links to their solutions in the descriptions too?

      It's clear you don't understand the situation before starting the argument

      I am arguing directly with what your original issue was. However it seems to me that you have pivoted from your original issue and are now arguing that the issue is that there exists only one single algorithm to solve, and that for some reason this means that the description should link to a solution. (which is also rediculous).

      Make up your mind about what the issue is. Is it that people unfamiliar with the problem have an 'artificial difficulty barrier'? Or is it that it requires one specific algorithm? Or perhaps you mean that this 'artificial difficulty barrier' only applies to problems with one solution, and not to problems with two, or more solutions?

      It is no wonder that you think I don't understand the issue, when the issue you are arguing has changed every single reply.

    • lil2 Avatar

      It seems to me that it is not common for katas to have a link toward a solution. I prefer not linking to prevent people from being spoiled too easily. Those who want to search will have no trouble finding it anyway.

      Issue marked resolved by lil2 3 years ago
    • dfhwze Avatar

      I want to search for a solution, but I don't even get what the puzzle is about. Your description is too vague for me. But then again, I'm a user that likes to be spoiled with examples.

    • lil2 Avatar

      Yes this problem is not easy to explain, I tried to make it clear but suggestions are welcome to improve the description. Do you think I should include a link toward a ressource about it too?

    • dfhwze Avatar

      Once you find out earlier research on the topic, it becomes clear. Puzzle tag seems acceptable here. Since various algorithms and solutions can be found online, this kata will not likely be approved at a difficult kyu level. Current ranking votes show this. I can approve at current average vote of 5 kyu, and probably should add a link to the wiki page describing this problem.

  • Unnamed Avatar
    • lil2 Avatar

      I see, this is problematic. What do you think is the best way to solve this? Banning global statement is not enough as a mutable object could also make it possible...

    • Unnamed Avatar

      Probably something like mixing function calls related to several different simulations so that the functions can't track which call should use which state, but it needs to be done carefully, otherwise various workarounds may remain.

    • lil2 Avatar

      Thanks, I will think about it.

    • lil2 Avatar

      Solved!

      Issue marked resolved by lil2 3 years ago
  • lil2 Avatar

    This is my first kata! I guess there will be some issues so any help would be appreciated! Thanks for your feedbacks :)

    • lil2 Avatar

      Also I am not a native speaker so my instructions may be unclear, please tell me if something needs to be clarified.