Re: The n-knights problem
- From: Joachim Schimpf <j.schimpf@xxxxxxxxxxxxxxx>
- Date: Wed, 30 Aug 2006 21:59:53 GMT
Lars wrote:
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.
Not the same thing, but related and maybe helpful: an ECLiPSe
solution to the "crowded chessboard" problem, see
http://eclipse.crosscoreop.com/eclipse/examples/crowded_chess.ecl.txt
-- Joachim
.
- References:
- The n-knights problem
- From: Lash Rambo
- Re: The n-knights problem
- From: Lash Rambo
- Re: The n-knights problem
- From: Lars
- The n-knights problem
- Prev by Date: Re: The n-knights problem
- Next by Date: Re: The n-knights problem
- Previous by thread: Re: The n-knights problem
- Next by thread: hi,
- Index(es):
Relevant Pages
|