Quote: Original post by alvaroQuote: 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).
Nonsense. Look at his statement. Prolog *is* good for solving search problems. And in the general, most any modern language can handle 'chess algorithims' just fine. In the 80s, C over Prolog made sense because computers were slow, simple and in order. Momentum and tradition may be why it still continues. As stated earlier in thread speed is not the main issue and even Python was advised. But I prefer the Prolog suggestion myself but would suggest Clojure (lisp derivative) or Oz as better.
Quote: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.
In practice you cannot know exactly what your computer is doing at all times these days. Less and less with multicore. And the abstractions offered by declarative languages buy you a massive amount. I say this as someone who uses them for work. And cringe when I have to do something in C# that I know would be implemented much more clearly and robustly in a more declarative language. These languages excel at recursion and manipulating complex data structures (especially recursive ones like trees). I never done any chess programming but those algorithims you state would be more easily implemented correctly in a declarative languages.