A simple script to find the value of x in terms of z, with y being an intermediate medium of exchange. Uses MySQL to extend Prolog's fact store.
Prolog Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
appraise.pro
appraise.py
db.pro
prolog_appraise.sql

README

==Appraise for SWI-Prolog==
One day I thought it might be kinda cool to have a script that could tell you the value of something in terms of anything else.

For example, if I wanted to know how many apples I could get for my Best of Kansas CD, I would simply ask the script:
"Hey, how many apples is this Kansas CD worth?"

And my script would go out, find a path of exchange between my Kansas CD and apples, and come back with a number.

It seemed to me that Prolog would be the best language for something like this, so I dusted off my Prolog skills and, after finally getting back into the swing of things, cranked out an initial version in about an hour.

After that I went back and added on a MySQL backend for the whole thing with the intention of using it in conjunction with a Python microframework like Bottle.py or Flask to provide a  web-based interface into the whole thing. Didn't work out in the end, but the code might still be useful to you.