in reply to Re: My first cpan module - App::ForKids::LogicalPuzzleGenerator
in thread My first cpan module - App::ForKids::LogicalPuzzleGenerator
Most probably because of AI::Prolog
I have the impression - I might be wrong - that these clauses can be represented as entries in a 3x3x3 matrix = (name x profession x fruit) in the example given.
Entries would be undef, 0 and 1 and each 3x3 sub-square must have exactly one 1 entry and all others 0 for a solution.
A solver could be built by filling that matrix and constantly checking all 9 sub layers for deduced entries. (see example here)
Giving a set of random clauses it should be possible to pick n til the solver proves it's solvable (rejecting contradictory clauses)
This reminds me of a graphic technique we learned at uni for finding boolean rules and logical circuits from a given truth table, but I can't remember the name.
(Update: this looks right http://en.wikipedia.org/wiki/Karnaugh_map )
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: My first cpan module - App::ForKids::LogicalPuzzleGenerator
by pawel.biernacki (Acolyte) on Feb 23, 2018 at 22:20 UTC | |
by LanX (Saint) on Feb 23, 2018 at 22:34 UTC | |
by LanX (Saint) on Feb 24, 2018 at 09:42 UTC |