5 kyu
Conways game of life on a toroidal array
243 of 420kavehhadjari
Loading description...
Puzzles
Cellular Automata
View
Career Accelerator
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.
Old good kata)
Python fork
approved by someone
Python:
Resolved in Python. Not resolving as potentially present in other languages.
Factor does log the input to the console, but it's not "garbage". Python and JavaScript have a function in preloaded, but that's the pretty-printing one mentionned in the description. All 3 have random tests.
I literally fixed Python lol, it was in a catastrophic state before. Random test code was in preloaded for reasons unknown to science.
Nice variation, funny to solve.
Nice Kata! Something different than usual!!
I'm a little confused on the single row/single column universes and how each cell's neighbor his counted. The way I visualize it is that if the universe is "0 1 0 1 0 1 0 1 1" for example... each column would fold on its self (so the bottom of the a cell would be touching it's own top) and only the first and last cells' sides would be touching. So it would almost be like a flat donut shape. So in this case.... wouldn't all cells die per the rules? Each dead cell only has 2 live neighbors (3 required) and each live cell (except for the last cell) has no live neighbors which means they die off.
In this case the cells top and bottom neighboors are them selves. So the second cell in your example would have the following neighboors:
Wouldn't that be over-counting the cell's neighbors? The top left cell would be the bottom of the cell that is already being counted as the cell to the left... it's the same cell just a different side of it. And wouldn't the due north cell and the due south cell be counting itself as live neighbors?
factor translation
Approved
I don't get this :( It looks like the tests expect me to return the same generation on blink back. I did not mutate the input.
That's what happens with this input: each two generations, the cells come back to their original state.
This comment has been hidden.
COBOL translation (author is inactive).
no random tests in Python
Are you sure? What about
Pentadecathlon (random generations)
testcases (I didn't solve this kata).right, my mistake
Those aren't actual random tests though, you can solve them through pure pattern matching if you really wanted.
C translation (author gone)
Approved :)
Hint: do NOT modify the input array!
JavaScript Translation Kumited - please accept :D
It's here!
Nice Kata, an interesting twist to the classical Conway's Game of Life and good to see a fair amount of unique fixed tests but this Kata could do with some random tests as well. Anyway, consider your Kata approved :D
Could you please check the test cases? (see my issue above)
raised as an issue
Very enjoyable. This variation of an existing Kata allowed me to examine and refactor my old solution. A valuable exercise.
Very nice variation of conways game of life!
Thanks