Prolog: Asserting key value pairs in list that can be retrieved with a condition

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


Prolog: Asserting key value pairs in list that can be retrieved with a condition



I am trying to write a program that can pass a world-state (through a tuprolog java interface) into a tuprolog knowledge base in order to retrieve relevant output.



I have done this successfully by inserting the theory:


worldState(fakeVar(this), anotherFakeVar(that)).



And later checking for things like:


stateAchieved :- worldState(fakeVar(this),_), write("state achieved!").



But this becomes cumbersome as more variables are added.



Is there any way to pass a list of atoms into prolog to be retrieved later?



I tried using the dicts library but it doesn't appear that tuprolog supports it.



Thanks.









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Arduino Mega cannot recieve any sketches, stk500_recv() programmer is not responding

Visual Studio Code: How to configure includePath for better IntelliSense results

C++ virtual function: Base class function is called instead of derived