Wednesday, July 30, 2008

OpenNARS - End of July Status

I've spent the last 2 weeks giving more love to the wiki and polishing what was ported since the start of the project. It was done in conjunction with design and comprehension decisions.

Until now, the main entities are ported as the primitives inference functions that acts on 2 special NARS arithmetic entities (TruthValue and BudgetValue).

What's missing are the inference rules as the glue with the existing entities in particular Memory who is the central class that implements the reasoning process. It has also on its state all the storage entities (NARS Bag) and organize their contents interaction. NARS bags are not only usual collection. They have in this design the responsabilies of pickOut and putIn (driven by a probabilistic selection using BudgetValue).

So here is a summary ot what was done recently:

Wiki

reorganization around the following sections :

Code Section For all code aspect of the port
  • Code Browser
    • ajax based - scriptaculous version extended
      • read-only
    • Squeak and Java Doc
      • gives package and class comment
      • shortcut to the last java version, and to the squeak one
    • Java structure and design discussion
NARS Section

Blog

A blog to ask questions, relates actuality of the port...

Timeline

Section in relation to the timeline and objectives of the GSoC Prject

Functional test applications

I haven't made a lot of unit tests yet mainly because my understanding of the system was not really clear (until now?). Instead I did two functional test applications (seaside). They allow testing most of the inference primitives methods on TruthValue and BudgetValue. I plan to continue this kind of functional test with the inference rules and if possible providing a seaside application that will do an inference cycle step by step (kind of WATask).

What's next ?

I also had a reflection on how to implement the rule dispatcher and the rule body. Given our objective (mainly syllogistic rules as we deal only with atomic terms), there are not too many classes and methods but they are quite long. The discussion we had with Klaus was whether to dispatch or not :).

The conclusion is to stick to the actual implementation for several reasons:

  • Pei wants the code in one place as the NARS is not stabilized yet (AGI research project)
  • Refactoring is quite uncertain now.
  • Writing rules with Smalltalk ifTrue:'s isSometing's and:[]'s, the code will be quite shorter and so a bit more readable. For instane, see there (the java version is commented below).
  • we keep our ideas for later. Dispatching would surely making look a bit nicer but it could be worthless if there is a major move (like using prolog - having rule in a declarative language).

So next steps are, finishing and fixing language statement class and subclasses. Then I'll have to port 3 inference classes. I think 3 weeks is reasonable to have the system starting to work as a whole (still far form doing all kind of inference and logic expression). At this time, we'll have to test, optimize the reasoning process and in the same time I'll do seaside interfaces. I also would like to do a screencast with the Java version to show how NARS behave and can be used. I plan to do this tutorial.

That's it for now.

Happy squeaking ;-)

1 comment:

Zandao said...

How do you plan to have an integrated rule evaluation engine in Prolog? SOUL, maybe?