Re: The n-knights problem
- From: Lars <no@xxxxxxxxxxx>
- Date: Tue, 29 Aug 2006 23:05:58 +0200
Lash Rambo wrote:
Any other leads/suggestions would still be much appreciated!
This sounds like a problem that could be tackled using boolean constraint programming, available as a library in various Prologs: each square on the board is a boolean variable (true <=> knight, false <=> empty). SICStus CLPB (Constraint Logic Programming on Booleans) has a card/2 predicate which constrains the number of true variables in a list. Trying this first with 64 (= 8*8), then 63, etc. will eventually find the max number of knights on the board. A trace of program execution is then a "proof" that no larger number of knights is possible.
.
- Follow-Ups:
- Re: The n-knights problem
- From: Joachim Schimpf
- Re: The n-knights problem
- References:
- The n-knights problem
- From: Lash Rambo
- Re: The n-knights problem
- From: Lash Rambo
- The n-knights problem
- Prev by Date: to insert output in a specific folder
- Next by Date: SWI-Prolog : WordNet 2.1?
- Previous by thread: Re: The n-knights problem
- Next by thread: Re: The n-knights problem
- Index(es):
Relevant Pages
|