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 gkittelson 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. FallenBlade

    Train Route Planner, Infinite Loop

    I have been working on this all day and developed it to here: % Load in the tube file. :-[tube]. % route takes a starting location'X' and a destination 'Z'. % Creates an empty list and calls getroute. route(X,Z):- getroute(X,Z,[X]). % getroute takes a starting location 'X'...
  2. FallenBlade

    Arithmatic on Lists

    I don't understand what your attempting. You want: minus(A,B) Where both A and B are lists? And then it prints out what you would have to take away from A to get to B?
  3. FallenBlade

    Train Route Planner, Infinite Loop

    I have been playing with the code and I believe this should work, but it fails in exactly the same way as my last post: % Load in the tube file. :-[tube]. % route takes a starting location'X' and a destination 'Z'. % Creates an empty list 'V' and calls getroute. route(X,Z):- V...
  4. FallenBlade

    Train Route Planner, Infinite Loop

    This is what I have intended to do. But adding a list to my code seems to break it. Just slowly implementing this, I haven't added the code to add stations into the list, just pass the list around: route(X,Z):- V = [], getroute(X,Z,V). getroute(X,Z,V) :-...
  5. FallenBlade

    Train Route Planner, Infinite Loop

    I have a file containing how stations in the London underground are linked. For example: % CIRCLE LINE connected(high_st_kensington,notting_hill_gate,circle). connected(notting_hill_gate,bayswater,circle). % NORTHERN LINE (left branch) connected(mornington_crescent,euston,northern_l)...

Part and Inventory Search

Back
Top