←back to thread

99 points agnishom | 1 comments | | HN request time: 0.2s | source
Show context
wbillingsley ◴[] No.44365465[source]
I set this as part of a Scala programming assignment for my second year undergraduate class at UNE (Australia) last term. However, during the working a square is not Queen | Eliminated but Set[Queen | NotQueen]

Largely so from a programming perspective it becomes a simplified version of Einstein's Riddle that I showed the class, doing in a similar way.

https://theintelligentbook.com/willscala/#/decks/einsteinPro...

Where at each step, you're just eliminating one or more possibilities from a cell that starts out containing all of them.

Queens has fewer rules to code, making it more amenable for students.

replies(1): >>44366182 #
1. riffraff ◴[] No.44366182[source]
thanks for saying this, that is how I play this game usually, and I was confused by TFA going with backtracking/guessing a next attempt, when constraint propagation seems easier, I thought I was missing something.