Well, thank you very much for your answers, they’re very helpful indeed! How does a StateLink work? In other words, how do you update a NumberNode? Once I understand this logic, I should be well on my way to get my basic program done so I can demonstrate it. All the other things I’m trying to do have illustrative examples in the PLN part of the GitHub page.
On 12/13/18 10:18 AM, Johannes Castner wrote:
> cognition. What we are trying to do is to elicit logical beliefs from tr
There are different ways to do that, and they depend on what you
intend to do with the knowledge. One way would be to use value
https://wiki.opencog.org/w/Value
for instance to attach a score of 3 to John, you'd say
```
(define john (Concept "John"))
(define score (Concept "score"))
(cog-set-value! john score (Number 3))
```
then you may ask John's score with
```
(cog-value john score)
```
which will return 3.
Later on you may update John's score with
```
(cog-set-value! john score (Number 4))
```
And
```
(cog-value john score)
```
which will return 4.
The problem with that (and with mutability in general) is that you
lose information. So for instance you won't be able to use reasoning
or specialized forms thereof like pattern mining to analyze the
evolution of your data. For that you need to keep track of these
updates. One way could be to use AtTimeLink, so for instance you way
write that at 10pm John had a score of 3
AtTimeLink
Evaluation
Predicate "score-of"
List
(Concept "John")
(Number 3)
TimeNode "10pm"
but at 11pm he had a score of 4
AtTimeLink
Evaluation
Predicate "score-of"
List
(Concept "John")
(Number 4)
TimeNode "10pm"
Etc... There are many ways to represent knowledge.
Johannes
Hi Johannes,
On 12/10/18 6:48 PM, Johannes Castner wrote:
> ; all users have an account
> (EvaluationLink
> account
> (ListLink
> User
> )
> )
note that you don't need to wrap the argument with a ListLink if
there's only one, you might write
(EvaluationLink
account
User)
> How do I say that an account has points in it, that can be updated and
Depends on what you mean "has points in it". `account` is a predicate
so it indeed can have stuff in it by using `EvaluationLink` as you did
with `User`, which says `User` is in `account`. If `account` where a
concept, then you could equivalently (or isomorphically equivalently)
write
(MemberLink
User
account)
> that a user has that account etc? I'm sorry, I'm still rather new to
> Atomese and I've been trying to figure this out but I'm seriously stuck.
> Please help!
It's not clear to me what you want to express. If you write it in FOL
we'll definitely be able to translate it to Atomese.
Nil
--
You received this message because you are subscribed to the Google Groups "opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opencog+u...@googlegroups.com.
To post to this group, send email to ope...@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/ff448f8a-ae6e-428f-ba45-abe9a5685bac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.