Re: How to create a square grid like chess board???

From: Bart Demoen (bmd_at_cs.kuleuven.ac.be)
Date: 10/18/04


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 :-(



Relevant Pages

  • Re: how to password protect a validation list?
    ... Have you started with the DV cell unlocked? ... protect Drop Down Validation Lists therefore the value can be changed at ... prevent access to the DV cell and the second asks how to protect the cell ...
    (microsoft.public.excel.misc)
  • Re: how to password protect a validation list?
    ... Have you started with the DV cell unlocked? ... protect Drop Down Validation Lists therefore the value can be changed at ... prevent access to the DV cell and the second asks how to protect the cell ...
    (microsoft.public.excel.misc)
  • RE: Data table function
    ... Have now cleaned up the Town Names column using TRIMand VLOOKUP works ... Probably now look at the data sheet to see if I can clean it up a bit. ... You would have that type in cell ... the last one must be false for unsorted lists. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Compare 2 lists / conduct gap analysis (XL 2007)
    ... it'll be different after adding the empty cell than multiplying by the cell with ... Be careful with the format stuff. ... I had applied "text" format to my original Client and Recipeint lists (sheet ... My company has a tool that sends out documents to clients based on ...
    (microsoft.public.excel.misc)
  • Re: VLOOKUP? Need to have value returned when select from drop-down list
    ... Biff, thank you SO much! ... > there is no selection made from the drop down and cell A1 is empty then ... > to make drop-down lists and everything, ...
    (microsoft.public.excel.worksheet.functions)