Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
My solution (python) passes all the tests except 1 basic test: [0, 0, 0, 0, 1] should equal [0, 1, 0, 0, 0]
Anyone has an idea where i'm going wrong?
As far as I can see, my solutions fails on some random tests cases when it shouldn't (more or less 10 each time)...
I tried to see what the result should be for some of these cases "by hand" and found back my solutions. So either I did not understand something, but managed to pass the normal tests anyway, or the random tests are wrong (but this would be surprising if some people succeeded...).
An example :
rules = [[1, 1, 0], [1, 1, 1], [0, 0, 0]]
initial = [1, 1, 1, 0, 0, 1, 1, 0, 0, 0]
generations = 10
error message :
[0, 1, 1, 0, 0, 0, 1, 1, 1, 0] should equal [0, 0, 1, 1, 1, 0, 0, 1, 1, 0]
And how I find back my result (and not the one in the error message...) :
1 1 1 0 0 1 1 0 0 0
0 1 1 0 0 0 1 0 1 0 (1)
0 0 1 0 1 0 0 0 0 0 (2)
1 0 0 0 0 0 1 1 1 1 (3)
1 0 1 1 1 0 0 1 1 1 (4)
1 0 0 1 1 0 0 0 1 1 (5)
1 0 0 0 1 0 1 0 0 1 (6)
1 0 1 0 0 0 0 0 0 0 (7)
0 0 0 0 1 1 1 1 1 0 (8)
1 1 1 0 0 1 1 1 1 0 (9)
0 1 1 0 0 0 1 1 1 0 (10)
I'd be very grateful if someone could explain me what is wrong in the way I am doing this !