ANN: Jekejeke Minlog 0.6.2 (forward debugging and hypothetical reasoning)

Dear All,

Just wanted to let you know that Jekejeke Minlog 0.6.2 is
out. There was some functionality in the Jekejeke Minlog
extension module that lay dormant until now. With this release
of Jekejeke Minlog we provide a first batch of built-ins for
hypothetical and counterfactual reasoning. Internally these
built-ins work with clause references and trailed undos.

To introduce hypothetical and counterfactual reasoning to
logic programming is not new, we draw here on work from
the 80's.

Jekejeke Minlog also provides variants that work without a
sub-goal and keep the update for the duration of the continuation.
The continuation variants of hypothetical and counter factual
reasoning form the update component of the continuation version of
forward chaining, which is used to implement constraint solvers.
Since new constraints, similar to unification results,
stay for the duration of the continuation.

Now that we have hypothetical and counter factual reasoning: Is
it useful and does it perform? To some extend we have already
answered this question by the implementation of our CLP(FD)
constraint solver. But the constraint solver makes also use
of the forward closure computation, so are there some interesting
applications not integrated with the forward closure?

Interestingly the answer seems yes. We managed to implement
tic-tac-toe via the continuation variant of the new Jekejeke
Minlog tool box.

In the old solution the board state is passed around in predicate
arguments. In the new solution we perform updates on the facts
via hypothetical/counter factual operations. Since the board state
is not anymore passed around we do not need a move/3 predicate.
Instead we can work with a move/1 predicate that has only one
parameter and that updates the knowledge base:

% move(+Player)
move(P) :-
   clause_ref(board(-,M,N), true, R),
   compile_ref(board(P,M,N), S),

Astonishingly the new solution is also performant. Our measurements
show the following figures for checking whether there exists
a winning strategy:

Old Parameter Solution: 124ms
New Update Solution: 224ms

Theoretically a certain advantage could be gained for bigger boards
via the update method, since it works only locally. Further forward
closure could come to the picture again to model complex moves.

Comments welcome.


Jekejeke Minlog 0.6.2

Tic-Tac-Toe with Parameter

Tic-Tac-Toe with Update

Crockford: Monads and Gonads

As seen in this YouTube video:

The wonders of monads are finally revealed without resorting to Category Theory or Haskell. It turns out that monads are trivially expressed in JavaScript, and are one of the key enablers of Ajax. Monads are amazing. They are simple things, almost trivially implemented, with enormous power to manage complexity. But understanding them is surprisingly difficult, and most people, once they have that ah-ha moment, seem to lose the ability to explain them to others.

Still, I will continue to enjoy and consume burritos.