On Aug 13, 5:33 pm, Alan <a...@malloys.org> wrote: > Funny you should mention this - I was about to post a question about > my own game when I saw your article. My issue is, I assume someone has > written minimax and/or alpha-beta pruning in Clojure (or a java > library that's easy to interop with). My case is slightly different in > that the turn order is not fixes - sometimes player X goes twice in a > row - but it ought to be pretty simple to plug into a standard AI > library. Does anyone know where I can find such a thing? >
I don't actually use alpha-beta: I opted to spend the effort to develop a decent evaluation function and then do some simple local optimisation on the gradient of said function. My reasoning was that alpha-beta usually works best when the branching factor is low and the evaluation function pretty cheap to calculate, sadly my situation was pretty much the reverse :-) For your case it may be different. Two turns in a row works fine for minimax or alpha-beta with a little tweaking (although it is likely to cut your search depth). Be warned though - my experience is that it's rather hard to find an AI library that will just "plug in" nicely to your code. Most of the challenge in AI tends to be around special cases, embedding "expert" knowledge and heuristics, plumbing in the right data representations etc. The search algorithm itself is usually the easy bit.... If you're after resources, there's a decent free online book on AI in Java that might be useful, has lots of code examples that should be pretty easy to convert to Clojure: http://www.scribd.com/doc/6995538/Practical-AI-in-Java -- 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