Hi, so I chose this problem as my first foray into core.logic too My solution is here https://github.com/AdamClements/countdown/blob/master/src/countdown/core.clj
My solution is a little slow, depending on how tricky a problem it is, it can take from milliseconds to seconds. I ran [75 9 1 3 4] with a each target from 0 to 999 and got an average time of 824ms (including a lot where the search was exhausted). In the solvable ones it usually returns quicker than that. Like I said, this is my first attempt at logic programming, so if anyone can see how to make my solution more concise/elegant/faster, tips are much appreciated! Thanks Adam Clements On Saturday, August 18, 2012 3:36:01 PM UTC+1, David Powell wrote: > > > I just had a go of solving the Numbers Game from the UK gameshow Countdown > [1] in clojure.core.logic. > > https://gist.github.com/3374505 > > It works, but it is a bit slow. > > Anybody got any ideas on better approaches? > > [1] http://en.wikipedia.org/wiki/Countdown_(game_show)#Numbers_round > > -- > Dave > > -- 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