friguzzi / cplint

cplint is a suite of programs for reasoning with probabilistic logic programs
Other
68 stars 13 forks source link

Where to post examples, etc? #4

Closed RdR1024 closed 8 years ago

RdR1024 commented 8 years ago

Hi Fabrizio,

Thanks for making cplint available for SWIPL. I was previously using ProbLog, but I really like having a similar library available for swipl. I was playing around with cplint, and did a little example which possibly others might like. But I wasn't sure where best to post it (the review of cplint on SWI had problems).

Anyway, here's my little example: Monte Hall in basically 4 lines of probability logic:

% Monte Hall for swi-prolog + cplint

:- use_module(library(pita)).
:- pita.
:- begin_lpad.

picked(car):1/3.
picked(goat):- \+ picked(car).

revealed(goat):- picked(_).

switch_gets(car):- picked(goat), revealed(goat).

:- end_lpad.

main:-
    prob(switch_gets(car),P),
    format('Probability that switching gets the car is ~2f',[P]).
friguzzi commented 8 years ago

Hi, what you can do is to save your file using a meaningful name with the File->Save swish menu option. Then the file is assigned a url that you can post. I created an example at http://cplint.lamping.unife.it/p/monty_simple.pl If you like this example, I can add it to the list of examples, so that later it can be accessed at http://cplint.lamping.unife.it/example/inference/monty_simple.pl If you have modifications, you can do them at that url and then choose File-> Save There is also a google group you can use for posting https://groups.google.com/forum/#!forum/cplint If you want other examples to be added to cplint on swish, please let us know, we will be happy to add them.

Best Fabrzio

RdR1024 commented 8 years ago

Thanks, Fabrizio -- I've made minor edits. One thing that regularly catches me is that some (web based) text editors change the Prolog + to +.

Looks fine now.

Thanks for pointing out the SWISH method for creating examples.

cheers,

RdR

On Wed, Sep 14, 2016 at 5:57 PM, Fabrizio Riguzzi notifications@github.com wrote:

Hi, what you can do is to save your file using a meaningful name with the File->Save swish menu option. Then the file is assigned a url that you can post. I created an example at http://cplint.lamping.unife.it/p/monty_simple.pl If you like this example, I can add it to the list of examples, so that later it can be accessed at http://cplint.lamping.unife.it/example/inference/monty_simple.pl If you have modifications, you can do them at that url and then choose File-> Save There is also a google group you can use for posting https://groups.google.com/forum/#!forum/cplint If you want other examples to be added to cplint on swish, please let us know, we will be happy to add them.

Best Fabrzio

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/friguzzi/cplint/issues/4#issuecomment-246935269, or mute the thread https://github.com/notifications/unsubscribe-auth/AFVwe7fBbX1iDudlZ5NgXqNE4GiO4frpks5qp6j9gaJpZM4J8aPM .

friguzzi commented 8 years ago

Hi, it is online at http://cplint.lamping.unife.it/example/inference/monty_simple.pl

Thanks Fabrizio

2016-09-14 22:28 GMT+02:00 RdR notifications@github.com:

Thanks, Fabrizio -- I've made minor edits. One thing that regularly catches me is that some (web based) text editors change the Prolog + to +.

Looks fine now.

Thanks for pointing out the SWISH method for creating examples.

cheers,

RdR

On Wed, Sep 14, 2016 at 5:57 PM, Fabrizio Riguzzi < notifications@github.com> wrote:

Hi, what you can do is to save your file using a meaningful name with the File->Save swish menu option. Then the file is assigned a url that you can post. I created an example at http://cplint.lamping.unife.it/p/monty_simple.pl If you like this example, I can add it to the list of examples, so that later it can be accessed at http://cplint.lamping.unife.it/example/inference/monty_simple.pl If you have modifications, you can do them at that url and then choose File-> Save There is also a google group you can use for posting https://groups.google.com/forum/#!forum/cplint If you want other examples to be added to cplint on swish, please let us know, we will be happy to add them.

Best Fabrzio

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/friguzzi/cplint/issues/4#issuecomment-246935269, or mute the thread https://github.com/notifications/unsubscribe-auth/ AFVwe7fBbX1iDudlZ5NgXqNE4GiO4frpks5qp6j9gaJpZM4J8aPM .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/friguzzi/cplint/issues/4#issuecomment-247143099, or mute the thread https://github.com/notifications/unsubscribe-auth/AJMRBB74DkgJWs75Qq4eOOnQdtDERngFks5qqFkBgaJpZM4J8aPM .