Giter Club home page Giter Club logo

human-nurikabe-solver's Introduction

Nurikabe Solver

A Nurikabe solver that makes steps like a human.

Usage:

< examples/hard.txt go run . avoidMerge water list

human-nurikabe-solver's People

Contributors

griendt avatar jille avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

griendt

human-nurikabe-solver's Issues

expandIslands grew a separated island two steps at once and exceeded its size

X4 misbehaved.

+---------------------------------------------+
| ~                                ~  ~  ~  ~ |
|                               ~ E 2 ~ A 2A 2|
|    ~ B 4      C 3         D 3 ~ E 2 ~  ~  ~ |
|F 4F 4 ~  ~     ~  ~ G 7    ~ H 1 ~ I 2 ~ J 1|
|    ~  ~ K 1 ~ L 2L 2 ~        ~  ~ I 2 ~  ~ |
| ~ M 3 ~  ~     ~  ~                 ~  ~ N 3|
| ~ M 3 ~          O 3          ~ P 2    ~ N 3|
| ~ M 3 ~  ~ Q 4             ~ R 1 ~  ~  ~ N 3|
| ~  ~  ~ S 1 ~          T 2    ~ X 4X 4 ~  ~ |
|U 3U 3U 3 ~              ~  ~        ~ V 1 ~ |
| ~  ~  ~  ~ a 6       ~ W 2W 2 ~ X 4    ~  ~ |
|Y 1 ~ Z 1 ~ a 6 ~    b 2 ~  ~  ~  ~  ~ c 2c 2|
| ~  ~  ~ d 2 ~ e 2 ~     ~ f 2 ~ g 2g 2 ~  ~ |
|h 2h 2 ~ d 2 ~ e 2 ~  ~  ~ f 2 ~  ~  ~  ~ i 2|
| ~  ~  ~  ~  ~  ~  ~ j 1 ~  ~  ~ k 2k 2 ~ i 2|
+---------------------------------------------+
==> Chose expandIslands
+---------------------------------------------+
| ~                                ~  ~  ~  ~ |
|                               ~ E 2 ~ A 2A 2|
|    ~ B 4      C 3         D 3 ~ E 2 ~  ~  ~ |
|F 4F 4 ~  ~     ~  ~ G 7    ~ H 1 ~ I 2 ~ J 1|
|    ~  ~ K 1 ~ L 2L 2 ~        ~  ~ I 2 ~  ~ |
| ~ M 3 ~  ~     ~  ~                 ~  ~ N 3|
| ~ M 3 ~          O 3          ~ P 2    ~ N 3|
| ~ M 3 ~  ~ Q 4             ~ R 1 ~  ~  ~ N 3|
| ~  ~  ~ S 1 ~          T 2    ~ X 4X 4 ~  ~ |
|U 3U 3U 3 ~              ~  ~    X 4 ~ V 1 ~ |
| ~  ~  ~  ~ a 6       ~ W 2W 2 ~ X 4X 4 ~  ~ |
|Y 1 ~ Z 1 ~ a 6 ~    b 2 ~  ~  ~  ~  ~ c 2c 2|
| ~  ~  ~ d 2 ~ e 2 ~     ~ f 2 ~ g 2g 2 ~  ~ |
|h 2h 2 ~ d 2 ~ e 2 ~  ~  ~ f 2 ~  ~  ~  ~ i 2|
| ~  ~  ~  ~  ~  ~  ~ j 1 ~  ~  ~ k 2k 2 ~ i 2|
+---------------------------------------------+

unreachableByLand should understand islands need to get connected

Right now unreachableByLand sees that B has a size of 9, and uses only 6 of that, so unreachableByLand thinks it can reach everything 3 tiles away. In reality, it can reach at most 2 steps away because it needs to spend at least one tile to reconnect its two parts.

+------------------------------+
|A 4A 4 ~  ~  ~  ~  ~          |
|A 4 ~ B 9B 9B 9B 9   B 9B 9   |
|A 4 ~  ~  ~  ~                |
| ~  ~ E 4 ~ C 1 ~  ~       D 2|
|E 4E 4E 4 ~  ~  ~ F 1 ~  ~  ~ |
| ~  ~  ~ G 8 ~ J 2 ~ H 4H 4H 4|
|I 2I 2 ~ G 8 ~ J 2 ~ H 4 ~  ~ |
| ~  ~  ~ G 8 ~  ~  ~  ~  ~ L 4|
| ~ G 8G 8G 8G 8G 8 ~ K 1 ~ L 4|
| ~  ~  ~  ~  ~  ~  ~  ~ L 4L 4|
+------------------------------+

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.