The reason why I said "And why would you?" is roughly what Oberon_Command said. It's not obvious at all how a logic programming language can be used to make a function that maps chess positions to real numbers (which is what an evaluation function does). If the question had been "Why not use ANNs?" or "Why not use GAs?", at least it would have been obvious what type of solution the poster had in mind. Then we could have had a conversation about the difficulties in applying those methods to this problem.
Quote:Original post by dj3hut1 Prolog is good for solving search problems like the AI for chess. |
No, it's not. I spent about seven years developing a chess program on weekends, I've read most of the relevant literature since the 80s to around 2000 and I can tell you that Prolog didn't even play a minor roll in getting computers to play chess well. Search in chess is done using alpha-beta with refinements (quiescence search, move-ordering heuristics, transposition tables, null-move pruning...), preferably in whatever language is fastest (usually C with many clever tricks so things are fast).
Quote:The advantage is, that you don't have to code the algorithm, you must only declare the problem in the right way. |
I know that's how they always try to sell you declarative languages. In practice, you want to know exactly what your computer is doing at all times, and the abstraction offered by languages like Prolog doesn't buy you that much. This point of view may not be true for every type of programming problem, but it's most definitely true for chess.
Quote:And a CLP is even more beneficial, because you have the ability to restrict the search space with the help of simple constraints. |
I still don't know of any chess-playing programs over 2000 ELO using anything resembling this. What kind of constraints would you impose?
Perhaps you could write a program that would find solutions to mating problems, but before the very end of the game, I wouldn't even know what the main idea of how to structure the program would be.