Dienstag, 20. April 2010

Stockfish 1.7.1: PGO GCC 4.5 vs. ICC 11.1

Howto PGO-compile Stockfish mit GNU C++ 4.5 am Mac

Voraussetzung am Mac sind die bereits installierten Apple Developer Tools Xcode. Am einfachsten gelingt nun das Aufspielen, der gerade fertiggestellten GNU Compiler Suite 4.5, mittels MacPorts.
Da der Quellcode erst lokal übersetzt wird und diverse Abhängigkeiten vorher berücksichtigt werden müssen, dauert der ganze Vorgang leider eine gefühlte Ewigkeit. Wenn alles fertig installiert ist, dann das vorhandene Makefile von Stockfish 1.7.1 um nachfolgende Zeilen ergänzen. Zum Abschluß noch im Terminal "make osx-profile" eingeben. Fertig ist das GNU C++ 4.5 Profile-Guided Optimization (PGO) Kompilat von Stockfish 1.7.1.

Ergänzungen zum Original Stockfish Makefile:
osx-pgo-gen:
$(MAKE) \
CXX='g++-mp-4.5' \
CXXFLAGS="$(GCCFLAGS)" \
CXXFLAGS+='-march=core2 -msse3 -m64 -fprofile-generate' \
LDFLAGS+='-march=core2 -msse3 -m64 -fprofile-generate' \
all

osx-pgo-use:
$(MAKE) \
CXX='g++-mp-4.5' \
CXXFLAGS="$(GCCFLAGS)" \
CXXFLAGS+='-march=core2 -msse3 -m64 -fprofile-use' \
LDFLAGS+='-march=core2 -msse3 -m64 -fprofile-use' \
all

osx-profile:
@touch *.cpp *.h
$(MAKE) osx-pgo-gen
@echo ""
@echo "Running benchmark for pgo-build ..."
@$(PGOBENCH) > /dev/null
@echo "Benchmark finished. Build final executable now ..."
@echo ""
@touch *.cpp *.h
$(MAKE) osx-pgo-use
@rm -f *.o *.gcda bench.txt

Benchmark:

Unter SCID 4.2.2 Analyse der Grundstellung nach 1.f3 mit 1 Thread, 256 MB Hash, C2D 2.4 GHz unter Mac OS X 10.5.8.

GNU C++ 4.5.0, 64 Bit, PGO
22 -0.80 1.... e5 2.Sc3 Sc6 3.e3 Sf6 4.d4 d5 5.Lb5 Ld6 6.Sge2 O-O 7.O-O Se7 8.dxe5 Lxe5 9.Ld2 c6 10.Ld3 Te8 11.a3 Sf5 12.Lxf5 Lxf5 13.Sd4 Ld7 (86.10)
23 -0.64 1.... e5 2.Sc3 Sf6 3.d4 exd4 4.Dxd4 Sc6 5.Df2 Ld6 6.e4 O-O 7.Le3 Kh8 8.O-O-O (106.95)

Intel C++ 11.1, 64 Bit, PGO
22 -0.80 1.... e5 2.Sc3 Sc6 3.e3 Sf6 4.d4 d5 5.Lb5 Ld6 6.Sge2 O-O 7.O-O Se7 8.dxe5 Lxe5 9.Ld2 c6 10.Ld3 Te8 11.a3 Sf5 12.Lxf5 Lxf5 13.Sd4 Ld7 (88.11)
23 -0.64 1.... e5 2.Sc3 Sf6 3.d4 exd4 4.Dxd4 Sc6 5.Df2 Ld6 6.e4 O-O 7.Le3 Kh8 8.O-O-O (109.39)


Interner Benchmark von Stockfish 1.7.1:

GNU C++ 4.0.1, 64 Bit, Apple (kein PGO, nur zum Vergleich)
time ./sf171_64-g40 bench 256 1 17 default depth
===============================
Total time (ms) : 188905
Nodes searched : 141328187
Nodes/second : 748144

real 3m9.304s
user 3m5.759s
sys 0m0.763s

GNU C++ 4.5.0, 64 Bit, PGO
time ./sf171_64-g45-pgo bench 256 1 17 default depth
===============================
Total time (ms) : 160963
Nodes searched : 141328187
Nodes/second : 878016

real 2m41.195s
user 2m37.314s
sys 0m0.727s

Intel C++ 11.1, 64 Bit, PGO
time ./sf171_64-i11-pgo bench 256 1 17 default depth
===============================
Total time (ms) : 163340
Nodes searched : 141328187
Nodes/second : 865239

real 2m43.533s
user 2m39.729s
sys 0m0.811s

Donnerstag, 15. April 2010

∆25 Top 25 @ 1 CPU & 32 Bit


_# Schachengine__________Bewertung 2T 64 Typ
---------------------------------------------
_1 Firebird 1.2 _________♔♖♙♙__ Free
_2 Rybka 3_______________♔♖♙♙__
__ Stockfish 1.7.1_______♔♖♙♙__ Src
_4 Naum 4.2______________♔♖♙♙__
_5 Shredder 12___________♔♖♙♙♙__
_6 Deep Fritz 12_________♔♗♗♗__
_7 Komodo 1.0____________♔♗♗♗♙__ Free
__ Thinker 5.4D Inert____♔♗♗♗♙__ Free
_9 Critter 0.60__________♔♗♗__ Free
__ Protector 1.3.4_______♔♗♗__ Src
11 Grapefruit 1.0b_______♔♗♗♙__ Src
__ Hiarcs 12.1___________♔♗♗__
__ Junior 11.1a__________♔♗♗♙__
__ Onno 1.2.2b___________♔♗♗♙__
__ Sjeng WC 2008_________♔♗♗♙__
__ Spark 0.3a____________♔♗♗♙__ Free
__ Zappa Mexico II_______♔♗♗♙__
18 Ktulu 9.0_____________♔♗♗♙♙__
__ Loop 13.6_____________♔♗♗♙♙__
20 Bison 9.11 ___________♔♗♙♗__ Src
__ SmarThink 1.20________♔♗♙♗__
__ Spike 1.2 Turin_______♔♗♙♗__ Free
__ TwistedLogic 20100131 ♔♗♙♗__ Free
24 Chess Tiger 2007.1____♔♗♙♗__
__ Daydreamer 1.75_______♔♗♙♗__ Src
------------ Ex TOP -------------
26 Crafty 23.2___________♔♗♙♗♘__ Src
__ Frenzee Feb08_________♔♗♙♗♘__♘ ♘ Free
__ Scorpio 2.5___________♔♗♙♗♘__ Src
---------------------------------
-> Fruit 2.1_____________♔♗♙♗♙_ Bezugspunkt, Src
------------ OLDIES -------------
xx Colossus 2008b________♔♗♙♙__Free
xx Pro Deo 1.6___________♔♗♙♙__Free
xx The King 3.50_________♔♗♙♙
xx Ruffian 2.1.0_________♔♗♙♙
xx Gandalf 6.01__________♔♗♙♙
xx LG Evolution__________♔♙♗♗__Free
xx Fritz 5.32____________♔♙♗♗
xx Nimzo 8_______________♔♙♗♗
xx Yace Paderborn________♔♙♗♗__Free
xx Pepito 1.59___________♔♙♗♗♙__Src
xx Genius 7______________♔♙♗♙
xx Phalanx XXII__________♔♙♗♙♙__Src
xx GNU Chess 5.07________♔♙♙♗♙__Src
xx Beowulf 2.4___________♔♙♙♙♙__Src
xx TASC R30______________♔♙♙♙♙__Schachcomputer

Bewertung:
3000 ♙♙♙
_____________________ = nicht vorhanden
2900 ♔♙♙♙ ______________________0 (±10)
2800 ♔♙♙♙ _____________________ 25 (±10)
2700 ♔♗♗♗_____________________ 50 (±10)
2600 ♔♗♗♙_____________________ 75 (±10)
2500 ♔♗♙♗
2400 ♔♗♙♙
2300 ♔♙♗♗
2200 ♔♙♗♙
2100 ♔♙♙♗
2075 ♔♙♙♙
2050 ♔♙♙♙
2025 ♔♙♙♙
2000 ♔♙♙♙

Anmerkung:
- nur eine Engine pro Autor bzw. Typ

- alphabetische Sortierung im ∆25-Bereich (±10)
- Src = Sourcecode verfügbar
- Free = Freeware
- 2T = Steigerung durch 2 Threads (CPUs)
- 64 = Steigerung durch 64 Bit Version

! Unicode Zeichensatz zur korrekten Anzeige erforderlich !

Montag, 5. April 2010

Mephisto IV - µ-Max 4.8

Wissen hilft: µ-Max 4.8 rechnet über 5 Halbzüge tiefer, aber Ed Schröders Mephisto MM IV weiß einfach, dass ein Springer allein nicht zum Mattsetzen genügt. Darum "opfert" er im 65. Zug seinen Läufer für die beiden Bauern.

Der Emulator für einige alte Mephisto Schachcomputer kann von Ed Schröders Homepage geladen werden.


[Event "Blitz:10'/Spiel"]
[Site "2/Plan"]
[Date "2010.04.05"]
[Round "1"]
[White "Mephisto MM IV, C2D 2.4GHz"]
[Black "micro-Max 4.8, C2D 2.4GHz"]
[Result "1/2-1/2"]
[ECO "C81"]
[Annotator "0.19;-0.13"]
[PlyCount "131"]
[TimeControl "600"]

{W=7.8 ply; 0kN/s B=13.2 ply; 768kN/s}
1. e4 {0.01/1 0} e5 {B/0 0} 2. Nf3 {0.01/1 1} Nc6 {B/0 0}
3. Bb5 {0.01/1 1} a6 {B/0 0} 4. Ba4 {0.01/1 1} Nf6 {B/0 0}
5. O-O {0.01/1 2} Nxe4 {B/0 0} 6. d4 {0.01/1 2} b5 {B/0 0}
7. Bb3 {0.01/1 2} d5 {B/0 0} 8. dxe5 {0.01/1 2} Be6 {B/0 0}
9. Qe2 {0.01/1 2} Be7 {-0.13/9 12} 10. Rd1 {0.01/1 1} O-O {-0.04/9 21}
11. c4 {0.01/1 1} bxc4 {0.18/10 8} 12. Bxc4 {0.01/1 1} Bc5 {0.14/10 14}
13. Be3 {0.01/1 1} Bxe3 {0.16/10 15} 14. Qxe3 {0.01/1 1} Qb8 {0.04/9 7}
15. Bb3 {0.01/1 1} h6 {0.25/10 18} 16. Nc3 {0.19/6 18} Nxc3 {0.18/11 8}
17. Qxc3 {0.29/7 16} Ne7 {0.42/11 9} 18. Nd4 {0.25/7 16} Qb6 {(Lg4) 0.38/10 7}
19. Rac1 {0.36/7 15} Ra7 {(Tfc8) 0.41/11 7} 20. Qc5 {0.39/7 15} Qxc5 {0.41/13 14}
21. Rxc5 {0.49/8 14} Rb8 {(Tb7) 0.42/11 8} 22. Rdc1 {0.52/6 14} Rbb7 {(Tc8) 0.46/11 6}
23. R1c2 {0.58/7 13} a5 {(Kh8) 0.44/11 6} 24. Nxe6 {0.49/7 13} fxe6 {0.46/13 13}
25. Ba4 {0.03/8 13} Ng6 {0.55/13 8} 26. Bd7 {0.03/7 12} Nf8 {(Tb6) 0.50/13 7}
27. Bc6 {0.34/7 12} Rb4 {0.40/13 6} 28. g3 {0.20/7 12} Rd4 {(g5) 0.41/11 7}
29. Kg2 {0.42/7 11} g5 {(Td1) 0.53/11 8} 30. b3 {0.33/6 11} Rb4 {(Sg6) 0.44/13 9}
31. R2c3 {0.33/7 11} Rb6 {(Sg6) 0.41/11 6} 32. f4 {0.48/7 10} gxf4 {0.12/12 5}
33. gxf4 {0.49/7 10} Ng6 {0.12/12 7} 34. Kg3 {0.43/7 10} Ne7 {(Tb4) 0.42/11 5}
35. Bb5 {0.47/7 10} Nf5+ {(Kf7) 0.30/11 6} 36. Kg4 {0.58/7 9} c6 {(d4) 0.40/11 9}
37. Bd3 {0.46/7 9} Nd4 {0.23/11 8} 38. Kh5 {0.44/7 9} a4 {(Kg7) 0.42/12 11}
39. Kxh6 {0.62/7 8} axb3 {0.50/11 5} 40. axb3 {0.58/7 8} Rf7 {0.39/12 10}
41. Kg5 {0.87/7 8} Nf3+ {(Tc7) 0.46/11 5} 42. Kg4 {0.95/7 8} Nd4 {0.47/11 5}
43. h4 {0.81/7 8} Rb4 {(Tg7+) 0.35/12 7} 44. Kg3 {0.63/7 7} Rg7+ {0.19/11 4}
45. Kh3 {0.27/7 7} Ra7 {(Tf7) 0.28/12 4} 46. Bf1 {0.60/6 7} Nf5 {(Tf7) 0.19/11 4}
47. Rf3 {0.68/7 7} Rh7 {0.27/12 4} 48. Rxc6 {0.10/7 7} Rxh4+ {0.09/12 5}
49. Kg2 {0.10/8 6} Rg4+ {0.27/11 4} 50. Kh2 {0.08/7 6} Rgxf4 {(Kf7) 0.39/12 5}
51. Rxf4 {0.16/7 6} Rxf4 {0.29/13 4} 52. Bd3 {0.03/7 6} Nd4 {(Kf7) -0.24/14 5}
53. Rb6 {-0.06/7 6} Rf3 {(Tf2+) -0.38/15 5} 54. Rb8+ {-0.79/9 6} Kg7 {-0.41/17 4}
55. Rb7+ {-0.86/8 5} Kh6 {-0.36/16 6} 56. Rh7+ {-1.13/8 5} Kg5 {-0.40/19 5}
57. Rh3 {-1.21/8 5} Rxh3+ {(Kg4) -1.02/19 5} 58. Kxh3 {-1.75/10 5} Nxb3 {-1.06/17 4}
59. Kg3 {-1.92/10 5} Nc5 {(Sd4) -1.22/16 4} 60. Bc2 {-1.91/10 5} Nd7 {-1.11/17 5}
61. Kf3 {-2.01/10 4} Nxe5+ {-1.18/15 3} 62. Ke3 {-2.23/10 4} Ng4+ {(Sc4+) -1.12/14 4}
63. Kf3 {-2.24/9 4} e5 {(Sf6) -2.07/16 3} 64. Bb1 {-2.33/9 4} e4+ {(Sf6) -2.40/17 6}


























Diagramm: 8/8/8/3pp1k1/6n1/5K2/8/1B6 b - - 0 64

65. Bxe4 {-0.49/10 4} dxe4+ {(d4) -2.62/20 4} 66. Kxe4
{Remis angenommen 0.00/10 4}
1/2-1/2

Sonntag, 4. April 2010

Mephisto III S (Glasgow) - TSCP 1.81

Bei der vierten Microcomputer Schach-WM vergab die ICGA 1984 in Glasgow den Weltmeister-Titel an die vier punktgleichen Erstplatzierten. Neben Fidelity Elite, Conchess und dem Mephisto III S erhielt auch Richard Lang mit Psion seinen ersten WM Titel.

Nachfolgend eine blitzsaubere Leistung des kultigen Ex-WM Mephisto III S. Mit nur ein paar Dutzend berechneter Stellungen pro Sekunde besteht er gegen TSCP 1.81, trotz dessen über 150.000 Knoten pro Sekunde. Der 26 Jahre alte Schachcomputer wurde mittels MESS in maximaler Geschwindigkeit emuliert und als Winboard Engine in die SchachGUI eingebunden.

[Event "Blitz:10'/Spiel"]
[Site "2/Plan"]
[Date "2010.04.04"]
[Round "2"]
[White "Mephisto III S, C2D 2.4 GHz"]
[Black "TSCP 1.81, C2D 2.4 GHz"]
[Result "1-0"]
[ECO "C54"]
[Annotator "0.21;0.02"]
[PlyCount "115"]
[TimeControl "600"]

{W=4.7 ply; 0kN/s B=8.1 ply; 166kN/s}
1. e4 {0.01/1 1} e5 {B/0 0} 2. Bc4 {0.01/1 2} Nf6 {B/0 0}
3. d3 {0.01/1 2} Nc6 {B/0 0} 4. Nf3 {0.01/1 3} Bc5 {B/0 0}
5. c3 {0.01/1 3} d6 {B/0 0} 6. b4 {0.01/1 3} Bb6 {B/0 0}
7. a4 {0.01/1 4} a6 {B/0 0} 8. a5 {0.21/4 20} Ba7 {B/0 0}
9. Ng5 {0.31/4 16} d5 {(0-0) 0.02/6 20} 10. exd5 {0.48/4 16} Nxd5 {(Se7) 0.30/6 19}
11. Qf3 {0.89/3 15} Be6 {0.26/6 19} 12. Nxe6 {1.43/4 15} fxe6 {0.44/7 18}
13. O-O {1.39/4 14} Qd7 {0.38/6 17} 14. h3 {(Lb2) 1.09/4 14} O-O-O {(Df7) 0.16/6 17}
15. Qe2 {(Dg3) 1.23/3 13} Rhf8 {(Tdf8) 0.15/6 16} 16. Bg5 {1.34/4 13} Rde8 {0.11/6 16}
17. b5 {1.18/4 13} axb5 {(Sf4) 0.01/7 15} 18. Bxb5 {0.83/4 12} Rf5 {0.72/7 15}
19. Bh4 {0.92/4 12} Qd6 {(Sf4) 0.82/6 14} 20. a6 {1.12/3 12} bxa6 {(Tef8) 0.77/6 14}
21. Rxa6 {1.43/4 11} Bb6 {0.99/6 13} 22. Qe4 {(Dg4) 1.53/3 11} g5 {(g6) 1.22/6 13}
23. Bg3 {1.75/3 11} Qc5 {(Tef8) 1.22/6 12} 24. Ra8+ {2.33/3 10} Kd7 {1.22/7 12}
25. Bxc6+ {(Txe8) 2.28/5 10} Qxc6 {1.27/7 12} 26. Rxe8 {2.43/5 10} Kxe8 {1.27/7 11}
27. Bxe5 {2.31/4 10} Ne7 {1.27/6 11} 28. Qe2 {2.39/4 9} Ng6 {(Kf8) 1.30/6 10}
29. Bg3 {2.33/4 9} Nf4 {(Ke7) 1.34/6 10} 30. Bxf4 {2.48/5 9} gxf4 {1.45/7 10}
31. Re1 {(Sd2) 2.36/4 8} f3 {(Kf7) 1.02/7 9} 32. Qxe6+ {(Da2) 2.58/5 8} Qxe6 {0.84/9 9}
33. Rxe6+ {2.65/6 8} Kf7 {0.84/8 9} 34. Re4 {(Te1) 2.39/5 8} fxg2 {0.84/7 9}
35. d4 {(Kxg2) 2.37/5 7} Rg5 {(c5) 1.14/8 8} 36. Rg4 {2.71/4 7} Rb5 {(h6) 1.52/8 8}
37. Nd2 {2.62/4 7} Ba5 {(c5) 2.02/7 8} 38. Ne4 {2.84/4 7} h5 {(Tb3) 2.14/7 7}
39. Rf4+ {(Txg2) 3.03/5 7} Ke6 {2.07/7 7} 40. Kxg2 {3.20/4 7} Kd5 {(Lb6) 2.22/7 7}



























Diagramm: 8/2p5/8/br1k3p/3PNR2/2P4P/5PK1/8 w - - 0 41

41. Rf5+ {3.33/5 6} Kc6 {2.39/7 7} 42. Rxb5 {(Tf7) 3.39/5 6} Kxb5 {1.86/10 7}
43. f4 {3.39/5 6} Kc4 {3.31/10 6} 44. f5 {3.43/5 6} c6 {(Kd5) 3.25/10 6}
45. f6 {4.87/5 6} Bd8 {3.25/9 6} 46. Kf3 {(f7) 3.61/5 5} Kd5 {(c5) 3.26/9 6}
47. Kf4 {4.42/5 5} Ke6 {3.43/9 6} 48. Kg5 {4.55/6 5} Kd5 {(Kf7) 4.08/9 5}
49. Kf5 {5.73/5 5} h4 {(Kc4) 4.11/9 5} 50. Nc5 {(Sg5) 4.89/5 5} Kc4 {(Lc7) 3.86/10 5}
51. Ne6 {4.95/5 5} Bxf6 {4.51/11 5} 52. Kxf6 {5.73/7 5} Kxc3 {4.71/10 5}
53. Ke5 {(Ke7) 6.08/6 4} Kd3 {(Kb4) 4.66/10 5} 54. Nd8 {(Kd6) 6.70/5 4} Kc4 {6.17/11 4}
55. Nxc6 {6.95/7 4} Kb5 {8.98/11 4} 56. Ne7 {(d5) 6.96/6 4} Kb6 {(Kc4) 10.31/11 4}
57. Ke6 {(d5) 7.14/4 4} Kb5 {(Kc7) 9.08/10 4} 58. Nf5 {(d5) 9.67/4 4}
1-0