https://futureofcoding.org/ logo
#of-logic-programming
Title
# of-logic-programming
g

guitarvydas

04/11/2023, 9:22 AM
I am trying to suss out what the significance-of/meaning is of “drop_amount...bwd” in the Dungeon Crawler source code (Ceptre). Line 50 https://github.com/guitarvydas/ceptre/blob/dev/dc/dc.cep. Comments? background: I’m building a Ceptre compiler - to Lisp (then “the world”). I think that I can handle most rules by treating them as 3 parts: (1) a pattern to be matched (using PROLOG backtracking), (2) retractions (3) assertions (PROLOG meaning, imperitivized). As it stands, the “compiler” transpiles Ceptre to RT (an intermediate language I created) then RT to Lisp. The significance of forward chaining vs backward chaining is blurring in my mind, esp. the significance of
drop_amount
. Then, I will need to figure out what
z
and
none
are ... Aside: I’m using Nils Holm’s “Prolog ... in 6 Slides” (Scheme code ported to CL (and JS)).
n

Nick Smith

04/11/2023, 11:28 PM
What are you unsure about? The meaning of the “bwd” acronym? (I don’t know Ceptre, so I can’t help with that.)
g

guitarvydas

04/12/2023, 3:38 AM
“Bwd” means “backward chaining”. Ceptre is mostly based on forward chaining but allows backward chaining when necessary. Apparently
drop_amount
needs to be declared as a backward chaining predicate. I don’t know why
drop_amount
is different. I can tell that I don’t understand something here, and, I can’t evern formulate a coherent question.
n

Nick Smith

04/13/2023, 8:18 AM
To the best of my knowledge,
drop_amount
tuples can't be generated using forward chaining, because there are infinitely-many of them, right? So backward chaining is the only evaluation scheme that makes sense.
g

guitarvydas

04/13/2023, 10:34 AM
Thanks. Part of the problem is that I’m looking at a version of the source that has been modified for the paper. Going back to the source code for the thesis shows Church numerology being used. https://github.com/chrisamaphone/interactive-lp/blob/master/examples/rpg.cep. In the paper, numbers are used, but, in the thesis the numbers are written in bw chained Church notation.
11 Views