Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Demos on Pong Game #12

Open
bowen-xu opened this issue Sep 6, 2023 · 12 comments · May be fixed by #102
Open

[Feature] Demos on Pong Game #12

bowen-xu opened this issue Sep 6, 2023 · 12 comments · May be fixed by #102
Assignees
Labels
enhancement New feature or request

Comments

@bowen-xu
Copy link
Collaborator

bowen-xu commented Sep 6, 2023

Is your feature request related to a problem? Please describe.

In OpenNARS 3.0.4 and ONA, there are some simple demos. A common one is Pong Game. This is a proper demo which should be implemented in PyNARS as well.

Describe the solution you'd like

A video can be found here https://www.youtube.com/watch?v=3byoTPxVZJA .
A detialed description can be found here https://github.com/opennars/opennars/wiki/Pong-Game.

@bowen-xu bowen-xu added the enhancement New feature or request label Sep 6, 2023
@bowen-xu bowen-xu self-assigned this Sep 6, 2023
@ccrock4t ccrock4t self-assigned this Sep 22, 2023
@ccrock4t
Copy link
Collaborator

ccrock4t commented Sep 27, 2023

This one should be a simple plug-and-play using a PyNARS .exe. Should I try v0.2 or the dev branch?

The demo can be simple:

  • play Pong given background knowledge (requires goal derivation and handling)

or it can be complicated

  • learn Pong without any background knowledge (requires goal handling, plus temporal sequence learning (eg. <A &/ ^B => C>) (ONA and OpenNARS can do this one already)

What is the current state of the implementation. Are we ready for the latter, or do we still need more coding? Can we at least pull off the former?

@bowen-xu
Copy link
Collaborator Author

I prefer dev. Since some bugs have been fixed in dev.

Maybe start from the simple one? The temporal induction procedure has not been proved correct in the current implementation of PyNARS. I'm not sure if there's any other bug for the control part. If it works well in the simple case, then can focus on the temporal induction.

@ARCJ137442
Copy link
Contributor

Maybe start from the simple one? The temporal induction procedure has not been proved correct in the current implementation of PyNARS. I'm not sure if there's any other bug for the control part. If it works well in the simple case, then can focus on the temporal induction.

Or we can create a new repository (It can be called like "PyNARS-Demo") to make progresses parallel?

@ccrock4t
Copy link
Collaborator

Added .exe and an option to select PyNARS in ccrock4t/NARS-Pong@9113543

Will run some experiments

@ccrock4t
Copy link
Collaborator

ccrock4t commented Oct 29, 2023

Here is the output log, resulting from running the current dev branch on Pong:
PyNARS_Log.txt

Currently, the system does not execute any Operations.
It does accept input goals and events. It also accepts background knowledge (implication statements).

There may be a bug. For some reason the system is outputting the Judgment as True

The Event truth values are not decaying

Input:  0.90  0.90  0.95  IN    : <{SELF}-->[good]>! :|: %1.000;0.900%
...
Input:  0.80  0.50  0.95  IN    : <{SELF}-->[good]>. :|: %1.000;0.900%
....
Input:  0.90  0.90  0.95  IN    : <{SELF}-->[good]>! :|: %1.000;0.900%
....
 1.00  0.50  0.95  OUT   : <{SELF}-->[good]>. :\: %1.000;0.900%
 0.13  0.88  0.95  OUT   : <{SELF}-->[good]>! :\: %1.000;0.900%

Any insights based on these results?

@ccrock4t
Copy link
Collaborator

Is the long syntax of Operations (e.g., <(*, {SELF})-->deactivate>) supported? Regardless, I also tried the short version (e.g., ^deactivate) but no change in the results.

@ccrock4t
Copy link
Collaborator

ccrock4t commented Oct 29, 2023

After reviewing the output log more closely, it seems like the Truth-Values of Events do not decay in the system.

@ARCJ137442
Copy link
Contributor

ARCJ137442 commented Oct 30, 2023

Is the long syntax of Operations (e.g., <(*, {SELF})-->deactivate>) supported? Regardless, I also tried the short version (e.g., ^deactivate) but no change in the results.

At present, in PyNARS, operator need to be registered to EXE operations. I recently added a cmd called register in ConsolePlus, and you can register it through /reg deactivate eval.
(You can refer to PR #37)

@ARCJ137442
Copy link
Contributor

After reviewing the output log more closely, it seems like the Truth-Values of Events do not decay in the system.

According to the code, it is obvious that PyNARS has not fully implemented NAL-7 at present.
I think a complete implementation of NAL-7 (such as {A. :|:, B. :|:} |- <A ==> B>.) is necessary in order to realize temporal reasoning in demo.

@bowen-xu
Copy link
Collaborator Author

@ccrock4t OK. I will try to find out the bug this week.

@bowen-xu
Copy link
Collaborator Author

@ARCJ137442 Yes, you're right.

@bowen-xu
Copy link
Collaborator Author

Currently, pynars cannot deal with temporal induction very well. Although the inference rules have been implemented, the control mechanism on temporal induction has not been realized yet. The code on temporal induction (dealing with anticipation) in OpenNARS 3.0.4 is mainly in file ProcessAnticipation.java. Something similar should be done in pynars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants