Theory and practical strategies for efficient alphabetaseaches in computer chess - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Theory and practical strategies for efficient alphabetaseaches in computer chess

Description:

Introduction to the FUSc# computer chess project ... Searching a set of typical positions from real chess games to depth 4: Johannes Buchner ... – PowerPoint PPT presentation

Number of Views:47
Avg rating:3.0/5.0
Slides: 19
Provided by: mist2
Category:

less

Transcript and Presenter's Notes

Title: Theory and practical strategies for efficient alphabetaseaches in computer chess


1
Theory and practical strategies for efficient
alpha-beta-seaches in computer chess
Bachelor-Thesis October 2005 Johannes Buchner
2
Content
Overview Introduction to the FUSc
computer chess project Theory of
efficient seach algorithms in chess engines
Practical strategies used in FUSc
Experiments and Results in tuning the search
algorithm
3
The FUSc Project
Foundation of the AG C, OpenSource first
version (FUSc V 1.03) quiescent search,
hashtables, heuristics, iterative
search first version playing on the internet
(FUSc V 1.06) better evaluation DarkFUSc,
version 0.1 new engine with rotated bitboards
DarkFUSc, version 0.5 new evaluation
(including an automatic classification of
different types of chess positions) DarkFUSc,
version 0.9 Lange Nacht der Wissenschaften
2005 DarkFUSc, version 1.0 more efficient search
algorithm, better move ordering
14th october 2002 1st march 2003 1st June
2003 January 2004 July 2004 June 2005 August
2005
4
Inside a chess engine
board representation
0100110 11001 ...
5
Theory of search algorithms
Shannon-Type-A-Strategy (Claude Shannon 1950)
- depth first search up to a given search
horizon - evaluation at the leaf nodes -
idea of minmax white maximizes, black
minimizes values
-4
W to move
B to move
-8
-12
-4
-8
-5
3
-12
7
3
28
-4
17
W to move
6
Alpha-Beta-Algorithm
Alpha-Beta-Algorithm - prune irrelevant parts
of the game tree - returns same bestmove as
minmax, but with possibly less nodes visited
- 8 , MaxValue
W to move
B to move
-8
-12
lt - 8 !
-8
-5
3
-12
W to move
7
Move Ordering
Efficiency depends on move ordering! - worst
case alpha-beta degenerates to minmax! -
static move ordering (analyse position
statically) - dynamic move ordering (use
information of the search tree)
8
Practical Strategies in FUSc
  • DarkFUSc 0.9 (June 2005)
  • basic static move ordering
  • transposition table move searched first
  • DarkFUSc 1.0 (October 2005)
  • advanced static move ordering
  • dynamic move ordering based on
  • a) killer heuristic
  • b) history heuristic
  • c) refutation heuristic

9
Dynamic Move Ordering
  • Killer Heuristic
  • save the moves that caused a cutoff at a ply
  • try killer-moves first when coming to same ply
  • advanced counter how often a cutoff occurred

killer heuristic
...
History Heuristic - save a history value for
each move in order to record if the move has
been good in the tree searched so far
(globally in the left subtree) - try moves in
the order of their history value
history heuristic
...
Refutation Heuristic - save if a move
refutates another, and try it first if the
position is similar (i.e. the move before has
been the same)
refutation heuristic
...
10
First practical Experiments
Searching a set of typical positions from real
chess games to depth 4
11
Comparison of the heuristics
12
Results from the Experiments
  • Results of the first practical experiments
  • the move ordering has a great influence on the
    efficiency of alpha-beta-searches
  • in computer chess
  • the newly implemented move-ordering heuristics
    are successfull in reducing
  • the tree-size for typical alpha-beta-searches
  • already in depth 4, the version with no move
    ordering searched more than 20 times
  • more nodes than the best version with all the
    heuristics combined.

Planning the FUSc goes Deep-Experiments -
eliminate the no-sort-version, as it takes
nearly all of the search time we already know
that sorting moves is a good idea ? - reduce
the set of positions in order to go deeper
13
FUSc goes Deep
Searching a reduced set of chess positions to
depth 9
  • Observations
  • Dynamic heuristics
  • reduce tree size
  • - the advanced killer
  • heuristic is better
  • than the simple one
  • the killer heuristic
  • is most efficient alone
  • the refutation heuristic
  • has no clear benefit

14
FUSc goes Deep
Searching the full set of chess positions to
depths 6 and 7
depth 6
depth 7
15
Results of the experiments
  • Results of the FUSc goes Deep-experiments
  • the benefits from the dynamic heuristics get
    larger when going deeper, they
  • reduce the tree size of the static-only version
    by a factor of 3-5
  • the side-effects of the heuristics get more
    relevant at higher search depths
  • for the current implementation of the
    heuristics, the most efficient variant seems
  • to be the advanced killer-heuristic when
    applied alone
  • as there are many parameters for each of the
    heuristics, more testing needs to be
  • done in order to find the optimal combination

16
Final Evaluation
  • Evaluation of the work
  • the aim of the work to understand the theory of
    efficient alpha-beta-searches in
  • order to develop practical strategies to tune
    the search engine of FUSc was reached
  • the move ordering and thus the search efficiency
    of the FUSc chess engine was
  • greatly improved as shown in the practical
    experiments
  • - a complete framework for conducting automated
    tests on collections of positions was
  • implemented and tested to work in practice in
    the course of this work, facilitating
  • further experiments and future research
  • in the course of this work, FUSc was also
    ported to a pure 64-bit enviroment
  • (running Windows XP 64-bit Edition with .NET
    2.0 Beta2 on an AMD64), which lead
  • to a performance boost of factor 2 alone -gt
    FUSc got much stronger!!!

17
Further research
  • Further research
  • - for finding the optimal combination of
    parameters for the heuristics, more testing
  • needs to be done maybe even with the help of
    some methods of machine learning
  • in order to adjust the parameters automatically
    (e.g. genetical algorithms)
  • with its bitboard-approach towards
    move-generation, FUSc is performing well on
  • 64-bit machines and with already existing
    ports to .NET 64bit and Linux, a port to
  • the Opteron-cluster at the ZIB could provide
    much more computing power
  • for porting FUSc to multiprocessor machines, a
    major code rewrite is necessary
  • (e.g. conducting a parallel alpha-beta-search),
    but this could be promising also as
  • there are now AMD64 dualcore-CPUs beeing
    available at moderate prices

18
the end
thanks for listening ...
http//www.fuschmotor.de.vu
FUSc
The complete Bachelor-Thesis as well as the
detailed results from the practical experiments
can be downloaded from FUSc-Homepage. Thanks
again to Marco Block, Prof. Raúl Rojas and the
whole FUSc team!
Write a Comment
User Comments (0)
About PowerShow.com