15

I just wanted to learn name of algorithms.. thanks

anarhikos
  • 175
  • 1
  • 1
  • 3
  • Before getting into their "algorithmic" mode, most (but not all) chess programs, rely on heuristics, namely an extensive library of Chess Openings. – mjv Jan 08 '10 at 08:24
  • http://www.computerchess.org.uk/ccrl/4040/ – user27221 Sep 08 '20 at 21:44

4 Answers4

25

A general strategy in game algorithms is the minimax strategy, augmented with alpha-beta pruning. The minimax algorithm finds the best move, and alpha-beta pruning prevents it from going into branches of the game tree that cannot produce a better result than previous branches already have.

However, the chess game tree is too large to be completely examined. That is why computer chess engines only examine the tree up to a certain depth, and then use various methods to evaluate the positions. Many of these methods are based on heuristics. Also, a serious chess-playing program will have a library of openings so that it can play in the beginning by just consulting that library and not having to examine the game tree. Finally, many end games are completely solved, and these are also programmed in as a library.

JaakkoK
  • 8,247
  • 2
  • 32
  • 50
  • An equivalent of minimax is called negamax. The difference is that the score is negated at each change of depth in the tree. This way both players are trying to maximize the score (where in minimax one is trying to minimize it). I'm not sure what this does to the alpha/beta window. Does it become just a single value? – phkahler Jan 08 '10 at 19:07
  • 2
    it should be noted that the position evaluation function is probably the single most important aspect of a chess engine when determining its strength. In fact, its probably the only area where there is novelty in most chess engines now adays. For example, the Rybka position evaluation function was designed over 5 years (if irc) by very strong players. In a sense the evaluation function is what gives the computer intuition about the chess position, a fundamentally important part of any chess game and orthogonal to other issues like tactics in the game. – ldog Jan 09 '10 at 21:05
  • @gmatt - only partially true... aggressive pruning is part of what makes Rybka so strong, and the research in that isn't too old. Extended futility pruning, limited razoring, and adaptive null move pruning were state of the art less than a decade ago – tbischel Jun 22 '10 at 21:31
3

Minimax

If you need an in-depth knowledge about AI algorithms, I think "artificial intelligence modern approach" book is the best source.

Upul Bandara
  • 5,973
  • 4
  • 37
  • 60
  • 2
    That would be *one* part of a chess playing algorithm. However, minimax is not a chess algorithm in itself. – Tarydon Jan 08 '10 at 08:22
0

Wikipedia is a safe bet as a starting point. Did you look there?

Rybka seems to be a contender.

Tarydon
  • 5,097
  • 23
  • 24
  • I agree Wikipedia is a good place to look but Rybka is closed source so probably not much help – David Webb Jan 08 '10 at 08:29
  • @Dave: True, but it solves anarhikos problem of *just wanting to learn name of algorithms*. – Tarydon Jan 08 '10 at 08:51
  • 1
    @Tarydon - Rybka is the name of a _chess engine_. As it's closed source no-one (apart from the author) knows which algorithms it uses. – David Webb Jan 08 '10 at 10:38
  • @Dave: You win. I concede :) I can't downvote my own answer, so could you please do that? – Tarydon Jan 08 '10 at 11:15
  • 1
    @Tarydon - It's a good answer; Wikipedia will be an invaluable resource here. Just edit it and replace Rybka with an algorithm. – David Webb Jan 08 '10 at 13:40
0

Have a look at the some of the free source chess codes, for instance Crafty or even better how about Fruit? It plays pretty much almost the same strength of Rybka. But there are many new algos out there. Day will come when human chess players will have to just say I am not playing vs this engine, and this article pretty much sums it up --> http://www.mychessblog.com/man-versus-machine-when-a-computer-will-become-world-chess-champion/