OliPerft with divide Option as Pre Version for OliThink 5

Discussion of chess software programming and technical issues.

Moderator: Ras

OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

OliPerft with divide Option as Pre Version for OliThink 5

Post by OliverBr »

New Features:

Magic Move Bitboard (Got rid off rotated Bitboards)
No piece list, no Array[64] board, just plain bitboard
Simple, easy and short code
One symmetric "doMove" function for doMove and undoMove
Includes "divide" option for debugging
Counts 100 Millions of Moves/second (on a 64bit System 200 Millions)

Link: http://home.arcor.de/dreamlike/chess/index.html

Examples:

oliperft 7 "r3k2r/p6p/8/8/8/8/P6P/R3K2R w - - 0 1"
r . . . k . . r
p . . . . . . p
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
P . . . . . . P
R . . . K . . R

1:14:14
2:192:206
3:3466:3672
4:60120:63792
5:1223784:1287576
6:24161970:25449546
7:528388659:553838205

Nodes: 553838205 ms: 1992 knps: 278031


oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq"
r . . . k . . r
p . p p q p b .
b n . . p n p .
. . . P N . . .
. p . . P . . .
. . N . . Q . p
P P P B B P P P
R . . . K . . R

1:48:48
2:2039:2087
3:97862:99949
4:4085603:4185552
5:193690690:197876242
6:8031647685:8229523927

Nodes: 8229523927 ms: 50456 knps: 163102
OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: OliPerft with divide Option as Pre Version for OliThink

Post by OliverBr »

The last command should be

"oliperft 6 "r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq -"

with "-" at the end. If an admin may correct this.
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: OliPerft with divide Option as Pre Version for OliThink

Post by Aleks Peshkov »

Sorry, counting hashed transpositions as generated nodes make your fantastic NPS factor meaningless and uncomparable.
OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: OliPerft with divide Option as Pre Version for OliThink

Post by OliverBr »

The second position of my first post is still computed with more than 70 millions of moves per second without any hash. Furthermore I use a very simple hash that becomes considerable in only quite empty boards.

Without hash:
Nodes: 8229523927 ms: 112118 knps: 73423

With hash:
Nodes: 8229523927 ms: 50456 knps: 163102
Dann Corbit
Posts: 12777
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: OliPerft with divide Option as Pre Version for OliThink

Post by Dann Corbit »

Aleks Peshkov wrote:Sorry, counting hashed transpositions as generated nodes make your fantastic NPS factor meaningless and uncomparable.
Why? A hashed node could be used in exactly the same way as a generated node (provided that enough information is stored in the hash table to reproduce the node perfectly). It is simply a smarter form of generation.
OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: OliPerft with divide Option as Pre Version for OliThink

Post by OliverBr »

Dann Corbit wrote:
Aleks Peshkov wrote:Sorry, counting hashed transpositions as generated nodes make your fantastic NPS factor meaningless and uncomparable.
Why? A hashed node could be used in exactly the same way as a generated node (provided that enough information is stored in the hash table to reproduce the node perfectly). It is simply a smarter form of generation.
And you can achieve a quite high performance with hash ;)

#oliperft 9 "r4k3///////6RK w - -"
r . . . . k . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . R K

1:15:15
2:198:213
3:3012:3225
4:45604:48829
5:699821:748650
6:11151022:11899672
7:173465634:185365306
8:2829766981:3015132287
9:44738651543:47753783830

Nodes: 47753783830 ms: 3126 knps: 15276322
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: OliPerft with divide Option as Pre Version for OliThink

Post by Michael Sherwin »

Glad your back! :D
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through
OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: OliPerft with divide Option as Pre Version for OliThink

Post by OliverBr »

Michael Sherwin wrote:Glad your back! :D
Thanks... I case you someone is interested: OliThink 5 beta is already playing some chess. Evaluation just consists of material + mobility (which is held quite simple, because the magic moves hash contains some mobility information). There is no need to do some trick like to hold the queen back in the beginning as the search depth is already big enough so that is automatic.

Due to missing good selective extension, pawn structure and sophicisted stuff like nullmoves the game isn't so strong yet. But it is strong enough to win against gnuchess sometimes.

Here a game, where the evalution for mobility can be seen very well.

[Event "Computer chess game"]
[Site "TARN"]
[Date "2007.12.30"]
[Round "-"]
[White "olithink"]
[Black "GNUChess"]
[Result "1-0"]
[TimeControl "40/60"]

1. Nc3 c6 2. Nf3 d5 3. d4 Nf6 4. Bf4 Nh5 5. e3 Nxf4 6. exf4 Qb6 7. Na4 Qc7
8. g3 e6 9. Nc3 Qb6 10. a3 Be7 11. Na4 Qa5+ 12. c3 Nd7 13. b4 Qc7 14. h4 b5
15. Nc5 Nxc5 16. bxc5 Qa5 17. Kd2 O-O 18. a4 b4 19. cxb4 Qxb4+ 20. Ke3 g6
21. Bd3 Bf6 22. a5 Bd7 23. Qc2 Qb7 24. a6 Qc7 25. h5 Be8 26. Rab1 Rb8 27.
Rxb8 Qxb8 28. Rb1 Qd8 29. h6 Qa5 30. Rb7 Qa1 31. Rxa7 Kh8 32. Rb7 Qa3 33.
a7 Qa5 34. Qb2 Kg8 35. Qb6 Qa1 36. Rb8 e5 37. dxe5 Qc1+ 38. Ke2 Qa1 39.
exf6 Qxf6 40. Qc7 Qa1 41. a8=Q Qxa8 42. Rxa8 g5 43. Qe7 g4 44. Qg5+ Kh8 45.
Qg7#
{White mates} 1-0
OliverBr
Posts: 796
Joined: Tue Dec 18, 2007 9:38 pm
Location: Munich, Germany
Full name: Dr. Oliver Brausch

Re: OliPerft with divide Option as Pre Version for OliThink

Post by OliverBr »

Another one:

[Event "Computer chess game"]
[Site "TARN"]
[Date "2007.12.30"]
[Round "-"]
[White "olithink"]
[Black "GNUChess"]
[Result "1-0"]
[TimeControl "40/60"]

1. d4 Nf6 2. Nc3 d5 3. Bf4 e6 4. e3 Bb4 5. Bd3 c5 6. dxc5 Bxc3+ 7. bxc3 Nc6
8. Bb5 Bd7 9. Bxc6 Bxc6 10. Qd4 Rg8 11. Ne2 Rc8 12. a4 g5 13. Bg3 h5 14. a5
Ne4 15. f3 Nxg3 16. hxg3 Bb5 17. Rxh5 Rc6 18. e4 Qe7 19. g4 Rxc5 20. Rh8
Rxh8 21. Qxh8+ Qf8 22. Qe5 Kd7 23. Nd4 Bc4 24. Qxg5 dxe4 25. Qf4 exf3 26.
Nxf3 Kc8 27. Kf2 Ba6 28. Qf6 Rc4 29. Kg3 Qg8 30. g5 Qe8 31. Rh1 Qb5 32.
Rh8+ Kc7 33. Ne5 Rxc3+ 34. Kh2 Qd7 35. Nxd7 Rc4 36. Ne5 Kd6 37. Nxc4+ Bxc4
38. Qf4+ Kd5 39. Rd8+ Kc5 40. Rc8+ Kd5 41. Qxc4+ Ke5 42. Rc5+ Kd6 43. Qd4+
Ke7 44. Rc7+ Ke8 45. Qh8#
{White mates} 1-0
Edsel Apostol
Posts: 803
Joined: Mon Jul 17, 2006 5:53 am
Full name: Edsel Apostol

Re: OliPerft with divide Option as Pre Version for OliThink

Post by Edsel Apostol »

Hi Oliver,

Is Olithink going to be released as open source?

What protocol do you use?

I am studying OliPerft as I want to adapt the move geneartion for my engine Twisted Logic.