问题
OK. this might be a very basic question to please don't flame me but I have been googling I want to learn how to write solutions to transportation problems like Wolf, Cabbage, and Goat or traveling salesman using F#
so far my research has taken me to these resources on the web
http://mat.gsia.cmu.edu/orclass/integer/integer.html
http://www.zib.de/Publications/Reports/SC-95-27.pdf
Fox-Goat-Cabbage Transportation
http://www.qauprogrammers.com/Article/File-192324030/PROLOG-Programming-with-NET
but despite reading thru these, I have not been able to "think" on how should such a problem be solved in F# type of language
回答1:
I'd recommend going thru the excellent article Escape from Zurg: An Exercise in Logic Programming. Although the functional language of choice there is Haskell, it should give you enough ideas about programming of optimal search problems functionally.
Also Escape from Zurg in Scala has full source code easily portable to F#.
来源:https://stackoverflow.com/questions/11473756/getting-started-with-basic-transportation-problems-like-wolf-cabbage-goat-with