Recreational Coding
summary
Starts from a 3x3 magic square summing to 99 and shows a Clojure REPL solution using core.logic that constrains entries to 1..99, finds 2,113 solutions, and proves the center must be 33 in the center. Builds a solver that unifies hints, enforces row/column/diagonal sums, and enumerates all completions. Then models Snakes & Ladders by simulation (1,000,000 runs) and by linear equations/Markov chains to get expected move counts.
AI-written summary · about
chapters (18)
- 0:00Intro
- 0:43To make it more precise
- 1:37Creating a puzzle
- 2:37Sudoku
- 2:50Thinking Programs - core.logic Joy of Clojure, Chapter 16
- 3:36Complete View
- 3:55What we want
- 4:55Grid structure
- 5:55The main part
- 9:34Including hints
- 11:06Sumo
- 11:56Relational thinking
- 14:19All solutions?
- 16:03Questions lead to other questions
- 17:34Can you prove that 33 is always in the center?
- 18:51Snakes (chutes) and ladders
- 21:15Calculations - with mistakes
- 22:12REPL experiment needed
related talks
38mFun with Functional Programming in Clojure
38mIntroduction to Logic Programming with Clojure
36mPlaying Go with Clojure
36mLearning Clojure and CLJS by playing a card game
28mPanel with Tovieye Ozi and Markus Kloimwieder
01h 02mSolving Problems the Clojure Way
36mLearning Clojure and ClojureScript by playing a card game
40mFun with Functional Programming in Clojure
