multi-puzzle-solver 1.0.7__py3-none-any.whl → 1.0.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of multi-puzzle-solver might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: multi-puzzle-solver
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: Efficient solvers for countless (50+) types of puzzles (like Sudoku, Minesweeper, etc.) with a simple python API.
5
5
  Author: Ar-Kareem
6
6
  Project-URL: Homepage, https://github.com/Ar-Kareem/puzzle_solver
@@ -412,6 +412,11 @@ These are all the puzzles that are implemented in this repo. <br> Click on any o
412
412
  <img src="https://raw.githubusercontent.com/Ar-Kareem/puzzle_solver/master/images/puzzles/abc_view_solved.png" alt="ABC View" width="140">
413
413
  </a>
414
414
  </td>
415
+ <td align="center">
416
+ <a href="#mathema-grids-puzzle-type-59"><b>Mathema Grids</b><br><br>
417
+ <img src="https://raw.githubusercontent.com/Ar-Kareem/puzzle_solver/master/images/puzzles/mathema_grids_solved.png" alt="Mathema Grids" width="140">
418
+ </a>
419
+ </td>
415
420
  </tr>
416
421
  </table>
417
422
 
@@ -485,6 +490,7 @@ These are all the puzzles that are implemented in this repo. <br> Click on any o
485
490
  - [Connect the Dots (Puzzle Type #56)](#connect-the-dots-puzzle-type-56)
486
491
  - [Nonograms Colored (Puzzle Type #57)](#nonograms-colored-puzzle-type-57)
487
492
  - [ABC View (Puzzle Type #58)](#abc-view-puzzle-type-58)
493
+ - [Mathema Grids (Puzzle Type #59)](#mathema-grids-puzzle-type-59)
488
494
  - [Why SAT / CP-SAT?](#why-sat--cp-sat)
489
495
  - [Testing](#testing)
490
496
  - [Contributing](#contributing)
@@ -5862,6 +5868,80 @@ Time taken: 0.01 seconds
5862
5868
 
5863
5869
  ---
5864
5870
 
5871
+ ## Mathema Grids (Puzzle Type #59)
5872
+
5873
+ * [**Play online**](https://www.brainbashers.com/showmathemagrids.asp)
5874
+
5875
+ * [**Solver Code**][59]
5876
+
5877
+ <details>
5878
+ <summary><strong>Rules</strong></summary>
5879
+
5880
+ Complete the grid using all of the numbers from 1 to 9.
5881
+ When completed, all of the sums must be correct.
5882
+ The sums are solved strictly from left to right, and top to bottom.
5883
+ The normal order of mathematical operations is ignored.
5884
+ For example, 2 + 5 x 9 is calculated as (2 + 5) x 9 = 63.
5885
+ ÷ 1 doesn't appear in the puzzle.
5886
+ x 1 doesn't appear in the puzzle (although there might be 1 x).
5887
+ At no point will any calculation go below zero, or become fractional.
5888
+
5889
+ </details>
5890
+
5891
+ **Unsolved puzzle**
5892
+
5893
+ <img src="https://raw.githubusercontent.com/Ar-Kareem/puzzle_solver/master/images/puzzles/mathema_grids_unsolved.png" alt="Mathema Grids unsolved" width="500">
5894
+
5895
+ Code to utilize this package and solve the puzzle:
5896
+
5897
+ ```python
5898
+ import numpy as np
5899
+ from puzzle_solver import mathema_grids_solver as solver
5900
+ board = np.array([
5901
+ [' ', '+', ' ', '-', ' ', '=', '4'],
5902
+ ['+', ' ', '+', ' ', '*', ' ', ' '],
5903
+ [' ', '*', ' ', '/', ' ', '=', '3'],
5904
+ ['*', ' ', '*', ' ', '+', ' ', ' '],
5905
+ [' ', '*', '2', '-', ' ', '=', '2'],
5906
+ ['=', ' ', '=', ' ', '=', ' ', ' '],
5907
+ ['24', ' ', '32', ' ', '30', ' ', ' '],
5908
+ ])
5909
+ binst = solver.Board(board=board, digits=[1, 2, 3, 4, 5, 6, 7, 8, 9])
5910
+ solutions = binst.solve_and_print()
5911
+ ```
5912
+
5913
+ **Script Output**
5914
+
5915
+ ```python
5916
+ Solution found
5917
+
5918
+ 0 1 2 3 4 5 6
5919
+ ┌───┬───┬───┬───┬───┬───┬───┐
5920
+ 0│ 5 │ + │ 7 │ - │ 8 │ = │ 4 │
5921
+ ├───┼───┼───┼───┼───┼───┼───┤
5922
+ 1│ + │ │ + │ │ * │ │ │
5923
+ ├───┼───┼───┼───┼───┼───┼───┤
5924
+ 2│ 1 │ * │ 9 │ / │ 3 │ = │ 3 │
5925
+ ├───┼───┼───┼───┼───┼───┼───┤
5926
+ 3│ * │ │ * │ │ + │ │ │
5927
+ ├───┼───┼───┼───┼───┼───┼───┤
5928
+ 4│ 4 │ * │ 2 │ - │ 6 │ = │ 2 │
5929
+ ├───┼───┼───┼───┼───┼───┼───┤
5930
+ 5│ = │ │ = │ │ = │ │ │
5931
+ ├───┼───┼───┼───┼───┼───┼───┤
5932
+ 6│24 │ │32 │ │30 │ │ │
5933
+ └───┴───┴───┴───┴───┴───┴───┘
5934
+ Solutions found: 1
5935
+ status: OPTIMAL
5936
+ Time taken: 0.00 seconds
5937
+ ```
5938
+
5939
+ **Solved puzzle**
5940
+
5941
+ <img src="https://raw.githubusercontent.com/Ar-Kareem/puzzle_solver/master/images/puzzles/mathema_grids_solved.png" alt="Mathema Grids solved" width="500">
5942
+
5943
+ ---
5944
+
5865
5945
  ---
5866
5946
 
5867
5947
  ## Why SAT / CP-SAT?
@@ -5971,3 +6051,4 @@ Issues and PRs welcome!
5971
6051
  [56]: https://github.com/Ar-Kareem/puzzle_solver/tree/master/src/puzzle_solver/puzzles/connect_the_dots "puzzle_solver/src/puzzle_solver/puzzles/connect_the_dots at master · Ar-Kareem/puzzle_solver · GitHub"
5972
6052
  [57]: https://github.com/Ar-Kareem/puzzle_solver/tree/master/src/puzzle_solver/puzzles/nonograms "puzzle_solver/src/puzzle_solver/puzzles/nonograms at master · Ar-Kareem/puzzle_solver · GitHub"
5973
6053
  [58]: https://github.com/Ar-Kareem/puzzle_solver/tree/master/src/puzzle_solver/puzzles/abc_view "puzzle_solver/src/puzzle_solver/puzzles/abc_view at master · Ar-Kareem/puzzle_solver · GitHub"
6054
+ [59]: https://github.com/Ar-Kareem/puzzle_solver/tree/master/src/puzzle_solver/puzzles/mathema_grids "puzzle_solver/src/puzzle_solver/puzzles/mathema_grids at master · Ar-Kareem/puzzle_solver · GitHub"
@@ -1,7 +1,7 @@
1
- puzzle_solver/__init__.py,sha256=CiplXqjf9w0kuDmtvive0gM8hkZEIRQNgaK1A_X_ZwE,5390
1
+ puzzle_solver/__init__.py,sha256=0jnYSJY4kJBhX5PU4UMmMcbTg8PsyFjiX0y23r5sv5k,5502
2
2
  puzzle_solver/core/utils.py,sha256=FE0106dfQRsgCn2FRBvRq5zILLK7-Z3cPHkAlBWUX0w,8785
3
3
  puzzle_solver/core/utils_ortools.py,sha256=ACV3HgKWpEUTt1lpqsPryK1DeZpu7kdWQKEWTLJ2tfs,10384
4
- puzzle_solver/core/utils_visualizer.py,sha256=AmVeBuEMaJzVY2zBbRoONlC9x3AGLKcdaNn8mD-nrLs,23347
4
+ puzzle_solver/core/utils_visualizer.py,sha256=3EJ7V8rHyasj1peAzplDJfKkPy6Yj9j7BXqMBWQ3eNg,22834
5
5
  puzzle_solver/puzzles/abc_view/abc_view.py,sha256=Qr0rZKmKQ2teStHjQ5VPQ4k-XptsjJAlZ1WXWk5Aax4,4570
6
6
  puzzle_solver/puzzles/aquarium/aquarium.py,sha256=dGqYEWMoh4di5DN4sd-GtYb6QeTpVYFQJHBkrrmrudQ,5649
7
7
  puzzle_solver/puzzles/battleships/battleships.py,sha256=U4xJ_NJC2baHvfaAfJ01YEBjixq9gD0h8GP9L1V-_oM,7223
@@ -33,13 +33,14 @@ puzzle_solver/puzzles/light_up/light_up.py,sha256=iSA1rjZMFsnI0V0Nxivxox4qZkB7Pv
33
33
  puzzle_solver/puzzles/lits/lits.py,sha256=QeXFiCnWNI9jzUj3QLgU20mXxE2DD9o4BJsUb0TswKk,7231
34
34
  puzzle_solver/puzzles/magnets/magnets.py,sha256=-Wl49JD_PKeq735zQVMQ3XSQX6gdHiY-7PKw-Sh16jw,6474
35
35
  puzzle_solver/puzzles/map/map.py,sha256=sxc57tapB8Tsgam-yoDitln1o-EB_SbIYvO6WEYy3us,2582
36
+ puzzle_solver/puzzles/mathema_grids/mathema_grids.py,sha256=wXj3pfXUMh3deFA6XXndZXod6ZNyCVt9vX1akt9zz20,6380
36
37
  puzzle_solver/puzzles/minesweeper/minesweeper.py,sha256=gSdFsuZ-KrwVxgI1HF2q_pYleZ6vBm9jjRTFlboVnLY,5871
37
38
  puzzle_solver/puzzles/mosaic/mosaic.py,sha256=T89tkyTbob3LT20vwY3hkkEtNi8bxp2_CLaVi1gzhBc,1974
38
39
  puzzle_solver/puzzles/nonograms/nonograms.py,sha256=Q-VHI0IPR2igccnE617HPThj5tnBgt27MiLWIZPtYcI,5587
39
- puzzle_solver/puzzles/nonograms/nonograms_colored.py,sha256=Qy3CGNNs0MoZQv-qHyMMP8-fK7s7f_utK-Rc1hQaX_A,10750
40
+ puzzle_solver/puzzles/nonograms/nonograms_colored.py,sha256=XpxzpJw0GA-tE7PiltlA-dfypaTvqNIDLnKl1LxIjD4,10500
40
41
  puzzle_solver/puzzles/norinori/norinori.py,sha256=ZEDWrD7zvEuqXOdXGOrELh1n_mWzhzZa3chs6Zqd3Pc,4570
41
42
  puzzle_solver/puzzles/nurikabe/nurikabe.py,sha256=hX0VcjPwO8PfY2kiIpQV45FWIvKRosFebk588tp5wzk,6603
42
- puzzle_solver/puzzles/palisade/palisade.py,sha256=Stvgw0k_sml9Dj5RMRVf0EmU5a_eGf1fn65IXelR6Wk,4802
43
+ puzzle_solver/puzzles/palisade/palisade.py,sha256=rUYI39DOxKu_XSJ-Y_mdQGpGM-YLgKw_kjDWes97ncQ,4701
43
44
  puzzle_solver/puzzles/pearl/pearl.py,sha256=slPVCzPObQLNk4EYqe55YR4JeRCUs07Mjdks1fWKZSY,6696
44
45
  puzzle_solver/puzzles/pipes/pipes.py,sha256=2HDHCWhD-fLYTRoJsx15gOrsgt_SbjlGF2QDS5UX6m8,4680
45
46
  puzzle_solver/puzzles/range/range.py,sha256=sJVMKzoT5unihMKurriAUTGLY0f7OQXSZfSHWezPPkw,3387
@@ -60,7 +61,7 @@ puzzle_solver/puzzles/tapa/tapa.py,sha256=554Xun39M3oJ5kOUwrhLUtbUXbsAYj4DH-GBht
60
61
  puzzle_solver/puzzles/tents/tents.py,sha256=81hAtmNNYIgzh0tEa0BuExmdzQfGVrlwjn_Dw8hEp3c,4943
61
62
  puzzle_solver/puzzles/thermometers/thermometers.py,sha256=bGcVmpPeqL5AJtj8jkK8gYThzv9aGCd_QrWEiYBCA2s,4011
62
63
  puzzle_solver/puzzles/towers/towers.py,sha256=OLyTf9nTFR5L32-S_fhVyBmpz4i5YUNJotwOwbw_Fjg,6500
63
- puzzle_solver/puzzles/tracks/tracks.py,sha256=u34nOCvLHQrQFdInGpM3Y1dX_A30SNh4o6W4l7BSPmE,5516
64
+ puzzle_solver/puzzles/tracks/tracks.py,sha256=MnwbjGeWdmk2iw0Tc3YPjz-fE_uHWEoKNKbuCwsRuCo,5505
64
65
  puzzle_solver/puzzles/twiddle/twiddle.py,sha256=3gPoeD0DoiiZbIhtptdXFldO_t1QShL6IxkDqJMzjkk,5446
65
66
  puzzle_solver/puzzles/undead/undead.py,sha256=IGFQysgoaKZH8rKjqlrkoHsH28ve4_hKor2f0QOsWY0,6596
66
67
  puzzle_solver/puzzles/unequal/unequal.py,sha256=ExY2XDCrqROCDpRLfHo8uVr1zuli1QvbCdNCiDhlCac,6978
@@ -68,7 +69,7 @@ puzzle_solver/puzzles/unruly/unruly.py,sha256=_C6FhYm9rqwhlQa6TMTxYr3rWcP_QS-E93
68
69
  puzzle_solver/puzzles/yin_yang/yin_yang.py,sha256=D0JacUdK5yPrfScmGqX-p8144VbwxfDgIaqF8hwLXlM,5039
69
70
  puzzle_solver/puzzles/yin_yang/parse_map/parse_map.py,sha256=drjfoHqmFf6U-ZQUwrBbfGINRxDQpgbvy4U3D9QyMhM,6617
70
71
  puzzle_solver/utils/visualizer.py,sha256=T2g5We9J3tkhyXWoN2OrIDIJDjt6w5sDd2ksOub0ZI8,6819
71
- multi_puzzle_solver-1.0.7.dist-info/METADATA,sha256=WfWXNWvZZPMkq8SmkWShIMpG6S4dDZcvayWDFIyM9-A,452620
72
- multi_puzzle_solver-1.0.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
73
- multi_puzzle_solver-1.0.7.dist-info/top_level.txt,sha256=exwVUQa-anK9vYrpKzBPvH8bX43iElWI4VeNiAyBGJY,14
74
- multi_puzzle_solver-1.0.7.dist-info/RECORD,,
72
+ multi_puzzle_solver-1.0.8.dist-info/METADATA,sha256=E6zK6c0vVluGrFEvS459AuNa33dET9IWNdmqtIbYJwA,456018
73
+ multi_puzzle_solver-1.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
74
+ multi_puzzle_solver-1.0.8.dist-info/top_level.txt,sha256=exwVUQa-anK9vYrpKzBPvH8bX43iElWI4VeNiAyBGJY,14
75
+ multi_puzzle_solver-1.0.8.dist-info/RECORD,,
puzzle_solver/__init__.py CHANGED
@@ -23,6 +23,7 @@ from puzzle_solver.puzzles.keen import keen as keen_solver
23
23
  from puzzle_solver.puzzles.light_up import light_up as light_up_solver
24
24
  from puzzle_solver.puzzles.magnets import magnets as magnets_solver
25
25
  from puzzle_solver.puzzles.map import map as map_solver
26
+ from puzzle_solver.puzzles.mathema_grids import mathema_grids as mathema_grids_solver
26
27
  from puzzle_solver.puzzles.minesweeper import minesweeper as minesweeper_solver
27
28
  from puzzle_solver.puzzles.mosaic import mosaic as mosaic_solver
28
29
  from puzzle_solver.puzzles.nonograms import nonograms as nonograms_solver
@@ -84,6 +85,7 @@ __all__ = [
84
85
  light_up_solver,
85
86
  magnets_solver,
86
87
  map_solver,
88
+ mathema_grids_solver,
87
89
  minesweeper_solver,
88
90
  mosaic_solver,
89
91
  nonograms_solver,
@@ -119,4 +121,4 @@ __all__ = [
119
121
  inertia_image_parser,
120
122
  ]
121
123
 
122
- __version__ = '1.0.7'
124
+ __version__ = '1.0.8'