Einstein riddle

Job ID: 36568948

Budget: €30 – €250 EUR

Given a problem P (N, A, V, R, Q) satisfying the restrictions: there exists N = 5 slots, with one position, linear ionization, numbered from 1 to 5 (where we assume that slot 1 is the leftmost slot, and slot N is the rightmost slot); each slot has a main attribute, and a series of secondary attributes. For all attributes, values for all slots are different. Given the list of attributes A = [A 1 , A 2 , . . . , A N ]. Attribute A 1 has values from much, the number of V i values, with |V i | = N, ∀i. The first attribute A 1 is the attribute main. Attribute values are made up of English words, those made up of several words with the words separated by spaces, It gives a lot , R, with |R| = m to affirmation in English. I stated it, can have one of the following 4 formats:
1.proposition, which account has two attribute values – indicates association
in the same slot of the two values. Example: “Coffee is drunk in the green house” or “The Spaniard owns the dog” or “The Lucky Strike smoker drinks orange juice”;
2.sentence fragment, which account has an attribute value “next” sentence fragment, which account has another attribute value (no necessarily the same attribute) – indicates the neighborhood of the slots having the values indicated for attributes. Example: “The man who smokes Chesterfields lives in the house next to the man with the fox”;
3.sentence fragment, which account has an attribute value “right” / ”left” sentence fragment , which account , has another attribute value (no necessarily the same attribute) – indicates a neighborhood in a concrete direction between the slots with the two attribute values. Example: “The green house is to the right of the ivory house”;
4.sentence, which account, has an attribute value and is one of the words "first", "middle" or "last" indicates the positioning of a certain values for an attribute. Example: “The Norwegian lives in the first house”.
A question Q is given which account has an attribute value (value which does not is of the main attribute). Example: "Who owns the Dog?". Is required for the program to return the value of the main attribute that corresponds to the answer to the question.
Remarks:
1.the statements and the question may contain punctuation marks; words they can start with uppercase or lowercase letters, but it is irrelevant to the solution the problem;
2.It is guaranteed that only the words which will be relevant from the statements are attribute values or the words "first", "middle", "last", "right", "left" and "next";
3.Only either the plural form or the singular form for will be used an attribute value – will be the same form everywhere (including in the set of values);
4.It is guaranteed that only the attribute value will be relevant in the question and that the correct answer to the question will be a value of the main attribute.
Requirements: Required:
1. to solve the problem, as a constraint satisfaction problem (CSP).
It is requested that the problem be solved two methods using backtracking combined with an arc-consistent algorithm (eg AC-3) and uses backtracking with jump and combined with at least 2 heuristics
Related categories: Python Artificial Intelligence