Skip to content

Question about the "index" parameter of the add() method on BeliefBase implementations? #120

Answered by jomifred
mindcrime asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

first, Jason default implementation of BB only support add in the beginning or in the ending of the BB (other implementation may implement other uses of the index).

The order is quite important for the queries. For instance, suppose a BB with

b(10).
b(20).

a query .findall(X,b(X),L) should return L=[10,20], with this order of values.

Moreover, if the agent runs +b(30) followed by (maybe in another intention) ?b(X), I'd expect that X=30, the most recent value. Well, at least, we thought that is more "natural" :-) The + operator adds the belief in the beginning of the BB. Anyway, the operator +> can be used to some belief in the end of the BB (see operators).

I don't know if that reaso…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by mindcrime
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mindcrime
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants