J

John Doe

Back to Toys
GitHub

Stars

One star per row column and box, no adjacent stars.

Auto-Block
Auto-Star
Show Hints
A solved puzzel has:
  • - One star per row
  • - One star per column
  • - One star per box
  • - No adjacent stars

Automatic Solver

Given a square puzzle board of size \(n\), it will consist of \(4*n\) groups of cells, each requiring exactly one star.

Each time a star is placed, it falls in exactaly \(4\) groups:

  • - Row
  • - Column
  • - Group
  • - Adjacent

The squares in these groups can then be marked off as blocked. Similarly, when every square in a group except one is blocked, the last square must be a star. By iteratively blocking squares and placing stars, a position can be generated that is the parent of all valid solutions.

This is not guarenteed to find all solutions, since it lacks the ability to do more than surface reasoning. To combat this, a thurough depth-first search in implemented using recursion to find all possible solutions.

\[\Large w_{t+1} = w_t - \frac{dL}{dw}(w_t) \ \]
Assuming that there is a single global extreme \(f(w_*)\), how do you determine the optimal learning rate:
\[ \Large \quad \eta_* \text{st:} \quad w_t+ \eta_* \frac{dL}{dw}(w_t) = w_* \]
that allows you to reach the global extreme in one step?
Report Issue