Exercise 13.9 Write a meta-interpreter that can ask multiple sources for information. Suppose that each source is

Question:

Exercise 13.9 Write a meta-interpreter that can ask multiple sources for information.

Suppose that each source is identified by a universal resource identifier (URI).

Suppose you have the predicates

• can answer(Q, URI) is true if the source given by URI can answer questions that unify with Q.

• reliability(URI, R) is true if R is some numerical measure of reliability of URI.
You can assume that R is in the range [−100, 100], in which the higher number means that it is more reliable.
• askSite(URI,Q, Answer) is true when you ask the source URI a question Q, it gives the Answer that is one of {yes, no, unknown}. Note that although can answer and reliability can be simple databases, askSite is a sophisticated program that accesses the web or asks a human a question.
Write a meta-interpreter that can utilize multiple information sources and returns a reliability of the answer, where the reliability of an answer is the minimum of the reliabilities of the information sources used. You must have some convention for when no external sources were used (e.g., a reliability of 200). You can only ask an information source a question that you have recorded that it can answer.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: