Questions tagged as 'prolog'

0
answers

How to make rules work within the recommendation?

People, how do I display the recommended application. Example: 'You should apply in saving'. The swi-prolog returns singleton variables and arguments are not sufficiently instantiated. I'm having a great difficulty in this exercise. % metapred...
asked by 30.06.2018 / 01:27
0
answers

How to separate the name in a variable in prolog?

I need to separate an entry into a variable in prolog, but I'm having trouble with that part: nome(nome(X)) --> [X] :- X=[_]. conjuncao(conjuncao(e)) --> [e]. verb(verb(sou)) --> [sou]. verb(verb(come)) --> [come]. verb(verb(eh))...
asked by 09.06.2018 / 17:47
1
answer

Program always returning "false"

I'm tweaking my Prolog skills, and I'm solving a RachaCuca problem. This is the first one I try to do, and for some reason it returns everything as false (which it should not). So I would like to know if there is any structural problem in m...
asked by 21.06.2018 / 15:10
1
answer

How to make a variable appear in the write function in prolog

I'm doing a program that features several dogs, and I want to do it in a way that is faster to write down the characteristics of the dogs. For example, the following code raca(pitbull). raca(shiba). raca(boxer). raca(poodle). raca(bullte_terri...
asked by 23.04.2018 / 00:18
1
answer

Solve a family tree with PROLOG

I have a hard time creating some relationships. Here is the table: homem(jose). homem(ananias). homem(helio). homem(jurandir). homem(valdir). homem(delio). homem(fabiano). homem(willian). homem(diego). homem(mateus). homem(henrique). mulher(ge...
asked by 10.04.2018 / 22:50