The n-knights problem
- From: Lash Rambo <lr@xxxxxxxxxxxx>
- Date: Sun, 27 Aug 2006 00:26:43 GMT
Given just a description of an 8x8 chess board and the rules for how a
knight can move, I want to write a Prolog program to compute, through logic
alone, the maximum number of knights that can be placed on the board such
that no knight attacks any other. I don't care about specific
configurations (as in the classical 8-queens problem), but would like a
"proof" that the number it comes up with is correct.
I figure that first, the program would need to deduce that knights can only
threaten squares of the opposite color. The program would then "realize"
this property applies no matter how many knights there are on the same
color of square. Then it'd come up with the answer: 32. There'd
undoubtedly be more steps, but that's the gist of it. Part of the "proof"
I'd like to see is those deductions it comes up with.
It sounds easy enough, but I've no idea how to even start. Any ideas of
how to set this up?
.
- Follow-Ups:
- Re: The n-knights problem
- From: Lash Rambo
- Re: The n-knights problem
- Prev by Date: Re: Prolog goals order
- Next by Date: Re: The n-knights problem
- Previous by thread: Ebay Item: Art of Prolog Sterling and Shapiro 2nd Edition VGC
- Next by thread: Re: The n-knights problem
- Index(es):
Relevant Pages
|