Hacker News new | ask | show | jobs
by denfromufa 3254 days ago
I have a jupyter notebook about a similar game "Penguins on Ice", solved with rotation of numpy arrays:

https://nbviewer.jupyter.org/gist/denfromufa/9a5e1fdeaf611dc...

1 comments

Wow, hacker news is incredible sometimes :) , I was/am just looking over your notebook a week ago. Vacation is starting in a couple days and i was gonna try and solve if infinite play is possible in Tetris with just perfect clears. People have been at the problem for a few years now, and your notebook is pretty cool :D http://harddrop.com/forums/index.php?showtopic=7792&hl=perfe...
I was really surprised how efficient numpy arrays were at finding all combinations of the pieces. The backtracking is not using recursion, but instead a stack. This makes it more verbose to code and read, but easier to understand. I would like to make this notebook more interactive with ipywidgets and Unicode characters, so stay tuned ;)