Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> General Discussion >> Statistic wanted: Average pieces remaining
(Message started by: Fritzlein on Nov 29th, 2004, 5:17pm)

Title: Statistic wanted: Average pieces remaining
Post by Fritzlein on Nov 29th, 2004, 5:17pm
I would like a statistic to include in the Wikipedia article on Arimaa as a way of constrasting it to chess.  What is the average number of pieces left on the board when the game ends?  More specifically, what is the average number of pieces left for the winning side, and what is the average number of pieces left for the losing side?

If someone could extract this from the database, I'd be much obliged.

Title: Re: Statistic wanted: Average pieces remaining
Post by omar on Dec 5th, 2004, 6:13pm
Wow, that's not going to be easy to calculate without writting some kind of program.

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 5th, 2004, 7:17pm
Yeah, it looked like a programming problem to me, which is why I posted asking for help.  What I want to claim in the Wikipedia article is that Arimaa is usually decided with fewer captures than in chess.  So even if I had the statistic I wanted, I would then have to go find a database of chess games to compare it to, or else I couldn't prove that chess trades down more.  Oh, well.

Title: Re: Statistic wanted: Average pieces remaining
Post by 99of9 on Dec 6th, 2004, 7:25pm
I'll do it sometime if nobody beats me to it.  It's not too hard to count x's in omar's files and divide by the number of games. :-)

However I don't think your idea is necessarily correct.  Arimaa is often decided far earlier than checkmate is reached.  But nowadays chess games are often decided after 17 moves with only one or two capture ;-).  How do you propose to account for these chess mutual draws?

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 6th, 2004, 10:37pm
maybe not the best code, but I love quick and dirty stuff in MS-Excel

after you loaded a textfile in Excel use the following VB-Code:

not perfekt, but its late ;-)


Option Explicit

Sub Counter()
   Dim Row                         As Integer
   Const Column_MoveList           As Integer = 24
   Const Column_LeftPieces_w       As Integer = 26
   Const Column_LeftPieces_b       As Integer = 27
   Const Column_LeftRabbits_w      As Integer = 28
   Const Column_LeftRabbits_b      As Integer = 29
   Dim LeftPieces_w                As Integer
   Dim LeftPieces_b                As Integer
   Dim LeftRabbits_w               As Integer
   Dim LeftRabbits_b               As Integer
   Const StartPieces               As Integer = 16
   Const StartRabbits              As Integer = 8
   Dim MoveList                    As Variant
   Dim Moves                       As Integer
   Dim Move                        As String
   Dim Move_Splits                 As Variant
   Dim Splits                      As Integer
   Dim Splitter                    As String
   
   Cells(1, Column_LeftPieces_w) = "left pieces w"
   Cells(1, Column_LeftPieces_b) = "left pieces b"
   Cells(1, Column_LeftRabbits_w) = "left rabbits w"
   Cells(1, Column_LeftRabbits_b) = "left rabbits b"
   Row = 2
   While Cells(Row, 1).Text <> ""
       LeftPieces_w = StartPieces
       LeftPieces_b = StartPieces
       LeftRabbits_w = StartRabbits
       LeftRabbits_b = StartRabbits
       
       MoveList = Split(Cells(Row, Column_MoveList), "\n")
       ' thats a little messy, but I could not think of an easier solution
       On Error Resume Next
       For Moves = 0 To 512
           Move = MoveList(Moves)
           Move_Splits = Split(Move, "x")
           For Splits = 0 To 4
               Splitter = Move_Splits(Splits)
               If Splitter <> Move Then
                   If Val(Right(Splitter, 1)) > 0 Then
                       Select Case Left(Right(Splitter, 3), 1)
                       Case "R"
                           LeftPieces_w = LeftPieces_w - 1
                           LeftRabbits_w = LeftRabbits_w - 1
                       Case "r"
                           LeftPieces_b = LeftPieces_b - 1
                           LeftRabbits_b = LeftRabbits_b - 1
                       Case "A" To "Z"
                           LeftPieces_w = LeftPieces_w - 1
                       Case "a" To "z"
                           LeftPieces_b = LeftPieces_b - 1
                       End Select
                   End If
               End If
           Next
       Next
       On Error GoTo 0
       
       Cells(Row, Column_LeftPieces_w) = LeftPieces_w
       Cells(Row, Column_LeftPieces_b) = LeftPieces_b
       Cells(Row, Column_LeftRabbits_w) = LeftRabbits_w
       Cells(Row, Column_LeftRabbits_b) = LeftRabbits_b
       Row = Row + 1
   Wend
 
End Sub

Title: Re: Statistic wanted: Average pieces remaining
Post by 99of9 on Dec 7th, 2004, 5:54pm
It didn't work for me.  But then again, this is the first VB program I've ever run.

In most cases it gave the answers as 16, 16, 8, 8 (ie all pieces remaining).  But in some cases it gave -491 and stuff like that... so I think something must be wrong.

Did it work on 2004 Paul?  If so, what were the averages of remaining pieces?

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 7th, 2004, 7:25pm
it was Excel 2003 and the textfile for 2004.

if you import the textfile, make sure its imported correctly.
If the Columns differ you can change that easily.

I will give you the average later tonight (maybe)

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 7th, 2004, 7:48pm
I got the following information for the year 2004:
(only g or m goals)

Total: (1549 Games)

Gold:   12.24 / 6.40 (pieces / rabbits)
Silver:  12.07 / 6.32

Gold wins: (791 Games)

Gold:   13.67 / 7.18
Silver:  10.55 / 5.45

Silver wins: (758 Games)

Gold:   10.74 / 5.59
Silver:  13.65 / 7.23

Anything else ?

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 8th, 2004, 7:34am
Way cool, thanks!  I had said in the Wikipedia article that there were usually 2/3 of the pieces left on the board at the end, but I wondered whether I was exaggerating.  Now I see that I was underestimating, and it is actually 3/4!  This has got to be more pieces than are left in chess.  If we look at any susbstantial cross-section of the number of games played, "Grandmaster draws" aren't going to skew the statistics much.  Probably a bigger factor will be that resignation is more common in chess, and one couldn't exclude resignations from the statistics as one can do here.

Does anyone have guess for the corresponding numbers in chess?  I'll take a wild guess: 10 pieces left for the winner and 8 for the loser.

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 8th, 2004, 3:48pm
And because Toby asked for it:
all games with playerrating over 1700

Total: (165 Games)

Gold:   11.42 / 5.99 (pieces / rabbits)
Silver:  11.02 / 5.78

Gold wins: (95 Games)

Gold:   12.81 / 6.8
Silver:  9.58 / 4.94

Silver wins: (70 Games)

Gold:   9.54 / 4.89
Silver:  12.97 / 6.93

Looks like top players have a higher chance of winning with gold and need to kill more pieces to win

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 8th, 2004, 7:56pm
It is interesting to see what happens to the statistic when restricted to games between higher-rated players.  It looks like there are about 25% more captures.  Compare this to the statistics on game length, where the stronger players made about 17% more moves.

I know that the games I win against speedy tend to have relatively many moves and relatively many captures, because if I get the upper hand and start to threaten goal, speedy usually finds a way to fend it off that sacrifices material.  A human might consider such moves hopeless and pointless, because it doesn't make winning any harder, just longer.  I always take the offered material, because it is easier than trying to think how to score the goal, and in most such situations I'm sure I'll get there eventually.

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 9th, 2004, 8:18am
all games with playerrating over 1700 and speedy involved

Total: (79 Games)  
 
Gold:   10.89 / 5.53 (pieces / rabbits)  
Silver:  10.59 / 5.52
 
Gold wins: (45 Games)  
 
Gold:   12.73 / 8.98
Silver:  6.60 / 4.60
 
Silver wins: (34 Games)  
 
Gold:   8.44 / 4.12
Silver:  12.74 / 6.74

so actually not the winner has less pieces in speedygames, but the only the loser.
One reason might be blunders (speedy does not do that) and humans that prefer removing one piece after the other and the defensive play that makes it hard to push through without removing pieces first

anything else ?

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 9th, 2004, 8:28am
hmmm - in all those 2004 games, why dont I see any Fritzlein-Games ?

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 9th, 2004, 10:45am

on 12/09/04 at 08:28:10, PMertens wrote:
hmmm - in all those 2004 games, why dont I see any Fritzlein-Games ?


In my database, there are 27 Fritzlein-Speedy games through December 5, and they all must have been in the last year.

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 9th, 2004, 11:44am
not in the file I downloaded

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 9th, 2004, 11:49am
well - after a second look I find you :-)

I somehow used only 2000 sets for my statistics :-(

let me see if something changed during 2004 - mea culpa

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 9th, 2004, 12:06pm
ok not much changed - just 0.1-0.3 less pieces (checked 1700+)

now some player specific data:

for Fritzlein-Games its:

Gold         Silver    G-rabbits  S-rabbits  count

10.70      10.84      5.56      5.63         82
13.15      8.73      6.88      4.55      40    (gold)
8.36      12.86      4.31      6.67      42    (silver)

for Belbo its:

11.23      11.22      5.77      5.77      111
12.61      9.88      6.51      4.98      57
9.76      12.63      5.00      6.61      54

for 99of9 its:

10.21      9.87      5.38      5.24      63
11.72      7.69      6.09      3.94      32
8.65      12.13      4.65      6.58      31

for Omar its:

11.06      11.68      5.97      6.23      71
13.38      9.59      7.14      5.14      29
9.45      13.12      5.17      6.98      42

for me its:

11.33      10.75      6.00      5.65      55
12.08      9.00      6.23      4.81      26
10.66      12.31      5.79      6.41      29

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 10th, 2004, 11:38am
I'm not sure if the differences between us are statistically significant, but if they are, then 99of9 has more captures per game than the rest of us.  I will go out on a limb to suggest that this isn't correlated to game length, i.e. it doesn't happen because his games are longer than ours, but rather results from a greater density of captures.

I guess that would be another statistic of potential interest: the number of captures per 100 moves.  I'll bet you are higher in that category than any of us, Paul.

Title: Re: Statistic wanted: Average pieces remaining
Post by PMertens on Dec 10th, 2004, 6:00pm
average moves and captures per move (gold/silver)

total

45.0436      0.1149      0.1139      436
45.7626      0.1492      0.0772      219
44.3180      0.0802      0.1509      217

Fritzlein

47.2561      0.1125      0.1182      82
48.2000      0.1573      0.0596      40
46.3571      0.0699      0.1740     42

99of9

49.0952      0.1274      0.1354      63
53.9375      0.1515      0.0988      32
44.0968      0.1026      0.1732      31

PMertens

43.4727      0.1312      0.1128      55
48.1538      0.1564      0.0870      26
39.2759      0.1086      0.1359      29

no guarantees

thats like before games with person involved ...

if persons plays gold and wins its:

99of9:       56.9583      0.1598
Fritzlein:    48.4444      0.1823
PMertens:  52.0000      0.1117

I got only 8 games where I won against 1700+
2 "no kill"-game against 'nator - without the its more like  0.1611

anyway your prediction seems wrong and you go out on a limb ?
(I hope its not my mistake)



Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Dec 10th, 2004, 8:42pm
On the contrary, my prediction was at least partially right.  99of9 has a higher density of captures in his games than I do in mine, and you have the highest capture density of all.

When you cut it down to a specific person playing gold and winning, the numbers may be getting so small as to be not very significant statistically, as you point out with your two captureless wins against Arimaanator throwing off your statistics.

Title: Re: Statistic wanted: Average pieces remaining
Post by mouse on Jan 17th, 2005, 11:19am
The reason why the number of pieces remaining is interesting is a high number of remaining pieces makes it difficult to produce a endgame database. But in principle there can be a high number of remaining pieces on average but still be a significant number of games with only a few pieces remaining. If this is the cases there could still be some advantages of producing a endgame database.

So I wonder how big a percentage of the games has ended with 10 or less pieces remaining? This seems to me to be the relevant number of pieces it would be possible to make a endgame database for at this time. Of course this number will increase over time.

Title: Re: Statistic wanted: Average pieces remaining
Post by MrBrain on Jan 17th, 2005, 2:40pm
I don't think there's any way you could make anywhere close to a 10-piece database.  Chess has similar pieces to arimaa, but they can only do something like 6-piece databases.  Checkers (American version) just recently completed a 10-piece database, but there's only two kinds of pieces.

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Jan 18th, 2005, 2:42am
I agree that anything larger than 6-piece endgame tablebases will be tough, and 6-piece endgames almost never come up.  I suspect there have been about 2 in 11000 games so far, apart from losers Arimaa.   Something drastic would have to change about how Arimaa games are played before chess-like endgames come into play.

Even so, I would be curious what the tablebases say about several endgames, including the simplest one: ER vs. E.  This could be a good little warmup project that is actually small enough to assign in a computer science course.


Title: Re: Statistic wanted: Average pieces remaining
Post by mouse on Jan 18th, 2005, 4:07am
I agree that it will probably not be possible to make a complete database of all endgames with 10 pieces remaining for the moment but it should be in the duration of the Arimaa challenge. Hence I think it is a relevant question.


on 01/18/05 at 02:42:35, Fritzlein wrote:
I agree that anything larger than 6-piece endgame tablebases will be tough, and 6-piece endgames almost never come up.  I suspect there have been about 2 in 11000 games so far, apart from losers Arimaa.  


I think that a endgame with less than 6 pieces on the board is more common than that. At least I can remember 3 recent games. GnoBot against Arimaanator, Naveed against Speedy and bleitner against Arimaanator + Belbo against Bomb2004CC with 7 pieces.



on 01/18/05 at 02:42:35, Fritzlein wrote:
Even so, I would be curious what the tablebases say about several endgames, including the simplest one: ER vs. E.  This could be a good little warmup project that is actually small enough to assign in a computer science course.


Another interesting project could be to test whether or not bleitners game against Arimaanator was a draw. So to make a endgame database for E+R against E+R+C(or another pieces).

Title: Re: Statistic wanted: Average pieces remaining
Post by MrBrain on Jan 18th, 2005, 3:09pm

on 01/18/05 at 04:07:00, mouse wrote:
So to make a endgame database for E+R against E+R+C(or another pieces).


This does bring up an interesting point about Arimaa, which is the effective equivalence of intermediate pieces.  For example, a position with E+M+R against E+R is equivalent to say E+H+R against E+R.  This could lead to a reduction in the number of positions that must be computed compared with chess.

Title: Re: Statistic wanted: Average pieces remaining
Post by mouse on Jan 18th, 2005, 3:19pm
I think it will mainly simplify the task in the case with very few pieces. In the cases with 5 pieces on both sides, there will likely by something like E+R+R and 2 different other pieces against E+R+R+R+another piece or E+R + 3 other (different) pieces.

Title: Re: Statistic wanted: Average pieces remaining
Post by Fritzlein on Sep 2nd, 2005, 6:44pm
As JDB was educating me about how searching works, it occurred to me that the statistic of captures per game (as I originally asked for) is not as relevant as the number of captures per ply.  That is to say, the moves which really help the alpha-beta pruning are the ones which are obviously better or obviously worse than others (i.e. captures, most often), so it is important to know how often a  ply will contain a capture move.

I don't know how to calculate how much alpha-beta pruning helps out in Arimaa, but I wrote a little program to calculate how often a step actually results in a capture.  Among rated games in 2004 and 2005, only 3% of steps resulted in captures.  That is staggeringly low compared to chess.

Do other folks think this stat is relevant?  I think I'm going to update the Wikipedia article to include it.



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.