iensen / plog2.0 Goto Github PK
View Code? Open in Web Editor NEWA grounder and solver for P-log (A language combining non-monotonic logic with probabilities)
License: GNU General Public License v3.0
A grounder and solver for P-log (A language combining non-monotonic logic with probabilities)
License: GNU General Public License v3.0
A lot of examples have a more natural representation using Aggregates.
For instance, the following program
https://github.com/iensen/plog2.0/blob/master/plogapp/tests/nasa/A4n.plog
has a rule:
lessthan5broken = false:- broken(Component1) = true,
broken(Component2) = true,
broken(Component3)= true,
broken(Component4) = true,
broken(Component5) = true,
Component1<>Component2, Component1<>Component3,
Component1<>Component4, Component1<>Component5,
Component2<>Component3, Component2<>Component4,
Component2<>Component5, Component3<>Component4,
Component3<>Component5, Component4<>Component5.
That can be rewritten using aggregate:
lessthan5broken = false:- #count{X: broken(X)} <5.
This will shorten the program and improve the inference significantly.
We can use A-log aggregates (Gelfond, Zhang, 2014)
Current algorithm is guaranteed to produce correct results only for the case when the given program
is dynamically causally ordered unitary.
We need an automatic check that establishes that a program belongs to that class.
Note that it can work only for some programs (e.g, sometimes the solver can say:
The compilation halts with errors similar to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=871100.
Refine the inference algorithm from the dissertation INVESTIGATING AND EXTENDING P-LOG to be based on Monte Carlo Sampling. Check if it is possible to define error bounds.
Currently, P-log crashes with segmentation fault if, for example, no argument is provided.
Make it output proper error and/or help. Make the help command work.
P-log should understand classical negation -p. as a short hand for p = false.
For example, the following program should work:
sorts
#boolean = {true, false}.
attributes
p: #boolean.
statements
-p.
?p = false.
Write a user manual (similar to SPARC)
Currently, we only allow queries of the form ?-a that return the answer.
It can be useful to have other type of queries, such as MAP inference, Probabilistic Plannning (MDP/POMDP, Influence Diagrams), etc. Additional changes to P-log syntax may be required.
In the DCO algorithm, very inefficient algorithm is used. Use some ideas from http://www.tcs.hut.fi/Software/smodels/
In the draft https://github.com/iensen/plog2.0/blob/master/papers/plog_ref_dco_full.pdf we have described a new syntax for do/random. The implementation must be adapted respectively.
Consider the following program:
sorts
#boolean={true, false}.
attributes
a : #boolean.
b : #boolean.
c: #boolean.
statements
a:+.
b:+.
a:- b.
b:- a.
c:- b.
c:- a.
c:+.
obs(c).
Even though there are only two possible worlds, {c} and {a,b,c}, the system incorrectly computes probability of a to be equal to 2/3 instead of 1/2.
The issue here is that two different abductive supports, {a}, and {b} generate the same possible world, {a,b,c}, hence it is counted twice when computing probability.
A similar issue was reported by @vuphan314 for SPARC earlier: iensen/sparc#22, but here it is more prominent since it actually leads to wrong results.
Design and implement sorts (adapt the syntax from SPARC:
https://github.com/iensen/sparc/blob/master/User_Manual/Sparc_Manual.pdf?raw=true)
In the dissertation PLOG: ITS ALGORITHMS AND APPLICATIONS by WEIJUN ZHU, B.S.
Weijun describes an algorithm that implements P-log inference by translating P-log programs into ASP (Smodels Syntax). Today, we can implement the algorithm using Clingo API (https://potassco.org/clingo/c-api/5.2/). This is going to be more efficient, and we can use it as a baseline for benchmarking more efficient algorithms.
Implement CR-Rules using a translation to weak constraints (See Towards Answer Set Programming with Sorts by Balai, Gelfond, Zhang).
See if there are any issues that are still unresolved in the current clingo, that prevent it from being used in P-log.
If there are issues, contact Potassco and resolve.
If there are no issues, make P-log use the main repository instead of the local fork.
Currently, a P-log run is requires to answer a query. It is possible to store some intermediate results in order to answer multiple queries more efficiently.
I am a student from Southeast University in Nanjing, China. I want to do some experiments on p-log.
Is the plog2.0 ready for usage?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.