zebra-puzzle

Why I can't get an answer for the Ship Puzzle with Prolog?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 23:50:14
问题 I need to solve the Ship Puzzle problem with using Prolog. Here are the facts. There are 5 ships. The Greek ship leaves at six and carries coffee. The Ship in the middle has a black chimney. The English ship leaves at nine. The French ship with blue chimney is to the left of a ship that carries coffee. To the right of the ship carrying cocoa is a ship going to Marseille. The Brazilian ship is heading for Manila. Next to the ship carrying rice is a ship with a green chimney. A ship going to

Why I can't get an answer for the Ship Puzzle with Prolog?

為{幸葍}努か 提交于 2019-12-01 22:19:59
I need to solve the Ship Puzzle problem with using Prolog. Here are the facts. There are 5 ships. The Greek ship leaves at six and carries coffee. The Ship in the middle has a black chimney. The English ship leaves at nine. The French ship with blue chimney is to the left of a ship that carries coffee. To the right of the ship carrying cocoa is a ship going to Marseille. The Brazilian ship is heading for Manila. Next to the ship carrying rice is a ship with a green chimney. A ship going to Genoa leaves at five. The Spanish ship leaves at seven and is to the right of the ship going to Marseille

How to get individual results while solving Einstein's riddle with OWL in Protégé?

孤者浪人 提交于 2019-11-30 16:31:47
I would like to better understand ontologies and reasoning. There is an interesting puzzle called Einstein's riddle on the net that can be solved with the help of ontologies and reasoning. I downloaded the OWL ontology from that site and imported it into Protege 4.0.2 (does not work with 4.1). I can start a reasoner by Reasoner → FaCT++ , Reasoner → Classify… , but i don't know, how to visualize the individual results. How can I do this? There are two ways in which you can visualise the results. Firstly, when you select the "Classes" Tab, you will see that there are two views available to you:

Solving logic puzzle in Prolog [closed]

左心房为你撑大大i 提交于 2019-11-30 14:23:30
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I am reading "Learn Prolog Now" and one of its exercises I haven't been able to solve myself is the following: There is a street with three neighboring houses that all have a different color. They are red, blue, and green. People of different nationalities live in the different

Logic Puzzle in Prolog - using lists

限于喜欢 提交于 2019-11-28 09:42:16
问题 I am trying to solve the following problem in Prolog, and I think I have coded it right, but my queries simply return false. Any advice on what to change? The problem is as follows: "Bagel Alley, the local bagel shop, was always a location of furious activity during the morning commute as people stopped by to get their coffee and bagel on the way to work. Fresh made on site each morning, the bagels were highly popular and the fact that the shop also had great coffee was like icing on the cake

Einsteins Riddle Prolog

别等时光非礼了梦想. 提交于 2019-11-27 02:14:20
I need some help with a prolog homework for my AI class. The question is to write prolog code for einstein's puzzle. I know how to write it down in my own but there are some constraints in the homework. there are 5 houses the Englishman lives in the red house the Spaniard owns the dog coffee is drunk in the green house the Ukrainian drinks tea the green house is immediately to the right of the ivory house the Old Gold smoker owns snails Kools are smoked in the yellow house milk is drunk in the middle house the Norwegian lives in the first house the man who smokes Chesterelds lives in the house

Solving “Who owns the Zebra” programmatically?

此生再无相见时 提交于 2019-11-26 19:16:17
Edit: this puzzle is also known as "Einstein's Riddle" The Who owns the Zebra (you can try the online version here ) is an example of a classic set of puzzles and I bet that most people on Stack Overflow can solve it with pen and paper. But what would a programmatic solution look like? Based on the clues listed below... There are five houses. Each house has its own unique color. All house owners are of different nationalities. They all have different pets. They all drink different drinks. They all smoke different cigarettes. The English man lives in the red house. The Swede has a dog. The Dane

Riddle with GNU Prolog, similar to Einstein Riddle

戏子无情 提交于 2019-11-26 18:37:58
问题 I am a complete beginner to programming and have to create and solve a riddle in Prolog using GNU Prolog, similar to the Einstein riddle, albeit less sophisticated. I have been trying to create a riddle for the items contained within the following table. My code so far look like this, but I really do not entirely understand what I am doing wrong or right here. I can compile the code in GNU Prolog, but it will not solve the riddle: middle(M,[_,M,_]). right(A,B,[[_|A]|B]). left(A,B,[A|[B|_]]).

Einsteins Riddle Prolog

╄→гoц情女王★ 提交于 2019-11-26 12:33:01
问题 I need some help with a prolog homework for my AI class. The question is to write prolog code for einstein\'s puzzle. I know how to write it down in my own but there are some constraints in the homework. there are 5 houses the Englishman lives in the red house the Spaniard owns the dog coffee is drunk in the green house the Ukrainian drinks tea the green house is immediately to the right of the ivory house the Old Gold smoker owns snails Kools are smoked in the yellow house milk is drunk in

Solving “Who owns the Zebra” programmatically?

白昼怎懂夜的黑 提交于 2019-11-26 08:57:30
问题 Edit: this puzzle is also known as \"Einstein\'s Riddle\" The Who owns the Zebra (you can try the online version here) is an example of a classic set of puzzles and I bet that most people on Stack Overflow can solve it with pen and paper. But what would a programmatic solution look like? Based on the clues listed below... There are five houses. Each house has its own unique color. All house owners are of different nationalities. They all have different pets. They all drink different drinks.