Getting started with basic transportation problems like Wolf, Cabbage, Goat with either C# or F# [closed]

混江龙づ霸主 提交于 2019-12-13 09:12:44

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!