Re: How to create a square grid like chess board???
From: Bart Demoen (bmd_at_cs.kuleuven.ac.be)
Date: 10/18/04
- Next message: Bart Demoen: "Re: List quastion -- polynomial arithmetic operations"
- Previous message: tombolo: "How to create a square grid like chess board???"
- In reply to: tombolo: "How to create a square grid like chess board???"
- Next in thread: Heath Hunnicutt: "Re: How to create a square grid like chess board???"
- Reply: Heath Hunnicutt: "Re: How to create a square grid like chess board???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 18 Oct 2004 21:20:13 +0200
tombolo wrote:
> Hi...
>
> i'm doing a small system for stowing cargo containers on a
> vessel. The concept and positioning of stowing these containers are
> the same as placing a chessman on one of the chessboard's cell. so,
> how do i implement the rows and columns?
Please try Google. "Prolog chess" does wonders !
> Can anyone show me an
> example? i heard it can be done using lists.
Where did you hear that it can be done with lists ? It is most amazing
that you got such precise information on the power of lists, because
with lists, you can do "everything" (that can be done in any other
reasonable programming language) ... So, where did you hear that ?
> And one more thing, how do i tell the system to skip the occupied
> cell?
> By using the not/1 predicate?
I wouldn't abuse not/1 for skipping occupied cells.
Not/1 is too powerful and you might skip un-occupied cells by accident.
Or worse, you might turn a seemingly un-occupied cell into an occupied
one later on. Scary isn't it ?
If I were you, I'd go for the direct approach: make my own homework.
And come back in a week, when your deadline had passed and c.l.p. has
perhaps decided that your question was interesting and starts producing
something of general interest.
If I am wrong about my assumptions (homework), tell us your real name,
affiliation etc. and show us some sign that you know anything at all
about Prolog programming and that you have done some thinking already.
Cheers
Bart Demoen
>
> thanks in advance...
One more person with a very low esteem of this newsgroup :-(
- Next message: Bart Demoen: "Re: List quastion -- polynomial arithmetic operations"
- Previous message: tombolo: "How to create a square grid like chess board???"
- In reply to: tombolo: "How to create a square grid like chess board???"
- Next in thread: Heath Hunnicutt: "Re: How to create a square grid like chess board???"
- Reply: Heath Hunnicutt: "Re: How to create a square grid like chess board???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|