triska / the-power-of-prolog

Introduction to modern Prolog
https://www.metalevel.at/prolog
1.18k stars 69 forks source link

AI/ML applications of Prolog #5

Open XVilka opened 6 years ago

XVilka commented 6 years ago

Would be nice to have a chapter about that, with some examples maybe. Maybe something similar to https://www.cs.ubc.ca/~poole/aibook/code/ailog/ailog2.html or so.

triska commented 6 years ago

Yes, I definitely agree, and this is what I am currently working on hardest. I have a small Chatbot ready (https://www.ombot.at), and also a small teleteaching environment that helps students solve mathematical tasks (https://www.metalevel.at/rits/).

The key AI application I want to show is formalization of legislation, i.e., a Prolog application that can answer questions about laws.

@bitlaw-jp has implemented a protoype for the constitution of Japan:

https://github.com/bitlaw-jp/the-constitution-of-japan

I want to apply this idea to tax law and other regulations, in order to reduce administrative burden for citizens and corporations, and to enable further use cases (who is affected by a law? where do I have to turn to? which information obligations am I subject to? etc.). Such applications will make Prolog very interesting to government agencies and many companies.

If anyone is interested in helping with such use cases or wants to share interesting links, please add them to this issue or contact me in other ways. A lot of work is necessary to do this properly, and I am very interested in these topics. These are long-term projects (time horizon: >5 years), starting with an analysis of parts of existing regulations, and looking for ways to formalize it. Portions of this work could be used for very interesting student projects, theses and papers.

Eventually (≥100 years), I would like to see laws discussed and passed as executable specifications, so that Prolog can be used to automatically perform the necessary steps, and no further programming is necessary.

Example: If income > X, then taxed with Y%.

We put the code in codex!

triska commented 6 years ago

I have uploaded the new AI chapter:

https://www.metalevel.at/prolog/ai

Please have a look! I hope you find it useful for the time being, and I welcome all suggestions and comments. Thank you!

XVilka commented 6 years ago

@triska it is cool, thank you, though I thought about more practical approach - a few examples, e.g. working with Bayesian classifier in Prolog, something like this https://dtai.cs.kuleuven.be/problog/tutorial/basic/02_bayes.html Or using cplint SWI Prolog package. Or something in the spirit of https://www.hig.se/download/18.5dd84b6d11f92f6598680001133/1353632218033/FoU%2030%20Hjelmblom.pdf

triska commented 6 years ago

These are very good links, and I have now added most of them, please have a look!

I have also added links to the Wumpus World, Escape from Zurg and Connect 4 examples, and also to RITS and the mentioned constitution of Japan project.

Thank you very much for your feedback!

XVilka commented 6 years ago
XVilka commented 4 years ago

@triska mentioning https://arxiv.org/abs/2004.06997v1 might be very interesting too, since relatively new research.

Also https://www.cs.unm.edu/~luger/ai-final2/CH7_Machine%20Learning%20Algorithms%20in%20Prolog.pdf is an interesting chapter.