ML-KULeuven/deepproblog

Query regarding the Multi-Digit Addition

Closed this issue · 1 comments

Hi

I am reading about the DeepProbLog programs. In the paper, an experiment regarding multi-digit MNIST addition is mentioned as shown below:
multi_digit_addition
But I am getting slightly confused with the syntax here like what H and T mean here. Here, I am assuming that Acc and Acc2 are accumulator variables that store the intermediate results.
Let's say I supply the following input to this program as shown:
input
Do H and T mean the first and last elements of the list respectively?
If I have to represent a list with K elements, then how to represent all the elements except the first and the last?
What is the stopping condition in this recursive program? Is it [H|T] that says that only two elements can be present in the list?
Do you have any kind of tutorial apart from the examples provided in the research paper?

Hi.

This is standard Prolog notation, so for help on this I recommend a Prolog tutorial covering lists. I believe your questions will be covered by this: https://www.tutorialspoint.com/prolog/prolog_lists.htm
The Acc and Acc2 variables are indeed accumulators for the intermediate results.

Hope this helps,
Robin