constraintlogicpuzzles-puzzles Mailing List for Solve Logic Word Puzzles with CLP
Constraint Logic can solve word logic puzzles.
Brought to you by:
dougedmunds
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Threads 2. <th...@fe...> - 2014-01-18 01:41:52
|
Hello Everyone, We invite you to Strange Loop, a search and AI contest. A short contest targeted at automated puzzle solving and game AI programming. We present to you an opportunity to compete head to head with the bots. So if you are interested in tackling deep intractable problems,which require little more than some ingenuity to solve, then this is precisely the contest made for you. Strange Loop consists of three challenges, and invites everyone with interest in game AI, search optimization, or any field of computer science that deals with study of puzzles and games to come up with problem solving strategies. Problem Statement: http://felicity.iiit.ac.in/threads/strangeloop/problems Link to events page: http://felicity.iiit.ac.in/threads/strangeloop/ Strange Loop is organized as part of Threads 2014, the tenth annual computing festival as part of Felicity, the annual techno-cultural festival of IIIT H. There are exciting prizes to be won. Prizes worth INR 15000 are up for grabs. If you haven't read before, please register here: http://felicity.iiit.ac.in/threads/register If you have any doubts/queries you can send us a mail at str...@fe... Regards, Organizing Team, Threads 2k14, Felicity, IIIT Hyderabad. |
From: <Ai...@ao...> - 2003-04-05 20:59:46
|
can u give me the answers for woe is we |
From: Carl D. <de...@ma...> - 2001-03-21 07:08:01
|
On Tue, 20 Mar 2001, Doug Edmunds wrote: > The 'Minor Confusion' puzzle is a one-pivot puzzle (a 'zebra'-type > puzzle). I do not understand this concept of "pivot". Rather than explaining it, you could help me out by directing me to a puzzle on your web site that is NOT a one-pivot puzzle. > I had not indicated that that within each group, the values were > different: that each name's variable was different from > each other, each position was different, etc. (hand coding would be A ## D, > A ## G, ...). That is what I call the SDR constraint: System of Distinct Representatives. My program only handles problems with that constraint. However, with a vast number of examples, I show that many problems that are not initially in SDR form can be put into SDR by the addition of a few dummy variables. So I would like see if I can take what you consider to be a multi-pivot puzzle and convert to a one-pivot problem. Is the terminology "pivot" standard? If so, I'll have to use it in my paper. > Eclipse has the 'alldifferent' function, used thus: > > alldifferent([A,D,G,J,R,S]), > alldifferent([BI,CH,DI,LE,ST,TI]), > alldifferent([CF,FB,PI,RF,SS,TB]), > alldifferent([BA,FO,MA,NO,PE,TR]), > alldifferent([CA,EE,GR,NA,PU,TO]), Identical to the 'Distinct' operator in my program. > I added those 5 lines to my code (copy attached) and the solution time > dropped from 12+ seconds to <.5 seconds, which is close to the time > needed just to load the file. I will be uploading the new file to the > website soon. Eclipse is a compiled language, right? I guess then that my solution time of 3 seconds in the huge, lumbering, interpretted system Maple is pretty good. I can do the zebra puzzle in .5 seconds. (All times are on an AMD K6 600 MHz or on a Sparc Ultra 1). That Eclipse time is to find the feasible solution AND prove it unique, right? That you for the references; I will check them out. I will send you my program and numerous very detailed examples of its use if you want. |
From: Carl D. <de...@ma...> - 2001-03-20 13:11:42
|
Is this mailing list active? I put the exclusive-or constraint type into my system, like I was talking about in my last article. That didn't cause any savings for the Minor League Baseball problem. I suspect that there is something unusual about this problem. I can't describe it exactly, but at one point the transitive properties propagate outwards and then come back near where they started and conflict with the eliminative properties. This is a way to reach a contradiction that my program never saw before, despite doing many complex problems. I has to put in a special check for it. |
From: Carl D. <de...@ma...> - 2001-03-18 19:45:19
|
Dr. Edmonds: You say on your website that the solution (by Eclispe) of the minor league baseball puzzle takes longer than the others. How much longer? I suspect that the reason is that some of the constraints are disjunctive. I have written a package in Maple6 to solve a special type of CSP. Those would be CSPs that can be stated in terms of finding an equivalence relation on a finite set given an initial partition of the set into Systems of Distinct Representatives (SDRs) of the quivalence classes. Most logic puzzles from magazines are of this type. I had never even heard of CSP or Eclipse when I wrote this program. But now I have been invited to present it at the Application of Computer Algebra Conference in Albuquerque in June. So I have been doing some research, which led me to your website, so that I could compare my work to other work in the field. Here is how the Minor League Baseball problem is encoded in my system: (Lines that begin ">" are user input. Lines that begin "#" are comments. Other lines are program output. > restart; # Load my program > read "C:\\Windows\\Desktop\\LogicProblem.mpl"; # State the initial variables or SDRs. > V:= ['Name','nick','pos','city','team']: # Give all possible values for each SDR. > Name:= [Aaron,Dave,Gary,Jon,Ray,Stan]: > nick:= [Bigfoot,ChooChoo,Dizzy,Lefty,Stringbean,Tiny]: > pos:= [center,first,pitcher,right,short,third]: > city:= [BR, FW, Martin, North, Pensacola, Trenton]: > team:= [Catfish,Eels,GreenSox,Navigators,Pumas,Tornados]: # Initialize the problem in the program: > Baseball:= LogicProblem(V): > with(Baseball): # Give the constraints using the notation I developed. > Constraints:= > [#Clue 1 > Stringbean<>FW > ,Distinct([Stringbean, {op(team)} minus {Tornados, Navigators}]) > ,Distinct([FW, {op(team)} minus {Tornados, Navigators}]) > ,Rel(DifferentBlock, Stringbean, FW, team, [{Tornados}, {Navigators}]) > ,Rel(DifferentBlock, FW, Stringbean, Name, [{Aaron}, {op(Name)} minus {Aaron}]) > > #Clue 2 > ,Dave<>first > ,Rel(DifferentBlock, Dave, first, city, [{BR}, {op(city)} minus {BR}]) > ,BR=Catfish > > #Clue 3 > ,Distinct([Jon, Tiny, Eels, Martin]) > > #Clue 4 > ,Distinct([Lefty, Tornados, North]) > ,OR([center=Lefty, center=Tornados, center=North]) > > #Clue 5 > ,Bigfoot=Trenton > > #Clue 6 > ,Distinct([short, [Dave, Ray]]) > ,Distinct([short, [Eels, Pumas]]) > > #Clue 7 > ,Distinct([pitcher, {op(Name)} minus {Aaron, Jon}]) > > #Clue 8 > ,Dave<>right > > #Clue 9 > ,Dizzy=GreenSox > ,GreenSox<>North > > #Clue 10 > ,Pumas<>North > ,Rel(DifferentBlock, Pumas, North, nick, [{Tiny}, {op(nick)} minus {Tiny}]) > > #Clue 11 > ,Ray<>Pensacola > > #Clue 12 > ,Stan=ChooChoo > ]: # Tell program that we want to collect efficiency information: > CollectStats:= true: # My program gives a wide amount of control over how much internal # information is displayed for the user. I will set this at one of the # medium settings, just to show you some of the info that my program can # display. You may wish to scan right to the final solution. > infolevel[all]:= 2: # Start clock so we can see how much time this takes. > st:= time(): # Run it! > Satisfy(Constraints); Backup: Guessing OR([1, center = Lefty, center = Tornados, center = North]) Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing BR = center Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Eels = Stan Depth= 3 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] &<=>: Contradicts North <> Tiny Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing North = Stan Depth= 4 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess North = Stan Depth= 3 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess Eels = Stan Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,FW,Stringbean,1,[{Aaron}, {Jon, Ray, Dave, Gary, Stan}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess BR = center Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Catfish = Stan Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Eels = center Depth= 3 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess Eels = center Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess Catfish = Stan Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] &<=>: Contradicts Pumas <> Tiny NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess OR([1, center = Lefty, center = Tornados, center = North]) Depth= 0 Backup: Guessing OR([2, center = Lefty, center = Tornados, center = North]) Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Trenton = center Depth= 2 &<=>: Contradicts Stringbean <> FW NegateLastGuess: Backing up to last guess. Level = 90 GoBack: Restoring saved state from before guess Trenton = center Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Tornados = Stan Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,FW,Stringbean,1,[{Aaron}, {Jon, Ray, Dave, Gary, Stan}]) satisfied. Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing North = Aaron Depth= 3 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])]] Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) satisfied. Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])]] Rel/Check: Constraint Rel(DifferentBlock,Dave,first,4,[{BR}, {Pensacola, FW, North, Martin, Trenton}]) satisfied. Unsatisfied = [] Satisfy: Complete, consistent solution found. Attempting to prove unique\ ness. GoBack: Restoring saved state from before guess North = Aaron Depth= 2 &<=>: Contradicts North <> Aaron NegateLastGuess: Backing up to last guess. Level = 90 GoBack: Restoring saved state from before guess Tornados = Stan Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing center = Stringbean Depth= 2 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) contradicted. NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess center = Stringbean Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. &<=>: Contradicts Pumas <> Tiny NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess OR([2, center = Lefty, center = Tornados, center = North]) Depth= 0 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing North = Stan Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Elim: Contradiction: Complete row eliminated in [Bigfoot, ChooChoo, Dizzy, Lefty, Stringbean, Tiny] x [BR, FW, Martin, North, Pensacola, Trenton] Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) satisfied. Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing Eels = center Depth= 2 Elim: Contradiction: Complete row eliminated in [BR, FW, Martin, North, Pensacola, Trenton] x [Bigfoot, ChooChoo, Dizzy, Lefty, Stringbean, Tiny] NegateLastGuess: Backing up to last guess. Level = 90 GoBack: Restoring saved state from before guess Eels = center Depth= 1 Elim: Contradiction: Complete row eliminated in [BR, FW, Martin, North, Pensacola, Trenton] x [Bigfoot, ChooChoo, Dizzy, Lefty, Stringbean, Tiny] NegateLastGuess: Backing up to last guess. Level = 90 GoBack: Restoring saved state from before guess North = Stan Depth= 0 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Satisfy: Attempting to fulfill unsatisfied constraints by guessing. Backup: Guessing center = Stringbean Depth= 1 Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])], [-10, Rel( DifferentBlock, Stringbean, FW, 5, [{Tornados}, {Navigators}]) ], [-10, Rel(DifferentBlock, Pumas, North, 2, [{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}])], [ -10, Rel(DifferentBlock, FW, Stringbean, 1, [{Aaron}, {Jon, Ray, Dave, Gary, Stan}])]] Rel/Check: Constraint Rel(DifferentBlock,Stringbean,FW,5,[{Tornados}, {Navigators}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,Pumas,North,2,[{Tiny}, {Stringbean, ChooChoo, Dizzy, Lefty, Bigfoot}]) satisfied. Rel/Check: Constraint Rel(DifferentBlock,FW,Stringbean,1,[{Aaron}, {Jon, Ray, Dave, Gary, Stan}]) satisfied. Unsatisfied = [[-10, Rel(DifferentBlock, Dave, first, 4, [{BR}, {Pensacola, FW, North, Martin, Trenton}])]] &<=>: Contradicts Dave <> BR NegateLastGuess: Backing up to last guess. Level = 95 GoBack: Restoring saved state from before guess center = Stringbean Depth= 0 &<=>: Contradicts FW <> Stringbean NormalReturn: Conclusions: 1313 Unique solution: [Aaron , Stringbean , pitcher , North , Navigators] [ ] [Dave , Tiny , third , Pensacola , Pumas] [ ] [Gary , Dizzy , short , Martin , GreenSox] [ ] [Jon , Lefty , first , BR , Catfish] [ ] [Ray , Bigfoot , right , Trenton , Eels] [ ] [Stan , ChooChoo , center , FW , Tornados] > time()-st; 1.265 # The above time is in seconds. > &? ShowStats; Sets = 123, Unsets = 280, Elims = 1373, Transfers = 487, MaxLevel = 1055, Guesses = 14, MaxDepth = 4 -------------------------- End of output It is clear from the statement of the problem that what is meant by "or" is really an exclusive or. I have not included an exclusive-or constraint type in my package, but now I see that I should. That would make this run faster. The handling of disjunctive constraints was one of the most complicated parts to write into my program, especially when it is trying to prove the uniqueness of the solutions. When you encoded this problem into Eclipse, did you use "or" or "exclusive or"? Let me know if you would like a copy of my program and several detailed examples of its use. The examples include problems that are far more complicated than this one. Would you mind if I use the above example in the paper I am writing? It would be especially useful to know how the efficiency of my techniques compares to Eclipse. Are you aware of any other work about solving CSPs that can be stated in terms of finding an equivalence relation given an initial partition of the set into SDRs of the equivalence classes? I would like to refer to it. Could you give me an academic reference that uses the zebra puzzle as an example, either for a CSP program or for a theorem-proving program? Carl Devore |
From: FAROUK A. <f....@la...> - 2000-10-11 14:58:09
|
Dear All! Can someone please help and forward suggestions on how I might be able to put a constraint to the following situation? I have variables, say, Vars = [A1, A2, A3, A4, A5], Vars::1..5, alldifferent(Vars), with penalties depending on the way the numberings are done. For example, if the numbering is 1,2,3,4,5 respectively then, P1 = 0 + COST1, P2 = P1 + COST2, . . . P5 = P4 + COST5, But if the numbering changes to 1,3,2,5,4 then P1 = 0 + COST1, P3 = P1 + COST3, P2 = P3 + COST2, P5 = P2 + COST5, P4 = P5 + COST4, That means the values for the Pis is dependent on the values assigned to the Ais. Please kindly help! with best regards to you all! Farouk =============================================================================== UMARU FAROUK AMINU DEPARTMENT OF MANAGEMENT SCIENCE LANCASTER UNIVERSITY LANCASTER LA1 4YX U.K. +44 (0)1524 593865 (School) +44 (0)1524 383619 (Home) +44 (0)1524 844885 (Fax) |
From: jon f. <bay...@ho...> - 2000-08-13 06:12:55
|
Great site. I'm using Constrain Logic Programming for natural language processing. I'm using Mozart. Unfortunately, I don't qualify for a free Eclipse license. Pure vanilla Prolog or something with a free license like Mozart would be better for me. I'm going to set up a site for Prolog natural language programming using constraint logic programming at Soundforge soon. Great examples! Great site! Thanks. JonFernquest bay...@ho... ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com |