Post Chispa questions here

Archive of the old Parsimony forum. Some messages couldn't be restored. Limitations: Search for authors does not work, Parsimony specific formats do not work, threaded view does not work properly. Posting is disabled.

Post Chispa questions here

Postby Federico Corigliano » 06 Sep 2003, 05:42

Geschrieben von: / Posted by: Federico Corigliano at 06 September 2003 06:42:15:

I know that some parts of Chispa aren't documented, so post here all the questions that you have, and I will try to respond them.
Federico
Federico Corigliano
 

Re: Chispa questions - perft ?

Postby Reinhard Scharnagl » 06 Sep 2003, 08:24

Geschrieben von: / Posted by: Reinhard Scharnagl at 06 September 2003 09:24:25:
Als Antwort auf: / In reply to: Post Chispa questions here geschrieben von: / posted by: Federico Corigliano at 06 September 2003 06:42:15:

Hi Federico,
I know that some parts of Chispa aren't documented, so post here
all the questions that you have, and I will try to respond them.
having worked on Smirf again some days now I would like to compare
some statistic values. I saw your Chispa is using bitboards, when
my (growing) Smirf is working based on a different data structure.
a) what is about perft related numbers? (my actual figures are below,
positions from http://homepages.caverock.net.nz/%7Epeter/perft.htm)
b) which type of moves are generated? (Smirf is creating full
information moves, all are legal, knowing whether beeing a capture
or checking the opponent)
Regards, Reinhard.
--

Expanding FEN-0: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
#########################
#bR bN bB bQ bK bB bN bR#
#bP bP bP bP bP bP bP bP#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#wP wP wP wP wP wP wP wP#
#wR wN wB wQ wK wB wN wR#
#########################
Perft 1: nodes          20, (x)           0, (+)         0, time    0.016
Perft 2: nodes         400, (x)           0, (+)         0, time    0.015
Perft 3: nodes        8902, (x)          34, (+)        12, time    0.016
Perft 4: nodes      197281, (x)        1576, (+)       469, time    0.031
Perft 5: nodes     4865609, (x)       82719, (+)     27351, time    0.531
Perft 6: nodes   119060324, (x)     2812008, (+)    809099, time   12.812
Expanding FEN-1: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
#########################
#bR --    -- bK --    bR#
#bP    bP bP bQ bP bB   #
#bB bN    -- bP bN bP --#
#--    -- wP wN    --   #
#   bP    -- wP --    --#
#--    wN    -- wQ -- bP#
#wP wP wP wB wB wP wP wP#
#wR    --    wK    -- wR#
#########################
Perft 1: nodes          48, (x)           8, (+)         0, time    0.016
Perft 2: nodes        2039, (x)         351, (+)         3, time    0.016
Perft 3: nodes       97862, (x)       17102, (+)       993, time    0.015
Perft 4: nodes     4085603, (x)      757163, (+)     25523, time    0.406
Perft 5: nodes   193690690, (x)    35043416, (+)   3309887, time   17.937
Perft 6: nodes  8031647685, (x)  1558445089, (+)  92238050, time  788.390
Expanding FEN-2: 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
#########################
#   --    --    --    --#
#wP wP wP    --    -- bK#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#   --    -- wK bP bP bP#
#--    --    --    --   #
#########################
Perft 1: nodes          18, (x)           1, (+)         0, time    0.016
Perft 2: nodes         290, (x)           0, (+)        52, time    0.016
Perft 3: nodes        5044, (x)         144, (+)       310, time    0.015
Perft 4: nodes       89363, (x)         194, (+)     15360, time    0.015
Perft 5: nodes     1745545, (x)       46745, (+)    161249, time    0.172
Perft 6: nodes    34336777, (x)      406616, (+)   6021556, time    3.109
Expanding FEN-3: 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
#########################
#   --    --    --    --#
#--    bP    --    --   #
#   --    bP    --    --#
#wK wP --    --    -- bR#
#   wR    --    bP    bK#
#--    --    --    --   #
#   --    -- wP -- wP --#
#--    --    --    --   #
#########################
Perft 1: nodes          14, (x)           1, (+)         2, time    0.015
Perft 2: nodes         191, (x)          14, (+)        10, time    0.015
Perft 3: nodes        2812, (x)         209, (+)       267, time    0.016
Perft 4: nodes       43238, (x)        3348, (+)      1680, time    0.016
Perft 5: nodes      674624, (x)       52051, (+)     52950, time    0.078
Perft 6: nodes    11030083, (x)      940350, (+)    452473, time    1.063




FRC Pages (FullChess, Chess960)
Reinhard Scharnagl
 

Re: Chispa questions - perft ?

Postby jaime Benito » 06 Sep 2003, 19:14

Geschrieben von: / Posted by: jaime Benito at 06 September 2003 20:14:57:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Reinhard Scharnagl at 06 September 2003 09:24:25:
(Smirf is creating full information moves, all are legal, knowing whether beeing a capture or checking the opponent)
Hi,
If you're generating only legal moves, then there is no need for you to make/unmake them at the last ply to verify their legality, so you just count them, and return the total, right?
I'm very curious about this in terms of speed comparison.
Thanks,
Regards,
jaime Benito
 

Re: Chispa questions - perft ?

Postby Uri Blass » 06 Sep 2003, 19:31

Geschrieben von: / Posted by: Uri Blass at 06 September 2003 20:31:29:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: jaime Benito at 06 September 2003 20:14:57:
(Smirf is creating full information moves, all are legal, knowing whether beeing a capture or checking the opponent)
Hi,
If you're generating only legal moves, then there is no need for you to make/unmake them at the last ply to verify their legality, so you just count them, and return the total, right?
Right.
Same is also for movei that also calculate perft in that way and generate the same information and more than it.
Uri
Uri Blass
 

Re: Chispa questions - perft ?

Postby Reinhard Scharnagl » 06 Sep 2003, 20:55

Geschrieben von: / Posted by: Reinhard Scharnagl at 06 September 2003 21:55:01:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: jaime Benito at 06 September 2003 20:14:57:

Hi,
If you're generating only legal moves, then there is no need for you to
make/unmake them at the last ply to verify their legality, so you just
count them, and return the total, right?
I'm very curious about this in terms of speed comparison.
it seems to be astonishing for me that it should matter, whether one
does the move verification task during the generation of the move or
by expanding the node later.
So it is not at all done by just counting them, you first must have
a set of legal moves.
Regards, Reinhard.
Reinhard Scharnagl
 

Re: Chispa questions - perft ?

Postby Uri Blass » 06 Sep 2003, 21:08

Geschrieben von: / Posted by: Uri Blass at 06 September 2003 22:08:59:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Reinhard Scharnagl at 06 September 2003 21:55:01:
Hi,
If you're generating only legal moves, then there is no need for you to
make/unmake them at the last ply to verify their legality, so you just
count them, and return the total, right?
I'm very curious about this in terms of speed comparison.
it seems to be astonishing for me that it should matter, whether one
does the move verification task during the generation of the move or
by expanding the node later.
So it is not at all done by just counting them, you first must have
a set of legal moves.
Regards, Reinhard.
Of course but it is faster to do it in that way because if you expand the node later you do also things that are unrelated to checking if the move is legal like updating the board structure.
If you find later that the king can be captured then you need to undo the changes in your board structure so you are slower.
Uri
Uri Blass
 

Re: Chispa questions - perft ?

Postby Reinhard Scharnagl » 07 Sep 2003, 12:18

Geschrieben von: / Posted by: Reinhard Scharnagl at 07 September 2003 13:18:51:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Uri Blass at 06 September 2003 22:08:59:

Hi Uri,
Of course but it is faster to do it in that way because if you expand
the node later you do also things that are unrelated to checking if
the move is legal like updating the board structure.
If you find later that the king can be captured then you need to undo
the changes in your board structure so you are slower.
instead of this some other tasks has to be done before.
Moreover maintaining six 64 Bit counters and performing statistical
analysis additionally consumes some time (if time would be an
interesting aspect for you).
Regards, Reinhard.
P.S.: Smirf does not use bitboards. There have been some
improvements in its move generator until now, listed below:

Using FEN-0: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
#########################
#bR bN bB bQ bK bB bN bR#
#bP bP bP bP bP bP bP bP#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#wP wP wP wP wP wP wP wP#
#wR wN wB wQ wK wB wN wR#
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          20          0          0         0        0       0      0.015
[2]         400          0          0         0        0       0      0.016
[3]        8902         34          0        12        0       0      0.016
[4]      197281       1576          0       469        0       0      0.032
[5]     4865609      82719          0     27351        0     258      0.438
Using FEN-1: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
#########################
#bR --    -- bK --    bR#
#bP    bP bP bQ bP bB   #
#bB bN    -- bP bN bP --#
#--    -- wP wN    --   #
#   bP    -- wP --    --#
#--    wN    -- wQ -- bP#
#wP wP wP wB wB wP wP wP#
#wR    --    wK    -- wR#
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          48          8          2         0        0       0      0.016
[2]        2039        351         91         3        0       1      0.015
[3]       97862      17102       3162       993        0      45      0.016
[4]     4085603     757163     128013     25523    15172    1929      0.375
[5]   193690690   35043416    4993637   3309887     8392   73365     16.640
Using FEN-2: 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
#########################
#   --    --    --    --#
#wP wP wP    --    -- bK#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#   --    -- wK bP bP bP#
#--    --    --    --   #
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          18          1          0         0       12       0      0.016
[2]         290          0          0        52      212       0      0.016
[3]        5044        144          0       310     2232       0      0.015
[4]       89363        194          0     15360    42120       0      0.015
[5]     1745545      46745          0    161249   544556       0      0.172
Using FEN-3: 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
#########################
#   --    --    --    --#
#--    bP    --    --   #
#   --    bP    --    --#
#wK wP --    --    -- bR#
#   wR    --    bP    bK#
#--    --    --    --   #
#   --    -- wP -- wP --#
#--    --    --    --   #
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          14          1          0         2        0       0      0.015
[2]         191         14          0        10        0       0      0.015
[3]        2812        209          0       267        0       2      0.016
[4]       43238       3348          0      1680        0     123      0.016
[5]      674624      52051          0     52950        0    1165      0.062
Reinhard Scharnagl
 

Re: Chispa questions - perft ?

Postby Uri Blass » 07 Sep 2003, 13:10

Geschrieben von: / Posted by: Uri Blass at 07 September 2003 14:10:27:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Reinhard Scharnagl at 07 September 2003 13:18:51:
Hi Uri,
Of course but it is faster to do it in that way because if you expand
the node later you do also things that are unrelated to checking if
the move is legal like updating the board structure.
If you find later that the king can be captured then you need to undo
the changes in your board structure so you are slower.
instead of this some other tasks has to be done before.
Moreover maintaining six 64 Bit counters and performing statistical
analysis additionally consumes some time (if time would be an
interesting aspect for you).
Regards, Reinhard.
P.S.: Smirf does not use bitboards. There have been some
improvements in its move generator until now, listed below:

Using FEN-0: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
#########################
#bR bN bB bQ bK bB bN bR#
#bP bP bP bP bP bP bP bP#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#wP wP wP wP wP wP wP wP#
#wR wN wB wQ wK wB wN wR#
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          20          0          0         0        0       0      0.015
[2]         400          0          0         0        0       0      0.016
[3]        8902         34          0        12        0       0      0.016
[4]      197281       1576          0       469        0       0      0.032
[5]     4865609      82719          0     27351        0     258      0.438
Using FEN-1: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq - 0 1
#########################
#bR --    -- bK --    bR#
#bP    bP bP bQ bP bB   #
#bB bN    -- bP bN bP --#
#--    -- wP wN    --   #
#   bP    -- wP --    --#
#--    wN    -- wQ -- bP#
#wP wP wP wB wB wP wP wP#
#wR    --    wK    -- wR#
#########################
Perft     Nodes        (x)     Castl.       (+)    Prom.  (e.p.)       Time
[1]          48          8          2         0        0       0      0.016
[2]        2039        351         91         3        0       1      0.015
[3]       97862      17102       3162       993        0      45      0.016
[4]     4085603     757163     128013     25523    15172    1929      0.375
[5]   193690690   35043416    4993637   3309887     8392   73365     16.640
Note that I cannot compare times with movei because I do not know the
hardware that you use.
You can try to download public movei that also can calculate perft but does not give you statistics.
I did improvements in the speed of my move generator but my latest version is again slower because I changed my makemove function to be slower when my generate move is faster.
I can modify movei to give the statistics but it is not important for me at this point.
Uri
Uri Blass
 

Re: Chispa questions - perft ?

Postby Reinhard Scharnagl » 07 Sep 2003, 13:52

Geschrieben von: / Posted by: Reinhard Scharnagl at 07 September 2003 14:52:53:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Uri Blass at 07 September 2003 14:10:27:

Hi Uri,
Note that I cannot compare times with movei because I do not know the
hardware that you use.
You can try to download public movei that also can calculate perft but does
not give you statistics.
I can modify movei to give the statistics but it is not
important for me at this point.
my hardware uses an AMD Athlon XP 1800+.
I temporarly have changed my Perft to the following form, which will
skip most statistics but instead move executes the leave nodes too:

  void _R CBase::Perft(int n)
  {
    if (n <= 0) {
      if (++PZaeZug >= 1000000000) {
        PZaeZug -= 1000000000&#59;
        ++PZaeZugBig&#59;
      }
      return&#59;
    }
    CBase::Genese()&#59;
    --n&#59;
    for (TGenZug *pTG = CBase::GenBufferLimit&#59;
      --pTG >= CBase::Ply->Zuege&#59; ) {
          CBase::DoMove(pTG->Zug)&#59;
          Perft(n)&#59;
          CBase::UnMove()&#59;
    }
  }

I hope for that, you can use following data much better.
Regards, Reinhard.

Using FEN-0: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
#########################
#bR bN bB bQ bK bB bN bR#
#bP bP bP bP bP bP bP bP#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#wP wP wP wP wP wP wP wP#
#wR wN wB wQ wK wB wN wR#
#########################
Perft     Nodes                                                        Time
[1]          20          0          0         0        0       0      0.016
[2]         400          0          0         0        0       0      0.016
[3]        8902          0          0         0        0       0      0.016
[4]      197281          0          0         0        0       0      0.031
[5]     4865609          0          0         0        0       0      0.671
Using FEN-1: r3k2r/p1ppqpb1/bn2pnp1/3PN3/1p2P3/2N2Q1p/PPPBBPPP/R3K2R w KQkq
1
#########################
#bR --    -- bK --    bR#
#bP    bP bP bQ bP bB   #
#bB bN    -- bP bN bP --#
#--    -- wP wN    --   #
#   bP    -- wP --    --#
#--    wN    -- wQ -- bP#
#wP wP wP wB wB wP wP wP#
#wR    --    wK    -- wR#
#########################
Perft     Nodes                                                        Time
[1]          48          0          0         0        0       0      0.016
[2]        2039          0          0         0        0       0      0.016
[3]       97862          0          0         0        0       0      0.015
[4]     4085603          0          0         0        0       0      0.594
[5]   193690690          0          0         0        0       0     26.703
Using FEN-2: 8/PPP4k/8/8/8/8/4Kppp/8 w - - 0 1
#########################
#   --    --    --    --#
#wP wP wP    --    -- bK#
#   --    --    --    --#
#--    --    --    --   #
#   --    --    --    --#
#--    --    --    --   #
#   --    -- wK bP bP bP#
#--    --    --    --   #
#########################
Perft     Nodes                                                        Time
[1]          18          0          0         0        0       0      0.016
[2]         290          0          0         0        0       0      0.016
[3]        5044          0          0         0        0       0      0.016
[4]       89363          0          0         0        0       0      0.015
[5]     1745545          0          0         0        0       0      0.281
Using FEN-3: 8/2p5/3p4/KP5r/1R3p1k/8/4P1P1/8 w - -
#########################
#   --    --    --    --#
#--    bP    --    --   #
#   --    bP    --    --#
#wK wP --    --    -- bR#
#   wR    --    bP    bK#
#--    --    --    --   #
#   --    -- wP -- wP --#
#--    --    --    --   #
#########################
Perft     Nodes                                                        Time
[1]          14          0          0         0        0       0      0.015
[2]         191          0          0         0        0       0      0.016
[3]        2812          0          0         0        0       0      0.016
[4]       43238          0          0         0        0       0      0.015
[5]      674624          0          0         0        0       0      0.109
Reinhard Scharnagl
 

Re: Chispa questions - perft ?

Postby Uri Blass » 07 Sep 2003, 14:14

Geschrieben von: / Posted by: Uri Blass at 07 September 2003 15:14:08:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Reinhard Scharnagl at 07 September 2003 14:52:53:
Hi Uri,
Note that I cannot compare times with movei because I do not know the
hardware that you use.
You can try to download public movei that also can calculate perft but does
not give you statistics.
my hardware uses an AMD Athlon XP 1800+.
I temporarly have changed my Perft to the following form, which will
skip most statistics but instead move executes the leave nodes too:
I see that it is slower than previous perft.
I explained that most people execute the leave nodes when they calculate perft but I do not do need to do it like you.
If you force me to execute the last move then you are faster than me
because for me makemove is expensive because I caluclate in makemove a lot of information that are used also for faster move generation but may be used in the future for other purposes(for example for fast evaluation of trapped piece)
If I can calculate fast the squares that a piece can goto then it means that I can calculate faster if it is trapped(today I do not do it in movei but I may do it in the future).
Note that today inspite of the fact that I do not make the last move, for me most of the time of perft is spent in makemove and unmake move and not in generating moves.
Uri
Uri Blass
 

Re: Chispa questions - perft ?

Postby Reinhard Scharnagl » 07 Sep 2003, 14:38

Geschrieben von: / Posted by: Reinhard Scharnagl at 07 September 2003 15:38:50:
Als Antwort auf: / In reply to: Re: Chispa questions - perft ? geschrieben von: / posted by: Uri Blass at 07 September 2003 15:14:08:

Hi Uri,
I see that it is slower than previous perft.
I explained that most people execute the leave nodes when
they calculate perft but I do not do need to do it like you.
If you force me to execute the last move then you are faster than me
because for me makemove is expensive because I caluclate in makemove
a lot of information that are used also for faster move generation
but may be used in the future for other purposes(for example for
fast evaluation of trapped piece)
If I can calculate fast the squares that a piece can goto then it
means that I can calculate faster if it is trapped (today I do not
do it in movei but I may do it in the future).
Note that today inspite of the fact that I do not make the last
move, for me most of the time of perft is spent in makemove and
unmake move and not in generating moves.
that is obviously. But notice, that you compare now data from a
generator of 'full informed moves' to data of a more conventional
generator.
One benefit of full informed moves I hope to be are much less
expansions and move executes. An example of this is the ability
not to move execute last ply in Perft and nevertheless having
all data needed to create such statistics.
For that I will modify my Perft constantly, but its results
will lead to misinterpretations, when the reader would not be
aware, that Smirf is producing only 'full informed moves'.
I plan to spend more effort in completing an universal evaluating
routine, *NOT* specialized for openings, middle- end endgame.
My DoMove() and UnMove() surely will need more time in a while.
That is different in Smirf, because of the type of the created moves.
Reinhard.
Reinhard Scharnagl
 


Return to Archive (Old Parsimony Forum)

Who is online

Users browsing this forum: No registered users and 31 guests