+ All Categories
Home > Documents > AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Date post: 26-Mar-2015
Category:
Upload: maya-napier
View: 219 times
Download: 2 times
Share this document with a friend
Popular Tags:
18
AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4 c4 a5 a6 30% 50% 40% 20% e4 60%
Transcript
Page 1: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

AG SchachprogrammierungFUSC#

april 2005

FUSC# project group

d4 c4

a5 a6

30%50%

40% 20%

e4

60%

Page 2: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Content

Overview

° Introduction to the “AG Schachprogrammierung“

° How does FUSc# represent the chessboard ?

° FUSc# goes internet / the future of FUSc#

april 2005

Page 3: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Foundation of the AG

Foundation of the AG C#, OpenSourcefirst version (V 1.03) quiescent search, killermoves, hashtables, heuristics, iterative searchfirst version playing on the internet (V 1.06) better evaluationfirst official online-tournament first victory„Lange Nacht der Wissenschaften“ (V 1.07) documentationDarkFUSc#, version 1.0rotated bitboards DarkFUSc#new evaluation (including an automatic classification of different types of chess positions)

14.Oktober 2002

1.März 2003

1.Juni 2003

11.Juni 2003

14.Juni 2003

january 2004

july 2004

april 2005

Page 4: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Foundation of the AG

april 2005

Table of results:1.Dauth, Benjamin  2290 2.Düster, Christian  2100 3.Domingo, Miguel  2038 4.Lane, Robin  13005.Steffen, Rico  19716.Kuprat, Thomas  19757.Burghardt, Michael  19758.Martin, Mario  19009.Trösch, Thomas  216610.FUSC# V1.07  140011.Kärcher, David  136812.Minski, Martin  202413.Rauch, Felix  135014.Schaller, Peter  175015.Wölter, Ulrich  130016.Remmo, Abdulrahim 1300

Page 5: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Foundation of the AGpseudonym :)

april 2005

Page 6: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Foundation of the AG

Table of results:1 Matheus 2.3

2 Drunken Master 1.0

3 BigLion 2.23k

4 DelphiMax 2.8

5 Asterisk 0.4b

6 Madeleine 0.2

7 Taktix 2.23k

8 WJChess 1.52

9 EnginMax 5.11c

10 KKFChess 2.6.2

11 Aice 0.64

12 Celes 0.77c

13 ChessAlex 1.2b7

14 Simontacchi 1.81a

15 Silke 1.2.1209

16 Alfil v403.1

17 Polar Engine 1.3

18 Gaia 1.1

19 Piranha 0.5

20 Eagle 0.2.7c

21 FUSC# v1.10

22 Cassandre 0.24

23 Trex 1.8.5

www.uciengines.de

april 2005

Page 7: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Project group

homepage http://page.mi.fu-berlin.de/~fusch/

membership all students (even from other universities) are invited to participate, a mailing list is used for co-ordination

some pictures

Maro Bader, Andre Rauschenbach, Johannes Buchner, Andreas Gropp, Christian Düster (HU), Falko Krause, Christian Ehrlich, Ben-Fillippo Krippendorff und Marco Block

april 2005

Page 8: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Project group

developing enviroment:

- MS Visual Studio 2003

-.NET V1.1

- CVS

april 2005

Page 9: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Inside the chess engine

board representation

010011011001 ...

move generation

wn

evaluation

materialZentrierung der Figurenoffene Linienoffene DiagonalenLäuferpaarVorpostenFianchettierungRochadeEntwicklung ...

opening book

Zugwahlalgorithmen

...

april 2005

Page 10: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

FUSc# board represenation

Schachprogrammier AG april 2005

Page 11: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1

0 0 0 0 0 0 0 0

the board as bitboard

011100 ... 00

111000 ... 00

1 =

64 BIT-word

+ very fast and efficient move generation+ evaluation parameters can easily be translated in matrices of bitboards (e.g. king safety)

- no „official“ standards

BitBoards

Schachprogrammier AG april 2005

Page 12: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

BitBoards

example:

knightmoves[d3] AND opponent-pieces 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00101000 00000000 00000000 01000100 & 00000000 => 00000000 000X0000 00000000 000X0000 01000100 11111111 01000100 00101000 00000000 00000000

concretly:• idea: compute all possible

knight moves from field d3 and save them in a bitboard

• „knightmoves[d3] AND emptyFields“

• enhanchement: „ knightmoves[d3] AND opponentPieces“ generates capturing moves

• problem: the (simple) bitboard representation is limited to non-sliding pieces like knight, king etc.

april 2005

Page 13: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Rotated BitBoards

• idea 1: compute the moves for sliding pieces depending on the relevant line/diagonal in advance

• Idee 2: saving flipped representations of the board as „rotated bitboards“ in order for the lines/diagonals to be located „sequentially“ in one single byte

#7 #6 #5 #4 #3 #2 #1 #0 Bit/Byte

a8 a7 a6 a5 a4 a3 a2 a1 #7

b8 b7 b6 b5 b4 b3 b2 b1 #6

c8 c7 c6 c5 c4 c3 c2 c1 #5

d8 d7 d6 d5 d4 d3 d2 d1 #4

e8 e7 e6 e5 e4 e3 e2 e1 #3

f8 f7 f6 f5 f4 f3 f2 f1 #2

g8 g7 g6 g5 g4 g3 g2 g1 #1

h8 h7 h6 h5 h4 h3 h2 h1 #0

Flipped board (90° to the right)

april 2005

Page 14: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Bitboards

Schachprogrammier AG april 2005

// WHITE PAWNS (captures right)tos = ( (board.pawns & NOT_RIGHT_EDGE & from_squares) << 9) & board.b_occ

froms = tos >> 9;while (from = GET_LSB(froms)){

board.w_attacks |= from; movelist[movenr].from = from;

movelist[movenr].to = GET_LSB(tos); movelist[movenr].det.ll = 0;

movelist[movenr].det.ail.piece = PAWN;movelist[movenr].det.ail.flags |= NORMAL_CAPTURE;movenr++;CLEAR_LSB(tos);CLEAR_LSB(froms);

};

Generating pawn captures

Page 15: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Bitboards

Schachprogrammier AG april 2005

// WHITE KNIGHTfroms = board.knights & from_squares;while (from = GET_LSB(froms)){

from_nr = get_LSB_nr(from);tos = knight_moves[from_nr] & to_squares;while (to = GET_LSB(tos)){

board.w_attacks |= from;movelist[movenr].from = from;movelist[movenr].to = to;

movelist[movenr].det.ll = 0;movelist[movenr].det.ail.piece = KNIGHT;movelist[movenr].det.ail.from_nr = from_nr;if (board.b_occ & to) movelist[movenr].det.ail.flags |=

NORMAL_CAPTURE;movenr++;CLEAR_LSB(tos);

}; CLEAR_LSB(froms);};

Generating knight moves

Page 16: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Bitboards

Schachprogrammier AG april 2005

// WHITE ROOKfroms = board.rooks & from_squares;while (from = GET_LSB(froms)) {

from_nr = get_LSB_nr(from);rank_pattern = board.occ.byte[from_nr >> 3];file_pattern = board.occ_l90.byte[l90_to_normal[from_nr] >> 3];tos = (rank_moves[from_nr][rank_pattern] |

file_moves[from_nr][file_pattern]) & to_squares;while (to = GET_LSB(tos)) {

board.w_attacks |= from;movelist[movenr].from = from;movelist[movenr].to = to;

movelist[movenr].det.ll = 0;movelist[movenr].det.ail.piece = ROOK;movelist[movenr].det.ail.from_nr = from_nr;if (board.b_occ & to) movelist[movenr].det.ail.flags |=

NORMAL_CAPTURE;movenr++;CLEAR_LSB(tos);

}; CLEAR_LSB(froms);};

Generating rook moves

Page 17: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

Research ideas

planning in computer chess prefer moves that correspond to a strategic plan

application of neuronal networks prediction of moves, evaluation => development of plans

reinforcement learning recalibration of the evaluation vector => learning of plans

FUSc# goes linux and 64bit porting to linux with mono, optimizing for AMD64

FUSc# goes pocket pc porting to .NET compact edition

april 2005

Page 18: AG Schachprogrammierung FUSC# april 2005 FUSC# project group d4c4 a5a6 30%50% 40%20% e4 60%

Schachprogrammier AG

The end

thanks for listening ...

april 2005


Recommended