Topic awaiting preservation: Sudoku WarJ style (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: |
posted 04-03-2016 21:09
Got to thinking about sudoku some months ago. Not creating a playable puzzle, but just the solved soduku. There is something about chaos with constraints. Read how other people do it and it was all boring with no real insight. code: 00 01 02 03 04 05 06 07 38 39 3a 3b 3c 3d 3e 3f 08 09 0a 0b 0c 0d 0e 0f 00 01 02 03 04 05 06 07 10 11 12 13 14 15 16 17 08 09 0a 0b 0c 0d 0e 0f 18 19 1a 1b 1c 1d 1e 1f 10 11 12 13 14 15 16 17 20 21 22 23 24 25 26 27 18 19 1a 1b 1c 1d 1e 1f 28 29 2a 2b 2c 2d 2e 2f 20 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 28 29 2a 2b 2c 2d 2e 2f 38 39 3a 3b 3c 3d 3e 3f 30 31 32 33 34 35 36 37 07 00 01 02 03 04 05 06 3f 38 39 3a 3b 3c 3d 3e 0f 08 09 0a 0b 0c 0d 0e 07 00 01 02 03 04 05 06 17 10 11 12 13 14 15 16 0f 08 09 0a 0b 0c 0d 0e 1f 18 19 1a 1b 1c 1d 1e 17 10 11 12 13 14 15 16 27 20 21 22 23 24 25 26 1f 18 19 1a 1b 1c 1d 1e 2f 28 29 2a 2b 2c 2d 2e 27 20 21 22 23 24 25 26 37 30 31 32 33 34 35 36 2f 28 29 2a 2b 2c 2d 2e 3f 38 39 3a 3b 3c 3d 3e 37 30 31 32 33 34 35 36
code: 20 2a 26 23 01 21 22 34 08 19 1e 2b 00 3e 2f 1f 0d 0c 2e 1b 08 29 0a 0f 04 27 22 13 1c 05 26 07 10 37 14 36 12 31 13 15 18 09 02 1b 0c 0d 06 2d 38 3d 39 0b 3f 3c 1a 18 14 11 15 03 17 16 10 32 02 3b 32 3e 04 05 24 1f 1a 3a 38 3f 35 3d 3c 25 2f 06 1e 27 2c 09 2b 07 30 01 21 36 24 23 2e 33 30 11 00 03 17 33 16 35 28 29 0e 0b 2c 1d 0a 0f 28 25 0e 19 3a 1d 1c 2d 20 31 2a 37 39 34 12 3b 13 24 01 02 1c 34 25 06 1f 10 39 12 3b 0a 31 1a 0c 0b 0d 3a 0f 28 09 1a 05 07 03 00 06 04 01 3e 33 22 11 2a 00 1b 35 16 0e 1e 29 08 09 15 1d 14 39 20 21 14 07 17 1d 3e 3f 18 16 1c 37 0c 25 2a 27 36 3f 30 03 04 3d 26 21 38 19 3c 1b 3a 35 22 2e 2d 2f 0a 29 08 2c 2b 13 20 23 27 26 24 11 02 23 18 15 12 32 10 37 31 2d 34 2f 2e 0f 30 0d 0b 19 1f 3c 1e 3b 38 05 0e 17 28 3d 32 33 2c 2b 36
|
Maniac (V) Mad Scientist From: |
posted 04-04-2016 03:25
I lied. A base3 sudo takes me approx 0.002 seconds. Of the two transforms that I'm using, base3 requires only 1 round of one of the transforms. Much smaller data set and only one trans. code: 16 26 61 40 44 25 60 12 63 01 42 24 10 36 21 17 46 50 51 05 27 55 15 07 45 10 71 27 54 65 36 41 37 31 52 33 44 35 46 30 25 40 42 23 73 21 61 04 57 56 00 63 14 15 51 50 47 41 02 53 64 55 06 27 71 24 03 72 34 13 30 37 30 31 20 73 34 75 42 66 60 56 12 03 04 65 25 57 10 14 33 22 47 11 32 41 70 72 22 33 74 46 07 17 50 62 61 43 20 15 51 40 54 53 36 76 52 77 26 75 23 04 32 47 03 05 02 06 72 71 74 73 54 75 70 77 62 66 67 60 63 45 56 64 11 01 52 37 64 35 76 77 00 26 13 22 34 45 66 67 31 70 57 43 74 65 12 16 24 43 62 53 21 55 67 13 11 14 32 23 76 05 16 07 01 02 00 17 44 35 06 20 72 77 73 45 61 54 31 36 57 07 51 34 53 20 35 16 74 10 47 44 23 42 25 76 63 15 33 06 17 24 13 40 05 32 25 12 30 37 76 43 26 71 20 34 11 31 07 27 56 55 27 12 57 14 50 51 46 11 21 52 03 64 01 47 32 36 02 62 17 75 35 30 47 60 37 32 11 04 46 65 23 55 41 02 27 74 50 36 15 33 72 66 51 03 45 56 25 30 43 70 62 03 71 64 24 42 60 13 61 63 15 26 50 22 12 16 53 14 05 57 44 05 02 00 01 07 66 76 77 40 71 72 75 14 73 56 60 61 65 37 67 04 46 63 10 42 23 22 41 74 35 26 04 65 31 62 33 67 00 06 70 77 21 52 43 54 64 40 34 20 53 52 67 21 75 16 10 70 22 44 66 54 17 45 00 55 73 41 01 24 13 06
|
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 04-05-2016 16:36
I don't get it. Why are there numbers above 15 (or 16...) in your 'base16' sudoku? Why is your last example not square? |
Maniac (V) Mad Scientist From: |
posted 04-06-2016 01:41
The ranges are different because I just changed the bases of the numbering. The first base8 example uses regular hexadecimal. In the last example, I changed the numbering system to base8. code: 00, 01, 02, 03, 04, 05, 06, 07 10, 11, 12, 13, 14, 15, 16, 17 ... 70, 71, 72, 73, 74, 75, 76, 77
|
Maniac (V) Inmate From: The Land of one Headlight on. |
posted 04-06-2016 08:10
quote: I knew there was a valid reason for all this.....uhhhh chaos! -_Q |
Maniac (V) Mad Scientist with Finglongers From: Germany |
posted 04-07-2016 11:40
still don't get why there's '15' in a base8 sudoku that should only have numbers from 1...8? |
Maniac (V) Mad Scientist From: |
posted 04-07-2016 20:15
Okay, base8 uses the digits 0-7 (or 1-8 if you prefer). But there are two place values. Yes? code: while 1==1: do_my_bidding()
|
Maniac (V) Mad Librarian From: Seoul, Korea |
posted 04-22-2016 07:24
I don't fully understand this, but it looks cool... and I would probably go the nook-and-cranny route. |
Maniac (V) Mad Scientist From: |
posted 04-23-2016 16:26
Here is some hard coding for base3 done lazy baboon style. This code uses the first transform that I use. At such a small size, only one interation of the first transform is all that is needed. In this case, less chaos is way much better by a way lot. code: #!/usr/bin/env python import random # My code fu is lazy baboon, and it is the best! # the data structure is 4d instead of 2d # state[block_y][block_x][cell_y][cell_x] # mask[block_y}[block_x][cell_y][cell_x] def scanf1x(bx): pairs=[] for cy in range(3): for p in lpairs: fbit=1 for by in range(3): f0=mask[by][bx][cy][p[0]] f1=mask[by][bx][cy][p[1]] fbit=fbit&f0&f1 if fbit: pairs.append([bx,cy,p[0],p[1]]) return pairs def scanf1y(by): pairs=[] for cx in range(3): for p in lpairs: fbit=1 for bx in range(3): f0=mask[by][bx][p[0]][cx] f1=mask[by][bx][p[1]][cx] fbit=fbit&f0&f1 if fbit: pairs.append([by,cx,p[0],p[1]]) return pairs def swapf1x(bx,cy,p0x,p1x): for by in range(3): temp0=state[by][bx][cy][p0x] temp1=state[by][bx][cy][p1x] state[by][bx][cy][p0x]=temp1 state[by][bx][cy][p1x]=temp0 mask[by][bx][cy][p0x]=0 mask[by][bx][cy][p1x]=0 return def swapf1y(by,cx,p0y,p1y): for bx in range(3): temp0=state[by][bx][p0y][cx] temp1=state[by][bx][p1y][cx] state[by][bx][p0y][cx]=temp1 state[by][bx][p1y][cx]=temp0 mask[by][bx][p0y][cx]=0 mask[by][bx][p1y][cx]=0 return # lazy baboon main # globals, some are constants and some are not state=[[[[0,1,2],[3,4,5],[6,7,8]],[[6,7,8],[0,1,2],[3,4,5]],[[3,4,5],[6,7,8],[0,1,2]]], [[[2,0,1],[5,3,4],[8,6,7]],[[8,6,7],[2,0,1],[5,3,4]],[[5,3,4],[8,6,7],[2,0,1]]], [[[1,2,0],[4,5,3],[7,8,6]],[[7,8,6],[1,2,0],[4,5,3]],[[4,5,3],[7,8,6],[1,2,0]]]] mask=[[[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]]], [[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]]], [[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]],[[1,1,1],[1,1,1],[1,1,1]]]] lpairs=[[0,1],[0,2],[1,2]] remap=['1','2','3','4','5','6','7','8','9'] random.shuffle(remap) # seed the chaos # vertical and horizontal # once each is all that is needed for i in range(3): rlist=scanf1x(i) random.shuffle(rlist) swapf1x(rlist[0][0],rlist[0][1],rlist[0][2],rlist[0][3]) rlist=scanf1y(i) random.shuffle(rlist) swapf1y(rlist[0][0],rlist[0][1],rlist[0][2],rlist[0][3]) # output nested a bit deep, but it sure is pretty cout='' print('') for d in range(3): for c in range(3): for b in range(3): for a in range(3): cout=cout+' '+remap[state[d][b][c][a]] cout=cout+' ' cout=cout+'\n' cout=cout+'\n' print(cout) |
Maniac (V) Mad Scientist From: |
posted 04-23-2016 16:33
Two quick notes. |
Maniac (V) Mad Scientist From: |
posted 05-11-2016 16:01
I've done it. I've bloody cussing done it. |
Maniac (V) Mad Scientist From: |
posted 05-13-2016 02:56
Just because it's funny. code: he/2Kr0f U1pzY94d QAt6OMBL H5kPcmVl GyRqoWTj 3NSwFEZC sJ7xuag+ bivD8nIX qGSoinlg DbR8AM+0 zU/Y5mjI 6QvONEf4 xskuerLZ PHpcJaXB w3tFyWdV 2h7K19CT 6YsvJ+mT wchtefaI xFbkiXW4 quUS1drB z83/NCMg 2oQ7ALnV DKHR5l9Z POGpyjE0 CMtZ1Fw3 jEST5oqG fa70NK2h XWRIJ8Db l9pVicPH dr/4yYzU LnvBeO6Q +mkgAuxs zRcbVWj5 PvuQgnXJ wpoHT9dy xtK30MLe D7OhBa+A qk8sImli 2SYG4EC1 6/FUZrfN xLAB7EOQ 2CNZ/WF3 D+Jgvrus zjyTpnoG wd14SmYU 6fe0t9Kh PXiIkM8b ql5VRacH Pup4NaXU xKkVyrLH q8SZenl3 2Y7gi9Cs 6FvI5Efb DORT1M+G zc/0Amjh wotBJWdQ Ik8Hy9dD B7Osiml6 VRcG1ECP Z/FhAa+w 0tKQJnX2 gvub5Wjx TpoUNrfq 4SY3eMLz thF021fa SUo4z5dr 7QKB6NLn RH8VPJl9 pGcTqijE /3YZwyCM vsOgxe+m kbuIDAXW TpYqbA9+ IkcDQNmf 4SFzHJEX B7u63yad gv8xh1nC VRoPseWL Z/KwGirl 0tO2U5Mj BzvusmJj ZPtKhaeX gwk8bWid TxSYUr1L 4D/F3MN+ 0q7OQnAl I2RcH95C V6poGEyf MNKCUwZ/ EyYjHqTp aeOf320t WicXsDIk 95olbPVR r1FdGz4S nAuLh6B7 mJ8+Qxgv 4cPkliEH Vux7+AWs ZoqRj5rG gK2/fNnh IO6tLemQ T8DvXJ9b 0YzpdyMU BFwSC1a3 gnQLOy67 0M3CFiw/ Ims+u1xv 4EGjoAqp ZrUdYJzS BahfK52t VWbX8NDk T9HlcePR Vxod3eWS g28lG1nR TDYChA9/ 0zO+b5Mv BwuXHyak I6cjUNmp 4PFfQJEt ZqKLsir7 X8DRG5rI LO6vbJ9B lcPpUyMV CFwtQemZ fK27sAW0 +uxkHiEg joqS31aT dYz/hNn4 2KZafSeh zYTrdR1U 6O0nL/AQ PcI9lv5H qoVEjkyG wF4MCpN3 xuBm+tJs D8gWX7ib Eq4j87HJ WDVXO/se rzZdcvGi n6gLFph1 mxI+KSQN 9PTlutbA Mw0CokU5 a2BfYR3y ndxgusvy Ml20Khti mCDI8bk1 E+z4YUSA rXwZF3/J aj6BOQ75 WfPVcHRN 9LqToGpe 3/0NYCMw Gp4ycjEq htBeFfa2 bkViuXWD HRT58l9P USZ1odrz Q7gAKLn6 svIJO+mx rVlD5kGc 9g+6J7bu MTjPyRUo m0fwe/QK WBL2AtsO EIXxivH8 a4dq1p3Y nZCzNShF mQOABpL6 a3FNZkCw WsuJgS+x rGoyT7jq MUY14vdz nhKe0Rf2 9b8iI/XD EHc5VtlP 9+T1Ftbz mfI5oSQP EX4NK7Hw adBJ8R3x nCgicphD WLVyY/sq rlZeOvG2 Mj0AukU6 iIXPoRUW ABLx8vHn 5VlqYp39 NZC2OtsM e0f6u7ba Jg+DckGm yTjzFShE 14dwK/Qr 02CeaYht 4zj1rcUS B6fAnFQ7 VPX59uHR TqlyE8Gp ZwdNMo3/ gxLJmKsv ID+iWObk yTdEDORs iIlW6Fvh 14CrPupb AB+nwotU JgXm2Y73 5Vj9xKkQ NZfMq8SH e0Lazc/G Arg+xvuG N90f2tKb JMIXDk8U ym4dzSYQ 1WZCw/Fs eEBL67OH iaVlPRc3 5nTjqpoh /Ff3zMNZ podGPEyT tKLhwae0 k8lbxWiI RcjHD95V SYCUqr14 7O+Q2nAB vuXs6mJg 1l9IH8pP 5+mBsOkx NjEVGcSq JfaZhF72 iLn0QKv6 yXWgbuRD edrTUo/z ACM43Ytw J76QLonB e/w3C8MZ ivxs+Ymg 1pqGjOET NSzUdur4 At2hfca0 5kDbXFWI yRPHlK9V 5mjUwKk4 JaXHqY7V yWd32ORZ erLsDc/g AM+bPotI inlGzFvT 19Ch6up0 NEfQx8SB bXWVqcSi QLngDuRA Hl9Tzo/5 3CM06KvN hfaBxOke s+mIP8pJ GjE4wYty UdrZ2F71 Ktwf0Uae YSqd4Hr1 O72LB3nA cRDlVs95 opPjTbEy F/zCZGMN uv6+ghmJ 8kxXIQWi jozTkQ5m X8PI73Ja dYw4RsyW LOxB/Ger +uDgtUAM lcqVvhin CF2Zpb19 fK60SHNE L4uxvJsE CVK2tehW +Z8Dkibr jgYzS1Un dIFw/N3m fTO67AQ9 X0cPR5HM lBoqpyGa N32MSZCF yGzERTjo eh6a/0fK ibPWvIX8 5Hq9kVlc 1Uwrp4dY AQxntBLO JsDm7g+u dPV89byR lxgOmQiv CqTcEH1p +20Fa3At X6BKnhJ7 jDIuWs5k fz4orGNS LwZYMUe/ +A7n6GBO fN/MwbZF XJvmxUgu dypEqQTo C1Srzs4Y Leta2H0K likWD3I8 j5R9PhVc lgqr/hiY +0D9pUAc jIzMtQ5F f46mkHNu LZxWRGe8 XBPES3Jo dVwa7syK CT2nvb1O WDIcpH1X n6Buks5L 9PVoSGNl MwZK7hJC a20OvQif mxg8Rby+ EqTY/Uej rz4Ft3Ad afNth4K2 rdySUVYz nLe7QZO6 9liRHgcP Ej5pGIoq MC1/3TFw m+Avs0ux WXJkbB8D pE1GXBPu kW5bLZxK SrNUlgq8 7nJQCT2Y vmisf46F R9yH+0DO /Me3jIzc taAhdVwo 7UmJ+xgo /Haef208 v3WiXDIY psr1dz4O SbMNCwZu tGnAL6Bc kh95lPVF RQEyjqTK wZeFd3/M qT1olGpE 20AKChta DI58+bkW PVycXHR9 z4NYjUSr 6BJOfQ7n xgiuLsvm S5HWcIql RJsnuBD+ /yG9oVzj vehMKZ6f kAQaO0xL pibm8gPX t1UEYTwd 7N3rF42C v6LOATQn twCFNI3M kx+uJ4sm SqjoyBGE /zdY1gUr 72fKeVha RDX8iZbW pPlc50H9 RsyYC0Dr vhicj469 pb1FfBPM tUAuXVwm 73J8lT2W kQ5odZxE SHNKLgqa /GeO+Izn 8ib9jVzk OAQmXgP7 c5HEdTwR FN3aL0x/ Kehn+BDt uJsWlIqv oyGrC42p Y1UMfZ6S f0MheztK d4EU1PSY LBaQAw7O lVWH5xRc jT9GyDpo CZr3Nq/F +gnsJ2vu XImbi6k8 GjryI6cv bX9iBwut UdM1Vxok QLmAZqKS s+WJ0zO/ HlE5g287 3CaNTDYR hfne4PFp Q1+mguxp 35fa0K2k sNXWI8DS GJdr4Yz7 UiCMZFwv hyLnBO6R bel9VcP/ HAjEToqt Fwa/4N3C oqrpVyGj K2ntZehf 8D9kgibX cPERI5Hl YzMST1Ud O6m70AQL uxWvBJs+ U95XRDoV HmJLv68g 3EylpPYT saeCtwO0 bnAf72uB GWi+kxcI hr1jSqF4 QMNd/zKZ sOB7nqAL hFZ/MDNC bugvmzJ+ UoTpE6yj 3Y4Srx1d QK0taPef H8IkWwiX GcVR925l HJESZ28d seWRTzOl Gir/06cC h1nvIPF+ QNmkVqKX bA9p4wuj U5MtBxof 3ya7gDYL kWilTPYb 7nA+IxcQ R95j4qFH /MNfB2u3 taeLg68h vmJXVDos pEydZzKG Sr1C0wOU ea3Ktd20 1rGYSlz4 AnhO7C6B 59bcR+PV yEHopXqT NMUF/jwZ JmQuvfxg iWs8kLDI oyUpWLVx 8iHknCg2 Y13S9+TD OAs7Mj0z uJbvadBw c5GRmfI6 FNh/EX4P KeQtrlZq OSJsmg+q FReha0fD u/ibWIXz ov1Ur4d6 YkN3MZCx KpAQnBLP 8t5H9Vlw c7yGETj2 ZChwr/FN TjUq9poy 0fQ2MtKe IXHDmk8i VlGPWRc5 4d3zESY1 BLs6a7OA g+bxnvuJ YHRiPXT9 csvAxLIm FGp5ql4E uhtN2CBa 8Q7e6fgn obkJD+VW KUSyzjZr O3/1wd0M uBn6Qj7A KZMw3X/N 8gmxsdvJ YTEqGLpy F4rzU+S1 O0a2hlte cIWDbCki oV9PHfR5 cvGzMfI1 utbPEdB5 okUwaLVN KSQxWlZJ O/sD9j0i 87HqrCgy YR32n+Te Fph6mX4A Dbk5El48 6Q7JW+VO PHRyrjZc w3/enfgF 2htAmLIK xsvi9XTu qGp1Md0o zUSNaCBY |
Maniac (V) Mad Scientist From: |
posted 05-25-2016 19:01
http://sudoku.jaderat.com/ |
Maniac (V) Mad Scientist From: |
posted 05-30-2016 21:06
Here is one of the base8 CSV files in the sample pack. |
Maniac (V) Mad Scientist From: |
posted 07-29-2016 15:12
I promised myself I wouldn't get caught up in doing hide/reveal. code: +---------+---------+---------+---------+ | . . . D | E . G . | . . K . | M . . P | | . N . . | . . . D | . . G H | . J K . | | . . K . | . N O . | A B . . | . . G . | | E F . . | I . . . | . . . . | A . . D | +---------+---------+---------+---------+ | . A . . | . . F . | L . . . | P . . O | | . . . . | . . . . | . E F . | L . . K | | . . J K | . . . . | . A . C | . E F . | | H . . G | . I J . | . . . O | . . B . | +---------+---------+---------+---------+ | C . A . | G H E . | . L . J | . . . N | | . . M N | C . A . | . . . . | . . . . | | . L . J | . . . N | C . . . | . . . F | | . H . . | . L . J | O P M . | . . . B | +---------+---------+---------+---------+ | . . D . | . . . E | J K . . | . . P . | | N O . . | B . D A | F . H . | . . . I | | . . . I | N . . M | B C . . | . G H . | | . . . E | . . . . | . . P . | . C . . | +---------+---------+---------+---------+
|
Maniac (V) Mad Scientist From: |
posted 07-30-2016 15:56
Make some observations. code: +-----+-----+ | . B | . . | | C D | . . | +-----+-----+ | . . | D . | | . . | . A | +-----+-----+ +-----+-----+ | . B | C . | | . . | . . | +-----+-----+ | . . | . . | | D . | . A | +-----+-----+ +-----+-----+ | A . | . . | | . . | . B | +-----+-----+ | . . | . C | | . C | B . | +-----+-----+ +-----+-----+ | . . | C . | | . . | . B | +-----+-----+ | B . | . . | | . C | . A | +-----+-----+ |
Maniac (V) Mad Scientist From: |
posted 11-03-2016 00:33
I'm still at it. Decided to go back and completely re-write my base code: 4 2 3 1 8 9 7 5 6 1 6 5 7 2 3 4 9 8 7 8 9 6 5 4 1 2 3 3 7 2 9 4 8 6 1 5 6 5 4 3 1 2 9 8 7 9 1 8 5 7 6 3 4 2 5 3 1 2 9 7 8 6 4 2 4 6 8 3 1 5 7 9 8 9 7 4 6 5 2 3 1
code: 6 3 1 8 9 2 4 7 5 5 9 4 1 7 3 6 8 2 7 2 8 4 6 5 9 3 1 4 5 3 2 1 9 7 6 8 9 7 6 3 5 8 2 1 4 8 1 2 7 4 6 3 5 9 2 6 7 5 8 4 1 9 3 1 4 5 9 3 7 8 2 6 3 8 9 6 2 1 5 4 7
|
Maniac (V) Mad Scientist From: |
posted 11-06-2016 14:20
Was thinking about the fractal thing that I can see in base(3) sudoku grids. I now know code: #!/usr/bin/env python # this is the base # see what happend when # you swap some of the # values around bgrid=[[0,1,2], [3,4,5], [6,7,8]] # this holds the base(3) bits # for example: 5=[1,2] # 1*3+2=5 sgrid=[[0,0,0], [0,0,0], [0,0,0]] # this is the final output grid # once the bits are moduloed state=[[0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0]] # take the base, and split it # into base(3) bits for cy in range(3): for cx in range(3): lbit=bgrid[cy][cx]/3 rbit=bgrid[cy][cx]%3 sgrid[cy][cx]=[lbit,rbit] # the left bit, the right bit, # and some modulo magic for by in range(3): for bx in range(3): for cy in range(3): for cx in range(3): lbit=(sgrid[cy][cx][0]+bx)%3 rbit=(sgrid[cy][cx][1]+by)%3 fbit=lbit*3+rbit state[by*3+cy][bx*3+cx]=fbit # kick it out to screen bseq=['0','1','2','3','4','5','6','7','8','9'] aline=' +-------+-------+-------+\n' cout='' for k in range(9): if (k%3)==0: cout+=aline for j in range(3): cout+=' |' for i in range(3): cout+=' '+bseq[state[k][j*3+i]] cout+=' |\n' cout+=aline print(cout)
|
Maniac (V) Mad Scientist From: |
posted 12-31-2016 11:32
And now for something different. code: 4058 A6E9 C1B3 7FD2 192C 387F 06AD E54B 6D7E 40BC 52F9 81A3 AB3F 512D 84E7 069C 5287 FBA1 9ED4 C036 FA04 2C87 6B31 9DE5 E6C3 94D5 A702 B81F 91BD 630E FC85 247A 3FA0 8742 E59B 1C6D 8716 EDCB 4A2F 3950 BE49 1A56 3DC0 F728 C5D2 0F93 1876 4ABE D3E1 B5F0 796C A284 246B C938 DF1A 5E07 78FA D214 B05E 63C9 0C95 7E6A 2348 DBF1 |
Maniac (V) Mad Scientist From: |
posted 01-08-2017 08:33
A few days ago I was playing around with the idea of creating a regular latin square using strictly bitwise ops. code: 0 1 2 3 4 5 6 7 1 0 3 2 5 4 7 6 2 3 0 1 6 7 4 5 3 2 1 0 7 6 5 4 4 5 6 7 0 1 2 3 5 4 7 6 1 0 3 2 6 7 4 5 2 3 0 1 7 6 5 4 3 2 1 0
code: 6 4 2 0 5 7 1 3 7 5 3 1 4 6 0 2 4 6 0 2 7 5 3 1 5 7 1 3 6 4 2 0 2 0 6 4 1 3 5 7 3 1 7 5 0 2 4 6 0 2 4 6 3 1 7 5 1 3 5 7 2 0 6 4
|
Maniac (V) Mad Scientist From: |
posted 01-13-2017 15:27
I was doing some thinking about it, looking for the reasons why things work so |
Maniac (V) Mad Scientist From: |
posted 01-15-2017 07:42
So far everything is working dandy. code: +pk7vWDQ GBJAd9tx I16U/FCY SwlbiMfP 2rLRyzom ceEHOsX5 Tq0uZjVh n43Ka8Ng efAF6h3Y InQ2yXbR cmi0vBoM daGq4T+1 ZgEjtVP9 7zlJD8KU prx5N/HS wkuLWCOs KlPy48JN CwmWjD5q eHsuVhSn 6ZAXYFo2 BOdik3fb Q1RLIxTr gacG9ztU /0M+Epv7 nTMSRHIx 7VzLuso1 GtqEb59w WUm8DBkh 0+/lKcNp CgYa2vyZ FAeO346f QrPJXjid ij5BwamU c/Z+f4Eg T28LlKpr tuHQOv3C sXSY1xFe Nb0V6ohd JyWPMnk7 9GRAqIDz 0CZdr/ob YHOle8kU R7jgPxfD NpnV9zKJ vaQW5MA4 q3u+BtiG Xs1I2wEL mFThcS6y tqc9GEgz P0ivTSKa 3XQkJ4NO RLyrsxe7 nuC6wIhH WFjfpAM/ d8+Dobml 1BVU25ZY L1OuVXs2 3N6hMpFr zydaA+ZW c0E/5gIj J7UDGT8q P94knmwS RKCiYBQv Hxfbtleo
|
Maniac (V) Mad Scientist From: |
posted 01-26-2017 00:37
I figured it all out. The patterns are rather easy. However, I did find a repository of |
Maniac (V) Mad Scientist From: |
posted 01-28-2017 19:46
I should be writing, but I'm having too much fun. |
Maniac (V) Mad Scientist From: |
posted 04-08-2017 10:36
My work on XOR is currently in limbo. I don't have quite enough time to give it code: 7 8 2 . . . . . . . . . 3 . . 1 . . . . . . . . . . . . . . 5 . . . 2 . . 9 . . 8 . . . . 1 . . . . . 3 . . 6 . 3 1 . . . . . . . . . 4 . . 8 9 . . . . . . . . .
code: 7 8 2 . . . . . . . . . 3 . . 1 . 8 . . . 8 . . . . . . . . 5 . . 8 2 . . 9 . . 8 . . . . 1 . 8 . . . 3 . . 6 . 3 1 . 8 . . . . . . . 4 . . 8 9 8 . . . . . . . .
|
Maniac (V) Mad Scientist From: |
posted 04-13-2017 23:34
I've been giving that data set a bit of a work-out as a solver. Mostly manual sifting and modifying. code: .78...3......41...............8..57..2.......4........1.3.....45...2..6....7.....' .78...34.....41...............8.457..2.......4........1.3.....45..42..6....7.....' .78...34.....41..7............8.457.72.......4........1.3...7.45..42..6....7.....' .78...34.....41..7............8.457.72.......48.......1.3...7.45..42..6.8..7.....' .78...341....41..7............8.457.72.......48.......1.3...7.45..42.16.8..71....' .78...341....41..7............8.457272.......48.......1.3...7245..42.16.8.271....' .78...341....41..7..4.........8.457272....4..48.......1.3...7245..42.16.84271....' # 4 is solved .78...341....41..7..4.........8.457272....4..48.......163...7245..42.16.842716...' .78...341....41..7..4.........8.457272....4..48.......163...7245.742.16.842716...' .78...341....418.7..4.........8.457272....48.48.......163...7245.742.168842716...' .78...341....418.7.14........18.457272.1..48.48.....1.163...7245.742.168842716...' # 1 is solved .78...341....418.7.14...2....18.457272.1..48.48.....1.163...7245.742.168842716...' .78...341....418.7.14...2....18.457272.1..48.48.....1.163...7245.7423168842716.3.' .78...341.5..418.7.14...25...18.457272.1..48.48.....1.163...7245.7423168842716.35' .78...341.5..418.7.14...256..18.457272.1..48.48....61.163...7245.7423168842716.35' .78...341.5..41897.14...256..189457272.1..48.48....61.163...724597423168842716935' .78...341.5..41897.14...256.3189457272.1..48.48....61.163...724597423168842716935' .786..341.56.41897.14...25663189457272.16.48.48....61.163...724597423168842716935' # 6 is solved .786..341.56.41897.14...25663189457272.16.48348....61.163...724597423168842716935' .786..341.56.41897.14...25663189457272916.48348....619163...724597423168842716935' .7865.341.56.41897.14...256631894572729165483485...6191635..724597423168842716935' # 5 is solved 97865.341.56.41897.149..256631894572729165483485...6191635.9724597423168842716935' # 9 is solved 978652341256.41897.149..2566318945727291654834852..6191635.9724597423168842716935' # 2 is solved 9786523412563418973149..25663189457272916548348523.6191635.9724597423168842716935' # 3 is solved 97865234125634189731497.2566318945727291654834852376191635.9724597423168842716935' # 7 is solved 978652341256341897314978256631894572729165483485237619163589724597423168842716935' # 8 is solved
|