Questions tagged as 'prolog'

1
answer

Return number and successive with backtracing - PROLOG

The predicate that I want to implement, I need you to do the following: predicado(Máximo,Num1,Num2). And you must return two numbers Num1 and Num2 fulfilling that: Num1 < Num2 Num2
asked by 08.12.2016 / 18:49
1
answer

Decode in Prolog using Peano

I'm doing an Prolog exercise that tries to decode a list. decodifica([],[]). decodifica([rlec(X,1)|L1],[X|L2]). decodifica(L1,L2). decodifica([rlec(X,N)|L1],[Xs|L1]):- N1 is N-1, decodifica([rlec(X,N1)|L1],L2). decodifica([E|L1],[E|L2]):-...
asked by 22.11.2016 / 22:31
0
answers

connect swi-prolog with nodejs through websockets

I am trying to connect swi-prolog with nodejs but, without success. I have looked in the official documentation of swi-prolog but, I see it very confusing. I have a server in nodejs running on port 8080. What I wan...
asked by 24.05.2016 / 04:05
1
answer

How can I find the length of the insect list with these facts?

animal('conejo'). animal('venado'). animal('león'). animal('zorro'). animal('gato'). animal('camaleón'). animal('halcón). animal('mosca'). animal('perro'). animal('cocodrilo'). animal('mosquito'). animal('serpiente'). animal('cotorra'). animal('g...
asked by 27.08.2018 / 16:37
1
answer

how to ask questions in prolog? [closed]

I would like you to help me formulate a question in prolog and how to relate the questions. For example: clara is Pedro's mother pedro is father of jose ana is the mother of clara jose is the father of clara is jose's grandmother...
asked by 14.07.2016 / 01:56