-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting APL Sudoku solver(s) #15
Comments
Converting one by one Box ← {>𝕩/<˘𝕩‿∘⥊𝕩/1+↕𝕩⋆2}
# (1+↕4‿4) ∾¨ Box 2
Rcb ← {(1+↕𝕩)∾¨Box ⊑0.5⋆˜𝕩}
# Rcb 4‿4
Cmap ← {<˘˘1 (⊑∊)¨ =⌜˜𝕩}
Cmap Rcb 4‿4
Avl ← {(1+↕⊑≢𝕩)(¬∘∊/⊣)(0⊸≠)⊸/⥊𝕩×𝕨⊑Cmap Rcb ≢𝕩} Why does not Avl ← {0≠𝕨⊑𝕩? ⋈𝕨⊑𝕩; (1+↕⊑≢𝕩)(¬∘∊/⊣)(0⊸≠)⊸/⥊𝕩×𝕨⊑Cmap RCB ≢𝕩} Nxt ← {w F x:(𝕨 Avl 𝕩) {𝕨˙⌾(w⊸⊑)𝕩}¨ <𝕩}
Nxtv ← {∾𝕨⊸Nxt¨𝕩} # use like (<s44)Nxtv´⟨0‿0,0‿1,1‿0⟩ Wait. Avl ← {0≠𝕨⊑𝕩? ⋈𝕨⊑𝕩; (1+↕⊑≢𝕩)(¬∘∊/⊣)(0⊸≠)⊸/⥊𝕩×𝕨⊑Cmap RCB ≢𝕩} Now we can do: (<s44)Nxtv´⥊↕≢s44 |
https://www.youtube.com/watch?v=YnJ1Yy6gpmA
Sol ← {
terminated? answer; # Is there a way to 'break'?
𝕊¨ nextstates # This is depth-first search.
} TIL
What a beautiful world! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: