Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. atillacsenki

    find all right for block

    ok how about using set_of on youre right_to function. This should give u the list of each block on the desk starting from the one on the left. You dont have to do it this way but using the built in predicate last can help you find the last one in the list. In SWIProlog enter help(last). Which...
  2. atillacsenki

    find all right for block

    setof(+Template, +Goal, -Set) Equivalent to bagof/3, but sorts the result using sort/2 to get a sorted list of alternatives without duplicates. Is what i get, so i guess I'll have to hold ya hand. +Template = the variable u want ie X, goal is the goal i.e a predicate that must be...
  3. atillacsenki

    find all right for block

    what you need to do is define a predicate for finding all the blocks on a stack. I am also assuming u need to find all the blocks to the right of a block even if the block is on a stack. So you need to find the base. Then apply youre right_to predicate to the base. So you may end up with two...
  4. atillacsenki

    find all right for block

    If you need any more help mike will be more than happy to help. lots of love Atilla
  5. atillacsenki

    find all right for block

    This sounds very similar to a coursework I am doing at present , which was advised to use the built in function setof/3 . If you do a help(setof). in swiProlog it will provide information on how this is defined. Hope this helps XXX Atilla

Part and Inventory Search

Back
Top