On 23/08/12 09:35, nicolas.o...@gmail.com wrote:
If it is so slow, that's maybe because the branching factor is very high. Could you have an atom incremented in your evaluation function, or in next level, to check how many boards are generated for level 2 or 3? (At least this could give an approximate time for computing each board. (83 - 8) / num board computed. To check it is in line with what you mesured of core.logic.)
hmm...good idea! I'll try that....
And why do you need an atom in the move function? (When is it changed?)
Apart from the 'try-move' fn that is part of the Move protocol I also have an 'execute!' fn that simply calls 'try-move' and resets the board atom with the result of 'try-move' (a new board). This is not called at all in searching - only when I've got my gui up and actually playing on screen...
Lastly, if you just need core.logic to compute valid moves from the logical rules of chess and do not check they actually apply here, you could precompute that into a big table, which might or not be faster.
hmmm i'd never thought of that! I would need a table with roughly 64 rows (the board) x 6 columns (the pieces)...I will try that as well!
thanks Nicolas Jim -- 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