%% From http://twan.home.fmf.nl/blog/haskell/Nonograms.details %% The lambda picture %% %% fzntini: 3.5 seconds. %% fz: ?? %% lazy: 1 sec %% ROW RULES row_max = 12; row_states = array2d(1..row_total_states, 1..2, [ % pattern 0,0,2, % 1,2, 0,3, 3,0, % pattern 0,1,2, % 1,2, 3,0, 3,4, 0,5, 5,0, % pattern 0,1,1, % 1,2, 3,0, 3,4, 4,0, % pattern 0,0,2, % 1,2, 0,3, 3,0, % pattern 0,0,1, % 1,2, 2,0, % pattern 0,0,3, % 1,2, 0,3, 0,4, 4,0, % pattern 0,0,3, % 1,2, 0,3, 0,4, 4,0, % pattern 0,2,2, % 1,2, 0,3, 4,0, 4,5, 0,6, 6,0, % pattern 0,2,1, % 1,2, 0,3, 4,0, 4,5, 5,0, % pattern 2,2,1, % 1,2, 0,3, 4,0, 4,5, 0,6, 7,0, 7,8, 8,0, % pattern 0,2,3, % 1,2, 0,3, 4,0, 4,5, 0,6, 0,7, 7,0, % pattern 0,2,2 % 1,2, 0,3, 4,0, 4,5, 0,6, 6,0, ]); row_max_state = 8; row_total_states = 57; row_num_patterns = 12; row_num_states = [3,5,4,3,2,4,4,6,5,8,7,6]; % this is also the final state row_start_where = [1,4,9,13,16,18,22,26,32,37,45,52]; % COL_RULES: col_max = 10; col_states = array2d(1..col_total_states, 1..2, [ % pattern 2,1, 1,2, 0,3, 4,0, 4,5, 5,0, % pattern 1,3, 1,2, 3,0, 3,4, 0,5, 0,6, 6,0, % pattern 2,4, 1,2, 0,3, 4,0, 4,5, 0,6, 0,7, 0,8, 8,0, % pattern 3,4, 1,2, 0,3, 0,4, 5,0, 5,6, 0,7, 0,8, 0,9, 9,0, % pattern 0,4, 1,2, 0,3, 0,4, 0,5, 5,0, % pattern 0,3, 1,2, 0,3, 0,4, 4,0, % pattern 0,3, 1,2, 0,3, 0,4, 4,0, % pattern 0,3, 1,2, 0,3, 0,4, 4,0, % pattern 0,2, 1,2, 0,3, 3,0, % pattern 0,2 1,2, 0,3, 3,0, ]); col_num_patterns = 10; col_max_state = 9; col_total_states = 51; col_num_states = [5,6,8,9,5,4,4,4,3,3]; % this is also the final state col_start_where = [1,6,12,20,29,34,38,42,46,49];