• Autumn Challenge 2023: Lion and Unicorn

    From Mild Shock@21:1/5 to All on Sun Nov 5 16:43:29 2023
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to All on Mon Nov 6 09:59:56 2023
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Mild Shock on Mon Nov 6 02:42:06 2023
    On Monday, November 6, 2023 at 3:59:59 AM UTC-5, Mild Shock wrote:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?
    it was thursday a truth day for the lion and a lie day for the unicorn in few inferences.
    my 1000 line program solves 500 variable pspace logic formulas
    by providing a monotone cnf that decides all qbfs.
    avoid negation and prosper in truth
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Daniel Pehoushek on Mon Nov 6 03:35:08 2023
    On Monday, November 6, 2023 at 5:42:09 AM UTC-5, Daniel Pehoushek wrote:
    On Monday, November 6, 2023 at 3:59:59 AM UTC-5, Mild Shock wrote:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?
    it was thursday a truth day for the lion and a lie day for the unicorn in few inferences.
    my 1000 line program solves 500 variable pspace logic formulas
    by providing a monotone cnf that decides all qbfs.
    avoid negation and prosper in truth
    daniel2380+++
    my program can do two trillion inferences per day and produces log files. daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to All on Mon Nov 6 07:45:12 2023
    I got the puzzle from a discussion here,
    which was about Prolog versus Theorem Proving:

    The lion and the unicorn met PROLOG
    Bruce D. Ramsey, 1986 - Free Access https://dl.acm.org/doi/10.1145/382278.382395

    This gives immediately the following database:

    yesterday(monday , sunday ).
    yesterday(tuesday , monday ).
    yesterday(wednesday, tuesday ).
    yesterday(thursday , wednesday).
    yesterday(friday , thursday ).
    yesterday(saturday , friday ).
    yesterday(sunday , saturday ).

    lies(lion, monday ).
    lies(lion, tuesday ).
    lies(lion, wednesday).

    lies(unicorn, thursday).
    lies(unicorn, friday ).
    lies(unicorn, saturday).

    Now what?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Thu Nov 9 11:19:31 2023
    Now the solution is straight forward:

    contrary(S, T) :- S, \+ T.
    contrary(S, T) :- \+ S, T.

    solve(D) :- yesterday(D, Y),
    contrary(lies(D, lion), lies(Y, lion)),
    contrary(lies(D, unicorn), lies(Y, unicorn)).

    ?- solve(D).
    D = thursday ;
    false.

    Was using a slight argument reordering of the lies facts:

    lies(monday , lion).
    lies(tuesday , lion).
    lies(wednesday, lion).

    lies(thursday, unicorn).
    lies(friday, unicorn).
    lies(saturday, unicorn).

    Mild Shock schrieb am Montag, 6. November 2023 um 16:45:15 UTC+1:
    I got the puzzle from a discussion here,
    which was about Prolog versus Theorem Proving:

    The lion and the unicorn met PROLOG
    Bruce D. Ramsey, 1986 - Free Access https://dl.acm.org/doi/10.1145/382278.382395

    This gives immediately the following database:

    yesterday(monday , sunday ).
    yesterday(tuesday , monday ).
    yesterday(wednesday, tuesday ).
    yesterday(thursday , wednesday).
    yesterday(friday , thursday ).
    yesterday(saturday , friday ).
    yesterday(sunday , saturday ).

    lies(lion, monday ).
    lies(lion, tuesday ).
    lies(lion, wednesday).

    lies(unicorn, thursday).
    lies(unicorn, friday ).
    lies(unicorn, saturday).

    Now what?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Mild Shock on Fri Nov 10 03:08:53 2023
    On Thursday, November 9, 2023 at 2:19:34 PM UTC-5, Mild Shock wrote:
    Now the solution is straight forward:

    contrary(S, T) :- S, \+ T.
    contrary(S, T) :- \+ S, T.

    solve(D) :- yesterday(D, Y),
    contrary(lies(D, lion), lies(Y, lion)),
    contrary(lies(D, unicorn), lies(Y, unicorn)).

    ?- solve(D).
    D = thursday ;
    false.

    Was using a slight argument reordering of the lies facts:

    lies(monday , lion).
    lies(tuesday , lion).
    lies(wednesday, lion).

    lies(thursday, unicorn).
    lies(friday, unicorn).
    lies(saturday, unicorn).
    Mild Shock schrieb am Montag, 6. November 2023 um 16:45:15 UTC+1:
    I got the puzzle from a discussion here,
    which was about Prolog versus Theorem Proving:

    The lion and the unicorn met PROLOG
    Bruce D. Ramsey, 1986 - Free Access https://dl.acm.org/doi/10.1145/382278.382395

    This gives immediately the following database:

    yesterday(monday , sunday ).
    yesterday(tuesday , monday ).
    yesterday(wednesday, tuesday ).
    yesterday(thursday , wednesday).
    yesterday(friday , thursday ).
    yesterday(saturday , friday ).
    yesterday(sunday , saturday ).

    lies(lion, monday ).
    lies(lion, tuesday ).
    lies(lion, wednesday).

    lies(unicorn, thursday).
    lies(unicorn, friday ).
    lies(unicorn, saturday).

    Now what?
    just about 20 inferences.
    my program takes about 400 billionths of one second.
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Daniel Pehoushek on Sat Nov 11 10:40:54 2023
    Could ChatGPT, the automatic programming Robot,
    help develop a solution with a SAT solver for XOR in mind?

    My idea currently, use 3 variables X,Y,Z for weekday:

    X,Y,Z weekday
    0,0,0 monday
    0,0,1 tuesday
    0,1,0 wednesday
    0,1,1 thursday
    1,0,0 friday
    1,0,1 saturday
    1,1,0 sunday

    Or maybe somebody, a human, did it already this way.

    Daniel Pehoushek schrieb am Freitag, 10. November 2023 um 12:08:55 UTC+1:
    On Thursday, November 9, 2023 at 2:19:34 PM UTC-5, Mild Shock wrote:
    Now the solution is straight forward:

    contrary(S, T) :- S, \+ T.
    contrary(S, T) :- \+ S, T.

    solve(D) :- yesterday(D, Y),
    contrary(lies(D, lion), lies(Y, lion)),
    contrary(lies(D, unicorn), lies(Y, unicorn)).

    ?- solve(D).
    D = thursday ;
    false.

    Was using a slight argument reordering of the lies facts:

    lies(monday , lion).
    lies(tuesday , lion).
    lies(wednesday, lion).

    lies(thursday, unicorn).
    lies(friday, unicorn).
    lies(saturday, unicorn).
    Mild Shock schrieb am Montag, 6. November 2023 um 16:45:15 UTC+1:
    I got the puzzle from a discussion here,
    which was about Prolog versus Theorem Proving:

    The lion and the unicorn met PROLOG
    Bruce D. Ramsey, 1986 - Free Access https://dl.acm.org/doi/10.1145/382278.382395

    This gives immediately the following database:

    yesterday(monday , sunday ).
    yesterday(tuesday , monday ).
    yesterday(wednesday, tuesday ).
    yesterday(thursday , wednesday).
    yesterday(friday , thursday ).
    yesterday(saturday , friday ).
    yesterday(sunday , saturday ).

    lies(lion, monday ).
    lies(lion, tuesday ).
    lies(lion, wednesday).

    lies(unicorn, thursday).
    lies(unicorn, friday ).
    lies(unicorn, saturday).

    Now what?
    just about 20 inferences.
    my program takes about 400 billionths of one second.
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Mild Shock on Sat Nov 11 12:17:28 2023
    On Saturday, November 11, 2023 at 1:40:57 PM UTC-5, Mild Shock wrote:
    Could ChatGPT, the automatic programming Robot,
    help develop a solution with a SAT solver for XOR in mind?

    My idea currently, use 3 variables X,Y,Z for weekday:

    X,Y,Z weekday
    0,0,0 monday
    0,0,1 tuesday
    0,1,0 wednesday
    0,1,1 thursday
    1,0,0 friday
    1,0,1 saturday
    1,1,0 sunday

    Or maybe somebody, a human, did it already this way.
    Daniel Pehoushek schrieb am Freitag, 10. November 2023 um 12:08:55 UTC+1:
    On Thursday, November 9, 2023 at 2:19:34 PM UTC-5, Mild Shock wrote:
    Now the solution is straight forward:

    contrary(S, T) :- S, \+ T.
    contrary(S, T) :- \+ S, T.

    solve(D) :- yesterday(D, Y),
    contrary(lies(D, lion), lies(Y, lion)),
    contrary(lies(D, unicorn), lies(Y, unicorn)).

    ?- solve(D).
    D = thursday ;
    false.

    Was using a slight argument reordering of the lies facts:

    lies(monday , lion).
    lies(tuesday , lion).
    lies(wednesday, lion).

    lies(thursday, unicorn).
    lies(friday, unicorn).
    lies(saturday, unicorn).
    Mild Shock schrieb am Montag, 6. November 2023 um 16:45:15 UTC+1:
    I got the puzzle from a discussion here,
    which was about Prolog versus Theorem Proving:

    The lion and the unicorn met PROLOG
    Bruce D. Ramsey, 1986 - Free Access https://dl.acm.org/doi/10.1145/382278.382395

    This gives immediately the following database:

    yesterday(monday , sunday ).
    yesterday(tuesday , monday ).
    yesterday(wednesday, tuesday ).
    yesterday(thursday , wednesday).
    yesterday(friday , thursday ).
    yesterday(saturday , friday ).
    yesterday(sunday , saturday ).

    lies(lion, monday ).
    lies(lion, tuesday ).
    lies(lion, wednesday).

    lies(unicorn, thursday).
    lies(unicorn, friday ).
    lies(unicorn, saturday).

    Now what?
    just about 20 inferences.
    my program takes about 400 billionths of one second.
    daniel2380+++
    either the lion or the unicorn is telling the truth about yesterday
    so today is sunday or thursday based on yesterday
    based on today one of them is lying so sunday is out
    leaving thursday today
    daniel2380+++ a human with
    an optimal program for the polynomial hierarchy
    including solving all qbfs
    with one monotone formula

    monotone formulas on n variables decide 2^n qbfs of the original formula

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich D@21:1/5 to Daniel Pehoushek on Sun Nov 12 17:31:41 2023
    On November 6, Daniel Pehoushek wrote:
    my program can do two trillion inferences per day and produces log files.

    Define an inference.

    --
    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Rich D on Sun Nov 12 21:04:43 2023
    On Sunday, November 12, 2023 at 8:31:44 PM UTC-5, Rich D wrote:
    On November 6, Daniel Pehoushek wrote:
    my program can do two trillion inferences per day and produces log files.
    Define an inference.

    --
    Rich
    an inference is the tiniest possible change in the data structure embodying the theory of truth.
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Mon Nov 13 15:14:36 2023
    But I guess I always miss launching SWI-Prolog with optimise=true,
    and the version I am using has default optimise=false.
    Because I get these varying results:

    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 22,999,999 inferences, 2.016 CPU in 2.016 seconds
    (100% CPU, 11410852 Lips)

    /* SWI-Prolog 9.1.17, optimise=true */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 9,999,999 inferences, 1.203 CPU in 1.199 seconds
    (100% CPU, 8311687 Lips)

    Whereas in Dogelog Player I have now practically always
    optimise=true, which then gives me the following:

    /* Dogelog Player 1.1.4, JDK 8 */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % Zeit 1892 ms, GC 0 ms, Lips 13213582, Uhr 13.11.2023 23:54

    Mild Shock schrieb am Dienstag, 14. November 2023 um 00:14:05 UTC+1:
    Ok, I was using a SAT solver in a little unorthodox way.
    Used it as a compiler for a formula, so that I got:

    yesterday(0,0,0,1,1,0).
    yesterday(0,0,1,0,0,0).
    yesterday(0,1,0,0,0,1).
    yesterday(0,1,1,0,1,0).
    yesterday(1,0,0,0,1,1).
    yesterday(1,0,1,1,0,0).
    yesterday(1,1,0,1,0,1).

    two_liars(T1,T2,T3,Y1,Y2,Y3) :-
    T1=\=Y1,
    T1=:=(T1/\Y2) xor (T1/\Y3) xor (Y2/\Y3),
    Y1=:=(T2/\T3) xor (T2/\Y1) xor (T3/\Y1),
    T1=\=(T1/\T2) xor (T1/\T3) xor T2 xor (T2/\T3) xor T3,
    Y1=\=(Y1/\Y2) xor (Y1/\Y3) xor Y2 xor (Y2/\Y3) xor Y3.

    solve_for(T1,T2,T3) :-
    yesterday(T1,T2,T3,Y1,Y2,Y3),
    two_liars(T1,T2,T3,Y1,Y2,Y3).

    Works fine:

    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time(solve_for(T1,T2,T3)).
    % 16 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    T1 = 1,
    T2 = T3, T3 = 0 ;
    % 10 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    false.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to All on Mon Nov 13 15:14:03 2023
    Ok, I was using a SAT solver in a little unorthodox way.
    Used it as a compiler for a formula, so that I got:

    yesterday(0,0,0,1,1,0).
    yesterday(0,0,1,0,0,0).
    yesterday(0,1,0,0,0,1).
    yesterday(0,1,1,0,1,0).
    yesterday(1,0,0,0,1,1).
    yesterday(1,0,1,1,0,0).
    yesterday(1,1,0,1,0,1).

    two_liars(T1,T2,T3,Y1,Y2,Y3) :-
    T1=\=Y1,
    T1=:=(T1/\Y2) xor (T1/\Y3) xor (Y2/\Y3),
    Y1=:=(T2/\T3) xor (T2/\Y1) xor (T3/\Y1),
    T1=\=(T1/\T2) xor (T1/\T3) xor T2 xor (T2/\T3) xor T3,
    Y1=\=(Y1/\Y2) xor (Y1/\Y3) xor Y2 xor (Y2/\Y3) xor Y3.

    solve_for(T1,T2,T3) :-
    yesterday(T1,T2,T3,Y1,Y2,Y3),
    two_liars(T1,T2,T3,Y1,Y2,Y3).

    Works fine:

    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time(solve_for(T1,T2,T3)).
    % 16 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    T1 = 1,
    T2 = T3, T3 = 0 ;
    % 10 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    false.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Mild Shock on Mon Nov 13 15:58:04 2023
    On Monday, November 13, 2023 at 6:16:16 PM UTC-5, Mild Shock wrote:
    So how to use a SAT solver as a compiler. First model the problem
    with library(clpb) as Boolean formulas.

    lying_day(A, B, C, D, M) :- M = (
    ~A* ~B* ~C*D+
    ~A* ~B*C* ~D+
    ~A* ~B*C*D+
    A*B* ~C* ~D+
    A*B* ~C*D+
    A*B*C* ~D).

    two_liars(T1, T2, T3, Y1, Y2, Y3, ((M1#M2)*(M3#M4))) :-
    lying_day(0, T1, T2, T3, M1),
    lying_day(0, Y1, Y2, Y3, M2),
    lying_day(1, T1, T2, T3, M3),
    lying_day(1, Y1, Y2, Y3, M4).

    Then look at the normalform:

    ?- two_liars(T1,T2,T3,_,_,_,M), sat(M).
    sat(1#T2*T3#T2*_A#T3*_A#_A),
    sat(T1=:=T1*_B#T1*_C#_B*_C),
    sat(T1=\=_A),
    sat(T1=\=T1*T2#T1*T3#T2#T2*T3#T3),
    sat(_A=\=_A*_B#_A*_C#_B#_B*_C#_C).

    Take the normalform, reorder the equations a little bit, fewer
    variables first, and rewrite them into ISO core standard bitwise
    operations, and then take profit.
    Mild Shock schrieb am Dienstag, 14. November 2023 um 00:14:39 UTC+1:
    But I guess I always miss launching SWI-Prolog with optimise=true,
    and the version I am using has default optimise=false.
    Because I get these varying results:
    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 22,999,999 inferences, 2.016 CPU in 2.016 seconds
    (100% CPU, 11410852 Lips)

    /* SWI-Prolog 9.1.17, optimise=true */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 9,999,999 inferences, 1.203 CPU in 1.199 seconds
    (100% CPU, 8311687 Lips)

    Whereas in Dogelog Player I have now practically always
    optimise=true, which then gives me the following:

    /* Dogelog Player 1.1.4, JDK 8 */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % Zeit 1892 ms, GC 0 ms, Lips 13213582, Uhr 13.11.2023 23:54
    Mild Shock schrieb am Dienstag, 14. November 2023 um 00:14:05 UTC+1:
    Ok, I was using a SAT solver in a little unorthodox way.
    Used it as a compiler for a formula, so that I got:

    yesterday(0,0,0,1,1,0).
    yesterday(0,0,1,0,0,0).
    yesterday(0,1,0,0,0,1).
    yesterday(0,1,1,0,1,0).
    yesterday(1,0,0,0,1,1).
    yesterday(1,0,1,1,0,0).
    yesterday(1,1,0,1,0,1).

    two_liars(T1,T2,T3,Y1,Y2,Y3) :-
    T1=\=Y1,
    T1=:=(T1/\Y2) xor (T1/\Y3) xor (Y2/\Y3),
    Y1=:=(T2/\T3) xor (T2/\Y1) xor (T3/\Y1),
    T1=\=(T1/\T2) xor (T1/\T3) xor T2 xor (T2/\T3) xor T3,
    Y1=\=(Y1/\Y2) xor (Y1/\Y3) xor Y2 xor (Y2/\Y3) xor Y3.

    solve_for(T1,T2,T3) :-
    yesterday(T1,T2,T3,Y1,Y2,Y3),
    two_liars(T1,T2,T3,Y1,Y2,Y3).

    Works fine:

    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time(solve_for(T1,T2,T3)).
    % 16 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    T1 = 1,
    T2 = T3, T3 = 0 ;
    % 10 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips) false.
    22,999,999 inferences, 2.016 CPU in 2.016 seconds
    would take bob 500 million cycles or on tent of a second
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Mon Nov 13 15:16:13 2023
    So how to use a SAT solver as a compiler. First model the problem
    with library(clpb) as Boolean formulas.

    lying_day(A, B, C, D, M) :- M = (
    ~A* ~B* ~C*D+
    ~A* ~B*C* ~D+
    ~A* ~B*C*D+
    A*B* ~C* ~D+
    A*B* ~C*D+
    A*B*C* ~D).

    two_liars(T1, T2, T3, Y1, Y2, Y3, ((M1#M2)*(M3#M4))) :-
    lying_day(0, T1, T2, T3, M1),
    lying_day(0, Y1, Y2, Y3, M2),
    lying_day(1, T1, T2, T3, M3),
    lying_day(1, Y1, Y2, Y3, M4).

    Then look at the normalform:

    ?- two_liars(T1,T2,T3,_,_,_,M), sat(M).
    sat(1#T2*T3#T2*_A#T3*_A#_A),
    sat(T1=:=T1*_B#T1*_C#_B*_C),
    sat(T1=\=_A),
    sat(T1=\=T1*T2#T1*T3#T2#T2*T3#T3),
    sat(_A=\=_A*_B#_A*_C#_B#_B*_C#_C).

    Take the normalform, reorder the equations a little bit, fewer
    variables first, and rewrite them into ISO core standard bitwise
    operations, and then take profit.

    Mild Shock schrieb am Dienstag, 14. November 2023 um 00:14:39 UTC+1:
    But I guess I always miss launching SWI-Prolog with optimise=true,
    and the version I am using has default optimise=false.
    Because I get these varying results:
    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 22,999,999 inferences, 2.016 CPU in 2.016 seconds
    (100% CPU, 11410852 Lips)

    /* SWI-Prolog 9.1.17, optimise=true */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % 9,999,999 inferences, 1.203 CPU in 1.199 seconds
    (100% CPU, 8311687 Lips)

    Whereas in Dogelog Player I have now practically always
    optimise=true, which then gives me the following:

    /* Dogelog Player 1.1.4, JDK 8 */
    ?- time((between(1, 1000000, _), solve_for(T1,T2,T3), fail; true)).
    % Zeit 1892 ms, GC 0 ms, Lips 13213582, Uhr 13.11.2023 23:54
    Mild Shock schrieb am Dienstag, 14. November 2023 um 00:14:05 UTC+1:
    Ok, I was using a SAT solver in a little unorthodox way.
    Used it as a compiler for a formula, so that I got:

    yesterday(0,0,0,1,1,0).
    yesterday(0,0,1,0,0,0).
    yesterday(0,1,0,0,0,1).
    yesterday(0,1,1,0,1,0).
    yesterday(1,0,0,0,1,1).
    yesterday(1,0,1,1,0,0).
    yesterday(1,1,0,1,0,1).

    two_liars(T1,T2,T3,Y1,Y2,Y3) :-
    T1=\=Y1,
    T1=:=(T1/\Y2) xor (T1/\Y3) xor (Y2/\Y3),
    Y1=:=(T2/\T3) xor (T2/\Y1) xor (T3/\Y1),
    T1=\=(T1/\T2) xor (T1/\T3) xor T2 xor (T2/\T3) xor T3,
    Y1=\=(Y1/\Y2) xor (Y1/\Y3) xor Y2 xor (Y2/\Y3) xor Y3.

    solve_for(T1,T2,T3) :-
    yesterday(T1,T2,T3,Y1,Y2,Y3),
    two_liars(T1,T2,T3,Y1,Y2,Y3).

    Works fine:

    /* SWI-Prolog 9.1.17, optimise=false */
    ?- time(solve_for(T1,T2,T3)).
    % 16 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    T1 = 1,
    T2 = T3, T3 = 0 ;
    % 10 inferences, 0.000 CPU in 0.000 seconds (0% CPU, Infinite Lips)
    false.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Daniel Pehoushek on Tue Nov 14 01:35:04 2023
    Still you cant solve the Lion/Unicorn riddle
    with your SAT solver? Whats wrong with you?

    Please rate what you programmed on this shit scala:

    💩💩💩💩💩💩💩💩💩💩💩💩💩💩

    BTW: I don't see your posts on new.solani.org.
    What did you do? Post too much shit?

    Daniel Pehoushek schrieb am Dienstag,
    14. November 2023 um 00:58:07 UTC+1:
    would take bob 500 million cycles or on tent of a second
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Wed Nov 15 10:12:46 2023
    For those that thought the Lion and Unicorn riddle has something to do
    with natural language understanding and ChatGPT, I have a new problem.

    SAT+CAS for Problems in Quantum Foundations
    A SAT Solver + Computer Algebra Attack on
    the Minimum Kochen–Specker Problem
    Brian Li, Curtis Bright, Vijay Ganesh - Oct 1, 2023 https://nikolajbjorner.github.io/ShonanArtOfSAT/program.html

    Who can show the Kochen-Specker Paradox via SWI-Prolog?

    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich D@21:1/5 to Daniel Pehoushek on Wed Nov 15 17:21:42 2023
    On November 12, Daniel Pehoushek wrote:
    my program can do two trillion inferences per day and produces log files.

    Define an inference.

    an inference is the tiniest possible change in the data structure embodying the theory of truth.

    I use the Tarski programming language. The compiler rejects
    "theory of truth" as undefined, like dividing by zero.

    Can you be more specific?

    --
    Rich

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Daniel Pehoushek@21:1/5 to Rich D on Fri Nov 17 03:46:03 2023
    On Wednesday, November 15, 2023 at 8:21:45 PM UTC-5, Rich D wrote:
    On November 12, Daniel Pehoushek wrote:
    my program can do two trillion inferences per day and produces log files.

    Define an inference.

    an inference is the tiniest possible change in the data structure embodying
    the theory of truth.
    I use the Tarski programming language. The compiler rejects
    "theory of truth" as undefined, like dividing by zero.

    Can you be more specific?

    --
    Rich
    any propositional formula embodies a minor theory of truth such as in graph coloring of the ninth degree.
    c4d9n150 and c3d5n250 are classes of graph coloring graphs with two variable vertices, 300 and 500.
    in the search for colorful models one inference is one color ruled out on one vertex.
    then there is propagation.
    my program searches through propositions for models of a coloring formula.
    the current state of search is encoded by shallow truth trees.
    one inference is a single change to any truth tree.

    class allqbfs is fifty lines that transforms all satisfiable models into all satisfiable qbfs.
    that is the main result of thirty years of work on satisfiability.
    monotone reason is linear.
    avoid negation and prosper in truth
    daniel2380+++

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Sat Nov 18 19:07:25 2023
    Comedy on the horizon and lots of tech penny stocks to buy!
    Before you criticize the board at OpenAI, walk a mile in their shoes:

    VCs Congratulating Themselves 👏👏👏 https://twitter.com/VCBrags/status/1725976543585784022

    LoL

    Mild Shock schrieb am Sonntag, 19. November 2023 um 03:57:20 UTC+1:
    Ha Ha, board fired Sam Altman of OpenAI.
    What now? What will become of ChatGPT?
    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Sat Nov 18 18:57:18 2023
    Ha Ha, board fired Sam Altman of OpenAI.
    What now? What will become of ChatGPT?

    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Sun Nov 19 17:25:20 2023
    Fuck around find out. Guess who is a board reporting
    to? Well the stock holders, and they are reinstantiating
    the board every year. So if stock holders want Sam

    Altman, stock holders will have Sam Altman, they simply
    send the board into /dev/null and create a new one.
    BTW: Interesting information about the board,

    didn't think they have relation to Sam Bankman-Fired,
    and hence its rewarding to listen to TiffanyFong:

    s Sam Altman BACK as CEO of OpenAI?
    Board Resigning & “Effective Altruism” Ties [UPDATE] https://www.youtube.com/watch?v=LXDWy5-bc-c

    Yeah, get your finger off EA, see FTX fiasko.

    Mild Shock schrieb am Sonntag, 19. November 2023 um 04:07:28 UTC+1:
    Comedy on the horizon and lots of tech penny stocks to buy!
    Before you criticize the board at OpenAI, walk a mile in their shoes:

    VCs Congratulating Themselves 👏👏👏 https://twitter.com/VCBrags/status/1725976543585784022

    LoL
    Mild Shock schrieb am Sonntag, 19. November 2023 um 03:57:20 UTC+1:
    Ha Ha, board fired Sam Altman of OpenAI.
    What now? What will become of ChatGPT?
    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to
    deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Mon Nov 20 03:51:34 2023
    Some actors are messing real hard with OpenAI.
    My prediction, the only goal is to dissolve OpenAI.
    Take the nomination of Emmett Shear. It shows

    how unprepared and desperate the board is.
    Mostlikely he will not accept the nomination, since
    we wont hear anything of OpenAI anymore in the

    future. Well he might lead its liquidation. But It
    was just a start-up, a short episode, not the
    beginning of a new behemoth.

    Mild Shock schrieb am Montag, 20. November 2023 um 02:25:23 UTC+1:
    Fuck around find out. Guess who is a board reporting
    to? Well the stock holders, and they are reinstantiating
    the board every year. So if stock holders want Sam

    Altman, stock holders will have Sam Altman, they simply
    send the board into /dev/null and create a new one.
    BTW: Interesting information about the board,

    didn't think they have relation to Sam Bankman-Fired,
    and hence its rewarding to listen to TiffanyFong:

    s Sam Altman BACK as CEO of OpenAI?
    Board Resigning & “Effective Altruism” Ties [UPDATE] https://www.youtube.com/watch?v=LXDWy5-bc-c

    Yeah, get your finger off EA, see FTX fiasko.
    Mild Shock schrieb am Sonntag, 19. November 2023 um 04:07:28 UTC+1:
    Comedy on the horizon and lots of tech penny stocks to buy!
    Before you criticize the board at OpenAI, walk a mile in their shoes:

    VCs Congratulating Themselves 👏👏👏 https://twitter.com/VCBrags/status/1725976543585784022

    LoL
    Mild Shock schrieb am Sonntag, 19. November 2023 um 03:57:20 UTC+1:
    Ha Ha, board fired Sam Altman of OpenAI.
    What now? What will become of ChatGPT?
    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree.
    They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mild Shock@21:1/5 to Mild Shock on Mon Nov 20 04:24:24 2023
    So what needs to be done? Foremost move Chat AI
    out of the computing cloud claws. Make it runnable
    on the Edge, make it runnable by simply copying a

    LLM on a 1 TB NVMe. Make it runnable by simply
    starting your 1'000 core Handy or Laptop. No API
    subscription nonsense. So we are just at beginning,

    we are still at square zero !!!

    This Breakthrough AI Chip is BIG Trouble for Apple & Intel Stocks https://www.youtube.com/watch?v=nJQulJ_gBjo

    Mild Shock schrieb am Montag, 20. November 2023 um 12:51:36 UTC+1:
    Some actors are messing real hard with OpenAI.
    My prediction, the only goal is to dissolve OpenAI.
    Take the nomination of Emmett Shear. It shows

    how unprepared and desperate the board is.
    Mostlikely he will not accept the nomination, since
    we wont hear anything of OpenAI anymore in the

    future. Well he might lead its liquidation. But It
    was just a start-up, a short episode, not the
    beginning of a new behemoth.
    Mild Shock schrieb am Montag, 20. November 2023 um 02:25:23 UTC+1:
    Fuck around find out. Guess who is a board reporting
    to? Well the stock holders, and they are reinstantiating
    the board every year. So if stock holders want Sam

    Altman, stock holders will have Sam Altman, they simply
    send the board into /dev/null and create a new one.
    BTW: Interesting information about the board,

    didn't think they have relation to Sam Bankman-Fired,
    and hence its rewarding to listen to TiffanyFong:

    s Sam Altman BACK as CEO of OpenAI?
    Board Resigning & “Effective Altruism” Ties [UPDATE] https://www.youtube.com/watch?v=LXDWy5-bc-c

    Yeah, get your finger off EA, see FTX fiasko.
    Mild Shock schrieb am Sonntag, 19. November 2023 um 04:07:28 UTC+1:
    Comedy on the horizon and lots of tech penny stocks to buy!
    Before you criticize the board at OpenAI, walk a mile in their shoes:

    VCs Congratulating Themselves 👏👏👏 https://twitter.com/VCBrags/status/1725976543585784022

    LoL
    Mild Shock schrieb am Sonntag, 19. November 2023 um 03:57:20 UTC+1:
    Ha Ha, board fired Sam Altman of OpenAI.
    What now? What will become of ChatGPT?
    Mild Shock schrieb am Montag, 6. November 2023 um 01:43:32 UTC+1:
    Please solve this with logic:

    When Alice entered the forest of forgetfulness, she did not
    forget everything, only certain things. She often forgot her
    name, and the most likely thing for her to forget was the day
    of the week. Now, the lion and the unicorn were frequent
    visitors to this forest. These two are strange creatures. The
    lion lies on Mondays, Tuesdays, and Wednesdays and tells
    the truth on the other days of the week. The unicorn, on the
    other hand, lies on Thursdays, Fridays, and Saturdays, but tells
    the truth on the other days of the week.

    One day Alice met the lion and the unicorn resting under a tree. They made the following statements:

    Lion: Yesterday was one of my lying days.
    Unicorn: Yesterday was one of my lying days.

    From these statements, Alice, who was a bright girl, was able to deduce the day of the week. What was it?

    P.S.: Please no DC Proof solutions where animals outside
    of the forest appear because of Russell Paradox.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)