tilingPuzzles 0.2.1__py3-none-any.whl → 0.2.3__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.
@@ -0,0 +1,79 @@
1
+ Metadata-Version: 2.4
2
+ Name: tilingPuzzles
3
+ Version: 0.2.3
4
+ Summary: finding and counting solutions of tilingpuzzles like Pentomino
5
+ Author-email: jonathan graf <jonathangraf@outlook.de>
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: graphviz>=0.20.3
8
+ Requires-Dist: jupyter>=1.1.1
9
+ Requires-Dist: matplotlib>=3.10.3
10
+ Requires-Dist: numpy>=2.2.6
11
+ Requires-Dist: pandas>=2.2.3
12
+ Requires-Dist: py-cpuinfo>=9.0.0
13
+ Requires-Dist: pytest>=8.3.5
14
+ Requires-Dist: scipy>=1.15.3
15
+ Requires-Dist: timeout-decorator>=0.5.0
16
+ Requires-Dist: tqdm>=4.67.1
17
+ Description-Content-Type: text/markdown
18
+
19
+ # Count Solutions
20
+
21
+
22
+ # tilingPuzzles
23
+
24
+ ## Finding a solution
25
+
26
+ ``` python
27
+ from tilingpuzzles.games.stone import Stone
28
+ from tilingpuzzles.games.komino import Komino
29
+
30
+ # Degree of the stones
31
+ # k=5 => Pentomino
32
+ k=6
33
+
34
+ # The Universe of the Coverage problem
35
+ U="""
36
+ #######
37
+ #######
38
+ ###
39
+ #######
40
+ #######
41
+ ###
42
+ ######
43
+ #######
44
+ #######
45
+ """
46
+
47
+ U=Stone.from_string(U)
48
+
49
+ assert len(U)%k==0
50
+
51
+ display(U)
52
+
53
+ komi=Komino(U,k=k)
54
+ # limits: number of times a stone of a certain shape can be used.
55
+ komi.find_solution(limits=1)
56
+ ```
57
+
58
+ ![](README_files/figure-commonmark/cell-2-output-1.png)
59
+
60
+ ![](README_files/figure-commonmark/cell-2-output-2.png)
61
+
62
+ [frozenset({(7, 7), (8, 6), (8, 7), (8, 8), (9, 7), (9, 8)}),
63
+ frozenset({(5, 2), (6, 2), (6, 3), (7, 2), (7, 3), (8, 2)}),
64
+ frozenset({(6, 4), (7, 4), (7, 5), (7, 6), (8, 4), (8, 5)}),
65
+ frozenset({(8, 3), (9, 2), (9, 3), (9, 4), (9, 5), (9, 6)}),
66
+ frozenset({(3, 2), (4, 0), (4, 1), (4, 2), (5, 0), (5, 1)}),
67
+ frozenset({(2, 3), (3, 3), (4, 3), (5, 3), (5, 4), (5, 5)}),
68
+ frozenset({(2, 4), (3, 4), (4, 4), (4, 5), (4, 6), (5, 6)}),
69
+ frozenset({(1, 3), (1, 4), (1, 5), (1, 6), (2, 5), (2, 6)}),
70
+ frozenset({(1, 0), (1, 1), (1, 2), (2, 0), (2, 1), (2, 2)})]
71
+
72
+ Calculate the number of Solutions if every Stone can be used a unlimited
73
+ amount of time
74
+
75
+ ``` python
76
+ komi.count_solutions(limits=None,progressLevel=0)
77
+ ```
78
+
79
+ 115373
@@ -34,7 +34,7 @@ tilingpuzzles/solvers/kominoSolver.py,sha256=xfXAGGTsZ0K5TesDADmHuA4a8RyL-j_bcSQ
34
34
  tilingpuzzles/solvers/tests/test_komino_solver.py,sha256=IVDGm1lVmKwafNpSYQ6ja9s_K48MWdGbsGoOXumrlUQ,692
35
35
  tilingpuzzles/visualize/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
36
  tilingpuzzles/visualize/visualize.py,sha256=uuyi2FRvqujrphwfx0uz1UOQzpXgGCGyJSv_RQvQulI,1349
37
- tilingpuzzles-0.2.1.dist-info/METADATA,sha256=N7xHrKYTIs8Efpl8CspfNiksu9gbOmCfp5vUYr4lNdg,684
38
- tilingpuzzles-0.2.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
- tilingpuzzles-0.2.1.dist-info/entry_points.txt,sha256=76zo3sy1IWctxF6HC3cMy1ANDDzewI-6eYeO1CTnyHU,53
40
- tilingpuzzles-0.2.1.dist-info/RECORD,,
37
+ tilingpuzzles-0.2.3.dist-info/METADATA,sha256=Flf2mCDn7mqj-O2bdmTrtniAVsS2dKYcpVWsTKn-_2E,1942
38
+ tilingpuzzles-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
39
+ tilingpuzzles-0.2.3.dist-info/entry_points.txt,sha256=76zo3sy1IWctxF6HC3cMy1ANDDzewI-6eYeO1CTnyHU,53
40
+ tilingpuzzles-0.2.3.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: tilingPuzzles
3
- Version: 0.2.1
4
- Summary: Add your description here
5
- Author-email: jonathan graf <jonathangraf@outlook.de>
6
- Requires-Python: >=3.10
7
- Requires-Dist: graphviz>=0.20.3
8
- Requires-Dist: jupyter>=1.1.1
9
- Requires-Dist: matplotlib>=3.10.3
10
- Requires-Dist: numpy>=2.2.6
11
- Requires-Dist: pandas>=2.2.3
12
- Requires-Dist: py-cpuinfo>=9.0.0
13
- Requires-Dist: pytest>=8.3.5
14
- Requires-Dist: scipy>=1.15.3
15
- Requires-Dist: timeout-decorator>=0.5.0
16
- Requires-Dist: tqdm>=4.67.1
17
- Description-Content-Type: text/markdown
18
-
19
- # TilingPuzzles
20
-
21
- ## Requirements
22
-
23
- ```bash
24
- pip install uv
25
- uv sync
26
- ```
27
-
28
- ## Test
29
-
30
- ```bash
31
- pytest
32
- ```
33
-
34
- ## Build
35
-
36
- ```bash
37
- uv build
38
- ```
39
-
40
- # Demo
41
-
42
- [notebook](Demo.ipynb)