5 kyu
Firing squad synchronisation
20 of 23lil2
Loading description...
Cellular Automata
Puzzles
View
This comment has been reported as {{ abuseKindText }}.
Show
This comment has been hidden. You can view it now .
This comment can not be viewed.
- |
- Reply
- Edit
- View Solution
- Expand 1 Reply Expand {{ comments?.length }} replies
- Collapse
- Spoiler
- Remove
- Remove comment & replies
- Report
{{ fetchSolutionsError }}
-
-
Your rendered github-flavored markdown will appear here.
-
Label this discussion...
-
No Label
Keep the comment unlabeled if none of the below applies.
-
Issue
Use the issue label when reporting problems with the kata.
Be sure to explain the problem clearly and include the steps to reproduce. -
Suggestion
Use the suggestion label if you have feedback on how this kata can be improved.
-
Question
Use the question label if you have questions and/or need help solving the kata.
Don't forget to mention the language you're using, and mark as having spoiler if you include your solution.
-
No Label
- Cancel
Commenting is not allowed on this discussion
You cannot view this solution
There is no solution to show
Please sign in or sign up to leave a comment.
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. -.-
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.Rust code does not take into account that Balzer starts from the last element.
Modifying initial tests
squad[0] = TRIGGER_STATE;
tosquad[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.
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
Using
next
as function argument is not a good idea in Python: there's a built-in function also namednext
.fixed
This comment has been hidden.
"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??
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.)
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.
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" is a massive overstatement here. You're talking about 10% of them at best.
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.
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.
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?
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.
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.
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.
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?
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.
https://www.codewars.com/kata/reviews/61abca30bac0d800013b5454/groups/61abd139a944aa000131042b
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...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.
Thanks, I will think about it.
Solved!
This is my first kata! I guess there will be some issues so any help would be appreciated! Thanks for your feedbacks :)
Also I am not a native speaker so my instructions may be unclear, please tell me if something needs to be clarified.