I have a problem I'm interested in using core.logic with:

Let's say I have a set of rooms in a maze, they are labeled 1 through
5. Here is the list of connections between rooms:

[1 2]
[1 3]
[1 4]
[4 3]
[3 5]

I'd like to write a core.logic routine that would allow me to get a
navigation path given a start and end point. All paths are
bi-directional, and the shortest path should be returned.

=> (query 1 5)
[1 3 5]

=> (query 2 4)
[1 2 4]

All of these returned a 3 element set, but I'd like this to work with
arbitrary length paths. Any suggestions where to start reading up on
this? Is reading the reasoned schemer required for understanding how
to use core.logic?

Thanks,

Timothy


-- 
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to