Visual Learning Environment

Hi.

I’m creating an AI-supported visual learning environment SPA for a coaching environment. Here’s the tech I think I need:

  • Frontend — D3 for multi-mode graph visualization, interaction, and editing (yFiles is too much car at this point)

  • Web Server/Backend — SWI-Prolog for content, inference, OWL API-like ontology-esque management, and display logic via WebSockets (not imagining I can or should run Prolog in the browser)

I have used yWorks’ yEd for prototyping.

I’m not a hotshot programmer. Most of my IT life has been spent as a standard relational-model DBA and ad hoc database designer. As a lightly-clad, rather timid mountaineer, I will have to learn the tools and how they work together as I go.

Any thoughts and questions would be appreciated.

Thanks.

1 Like

For a fee or lunch or something else, I’d appreciate a coach.

First off welcome to SWI-Prolog and to this forum.

It is not that we don’t want to help but for me personally based on just the question I see that it could take up a few hours of my time each week because there is a big gap between what you indicate you know and what you need to know.

Another bit of warning I will give is that since Prolog lets one solve problems in so many different ways and many here will have a preferred way of solving problems you will get answers that don’t work together or that when trying to understand this can take months because those that gave the answer may have left out some information that is needed, to them it is obvious but to others it is not. I don’t fault anyone for this because I too am just as guilty.

When I tried to learn to use DCGs with SWI-Prolog it took me several months to understand them, the details are in a post here somewhere, but it was very frustrating and that is a common type of scenario that makes many just give up on Prolog.

So to start with I would suggest taking a few weeks to months and work through a book or two from the classics.

Thank you for both reading and responding. Just having a connection to the community helps. I know this is going to take awhile. I have started working through Bratko and Pereira/Shieber. Is it appropriate to post (infrequent) updates/ask questions on this thread?

1 Like

Ask all you want and need, just don’t always expect a response. Even I don’t always get a response (ref) but I know it is nothing personal and if I dig into it and have another question it might get answered. And as you have noticed, asking twice is fine.

Bratko would be my first choice for teaching as it stays closer to practical problems. Be aware that conc/3 in the book is really append/3. Sometimes the books version of conc/3 will cause a problem while uswing SWI-Prolog append/3 will work better.

Pereira/Shieber is a nice follow-up to Bratko because it goes more into theory and dives deep into some topics.

Clocksin and Mellsih is widely referenced but not my first choice on the list.

O`Keefe could be considered an exegesis of Prolog if there were one. It is the most advanced of the four and not really a first book. It is also my first choice now that I know enough to understand Prolog as it gives insight into writing excellent Prolog code.

1 Like

I can’t thank you enough. Your encouragement means a great deal.

1 Like

@ChipNowacek, I also would suggest that you go through this tutorial online, it is very useful:

https://www.metalevel.at/prolog

Thank you.

Not sure if this helps but i found this web application tutorial by @joeblog useful :slight_smile:
Cheers/JCR

1 Like

Many thanks for the kind words. I got an email from Coursera just now saying they liked my pitch for a possible Prolog MooC and will post me some information – which considering I live in South Africa is a bad idea given we don’t have a functional post office, but lets see.

Meanwhile, I’ve been honing my Swish skills (which is what I propose to base my Coursera course on if it goes ahead), and have been sketching my ideas starting with https://swish.swi-prolog.org/p/sql2prolog.swinb

1 Like

I can give you some pointers based off my experience developing a SPA intelligent tutoring system.

  • Web Server/Backend – SWI-Prolog should provide everything you need here. You can make an OWL ontology in Protege, load it into SWI, and query it via an API. Pay close attention to the predicate properties so you can have powerful, easy queries. I’m using SWI for an ontology-driven editing app with visualisations with a web gui. Deployment with web sockets is more difficult than just regular http(s) requests. But you’ll probably want to be running your own server and managing it anyway as there’s not much out there in terms of managed SWI-Prolog web host services. Both Annie and I have used Linode for SWI web apps, she introduced me to them.

  • Frontend – Having tried several frameworks for this, I’d recommend ClojureScript because you get to use DataScript as a client-side datastore, which you can query with Datalog, which is a subset of Prolog. So it plays nicely with your ontology triples and you can keep thinking logically. The advantage of using ClojureScript over Tau-Prolog (which is a lot of fun and great for other projects) is the huge ecosystem which includes libraries for visualization.

It sounds like a big app you’re making, expect to be writing thousands of lines of code and needing to become expert in many topics (deployment, server-side, api interfaces, ui, ux, coaching, user models, etc…). I had to make my app alone cos it was for research, but I wish I could have let someone else handle parts of it! Took me about 2 years to finally deploy what was the third complete rewrite. You get maximum nerd points for an SPA written in Prolog and LISP!