A gama pong is created and connected to the event buffer.#102
A gama pong is created and connected to the event buffer.#102MoonWalker1997 wants to merge 1 commit intoopennars:devfrom
Conversation
|
This pr is related to issue #12. |
ccrock4t
left a comment
There was a problem hiding this comment.
Looks good! There are only a few edits needed:
| return task.is_event \ | ||
| and task.term.type == TermType.STATEMENT \ | ||
| return (task.is_event or task.is_operation) \ | ||
| and (task.term.type == TermType.STATEMENT or task.term.type == TermType.ATOM) \ |
There was a problem hiding this comment.
I agree it is correct to let Operations in the Buffer. But, not the Atomic terms, since Atomic terms cannot be events.
There was a problem hiding this comment.
But if there is an operation, say "^left", how to build relations between it and other events. I think in the design, this is achieved in the internal buffer, though currently we don't have it. Probably we can allow a special data structure containing only operations, running parallel with the event buffer, to create schemas like "event, operation / event".
There was a problem hiding this comment.
The term left is Atomic, though it is actually the name of the "Operator", not the Operation itself.
(The NAL book refers to this term as the "Operator" (p.146))
The Operation itself, ^left, is shorthand for a first-order Event that uses Product and SELF term together with the "Operator" relating them, for example:
^left
How it works is, when NARS executes Operation "^left", it returns a "motor copy", allowing NARS to directly observe the Event,
If this Event comes through the Narsese channel, in our current design, it should automatically flow into the EventBuffer and form the temporal inductions.
Thus we will get statements like (A &/ ^left
There was a problem hiding this comment.
Just a side note. I always found it a little weird that (*,self) is a valid syntax on OpenNARS. Products should have two or more components and in this case it always felt like a hack to me.
There was a problem hiding this comment.
You will have to take that one up with Professor. I do not have a strong opinion on the theory, but in the code I think we should stick to how the book defines it, unless we can find a better alternative
|
|
||
| task_from_EB = event_buffer.generate_temporal_sentences() | ||
| if len(task_from_EB) != 0: | ||
| nars.input_narsese(str(task_from_EB[0])) |
There was a problem hiding this comment.
No need to use EventBuffer in this file, there is already one in the Reasoner, which is executed at every working cycle.
All that is necessary for the Pong game is to input the Sensory Events into the Narsese Channel. The NARS should automatically process them with EventBuffer and put the results into the Overall Experience Buffer.
There was a problem hiding this comment.
Okay, that sounds nice. To confirm, we just need to put all sensory events to the Narsese channel. Do you know the API of inputting in the Narsese channel?
There was a problem hiding this comment.
The nars.input_narsese(string "") should work
No description provided.