https://github.com/tyfkda/pentominosolver
https://github.com/tyfkda/pentominosolver
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tyfkda/pentominosolver
- Owner: tyfkda
- Created: 2023-05-12T09:07:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-23T03:04:36.000Z (over 1 year ago)
- Last Synced: 2025-03-02T20:32:29.664Z (over 1 year ago)
- Language: Rust
- Size: 72.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ペントミノソルバー
==================

#### Rust
```sh
$ cd rust
$ cargo run --release -- --size=6
$ cargo run --release -- --dlx --size=6
```
#### Haskell
```sh
$ cd haskell
$ stack run -- --size=6
```
#### Java
```sh
$ cd java
$ make
$ make run
$ java -cp dist PentominoSolver -s 8 --figure
```
### 計測結果
| 実装方法 | 実行速度(秒) |
|:--------|-----------:|
| Rust (naive) | 0.175 |
| Java | 0.242 |
| Haskell | 0.848 |
| Rust (DLX) | 4.089 |
### 図形表示
```
$ cargo run --release -- -s3 --figure
┏━━━┳━┳━━━━━━━━━┳━━━━━┳━┳━┳━┳━━━━━━━┳━┳━┓
┃U┏━┛X┗━┳━━━┳━┳━┛N┏━━━┛F┃T┃W┗━┓Y┏━━━┛Z┃V┃
┃ ┗━┓ ┏━┛P ┃L┗━━━┻━┓ ┏━┛ ┗━┓ ┗━┫ ┏━━━┛ ┃
┗━━━┻━┻━━━━━┻━━━━━━━┻━┻━━━━━┻━━━┻━┻━━━━━┛
┏━━━┳━┳━━━━━━━━━┳━┳━━━┳━━━━━┳━┳━━━━━━━┳━┓
┃U┏━┛X┗━┳━━━┳━━━┛Z┣━┓W┗━┓T┏━┛F┗━┳━━━┓L┃V┃
┃ ┗━┓ ┏━┛P ┃ ┏━━━┛Y┗━┓ ┃ ┃ ┏━━━┛N┏━┻━┛ ┃
┗━━━┻━┻━━━━━┻━┻━━━━━━━┻━┻━┻━┻━━━━━┻━━━━━┛
Total: Solution=2, check=10793, elapsed=1.341917ms
```
### リンク
[ペントミノパズルを解く(深さ優先探索法、Dancing Links法) - Kludge Factory](https://tyfkda.github.io/blog/2023/05/12/pentomino-solver.html)