On Sat, Aug 18, 2012 at 10:36 AM, David Powell <djpow...@djpowell.net> 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
I don't have time to offer a better solution but your approach seems pretty brute force. You need to encode some knowledge into the game. First I would eliminate actually searching over * and /. This because it seems to me that it would be useful to know ahead of time what other numbers can be produced from the cards - for example values between the large card and 10. I would also continue to use the larger card (and numbers derived from it) until we are close to the solution. Hope this helps, David -- 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