Chess Analysis with Limited Information In this challenge, you are given a limited amount of information about a particular game of chess, and you need to predict who won the game.
You are given two sets of data:

Piece counts (What pieces are still alive)
Board colors (The color of pieces on the board)

More importantly, you don't know where the pieces are located. You need to determine who you think will win.
Games are selected from all events listed on PGNMentor from 2010 to now.  I've selected 10% of all of the board positions from each game that ends in a win or a loss.  Board positions will always be at least 30 moves into the game.  The test cases can be found here.  (White wins are listed first, followed by black wins)
Input
The piece count will be a string consisting of a character for each piece: king, queen, rook, knight, bishop, or pawn.  Lowercase means black, uppercase is white.  The board will be a string of 64 characters (8 rows by 8 columns). B represents a black piece, W represents a white piece, and . represents an empty spot.  Sample:
W..WB......W.BB....W..B..W.WWBBB..W...B....W..BBWWW...BB.W....B.,BBKPPPPPPPQRRbbkpppppppqrr

would represent the following board
...B.BB.
.BBBBBBB
.B.B....
B..W....
WWWW.W..
....W.W.
...W..WW
W.....W.

and where both colors have 2 Bishops, 1 King, 7 Pawns, 1 Queen, 2 Rooks
Output
You need to return a floating-point number between 0 and 1 (inclusive) to determine how likely it is that white wins.  Sample:
0.3     (30% chance that white wins)

More details:

Each test case is worth 1 point. Your score will be 1 - (1-Output)^2 if white wins, or 1 - (Output)^2 if black wins.
Your final score will be the sum across all test cases.
If I feel that submissions are hardcoding the input, I reserve the right to change the test cases.  (If I do change them, they will have the SHA-256 hash 893be4425529f40bb9a0a7632f7a268a087ea00b0eb68293d6c599c6c671cdee)
Your program must run test cases independently.  No saving information from one test case to the next.
If you are using machine learning, I highly recommend training on the first 80% of the data, and testing using the remaining 20%.  (Or whatever percentages you use). I use the games multiple times in the data, but I put the same games together sequentially.
UPDATE: I've added over a million test cases for testing and learning purposes.  They are split into black and white parts because of github repo size limits.

Good luck and have fun!
GNU sed + bc, 4336 5074.5 points, 64 75 %

Update: the OP gave a new way to calculate the score of the prediction for an individual test case. Using Wolfram Alpha, I plotted both sets of formulas to see the differences.

The current way brings a strong incentive to output actual probabilities, and not just the extremes, 0 and 1, for which the new formulas give the same maximum score as before. This is why the unchanged algorithm below, has now a better prediction rate, in fact a great rate given its simplicity.

However, there's also a drawback associated with the new formulas, as explained in 'Edit 1'.



This is a simple estimation based only on the material advantage / disadvantage, ignoring the actual placement of the pieces. I was curious how this will perform. The reason I use sed, and not some language that can do this in one line, is because it is my favorite esoteric language.

/:/d                                             # delete the two headers
s:.*,::                                          # delete board positions
s:$:;Q9,R5,B3,N3,P1,K0,q-9,r-5,b-3,n-3,p-1,k-0:  # add relative piece value table
:r                                               # begin replacement loop
s:([a-Z])((.*)\1([^,]+)):\4+\2:                  # table lookup: letter-value repl.
tr                                               # repeat till last piece
s:;.*::                                          # delete value table
s:.*:echo '&amp;0'|bc:e                              # get material difference: bc call
/^0$/c0.5                                        # print potential draw score
/-/c0                                            # print potential black win score
c1                                               # print potential white win score


Standard piece values used:


9 - Queen
5 - Rook
3 - Knight
3 - Bishop
1 - Pawn
0 - King


I calculate the material for both sides and subtract black's material from that of white. The output for each test case is based on that difference as follows:


if difference > 0, then output = 1 (potential white win)
if difference = 0, then output = 0.5 (potential draw).


This is my only fractional output, hence the reason of the improvement as explained above.


if difference &lt; 0, then output = 0 (potential black win)


The prediction rate for this method was 64 %. Now it is 75 % with the new formulas.


   I initially expected it to be higher, say 70 %, but as a chess player myself I can understand the result, since I've lost so many games when I was +1 / +2, and won that many when I was down in material. It's all about the actual position. (Well, now I got my wish!)


Edit 1: the drawback

The trivial solution is to output 0.5 for each test case, because this way you scored half a point regardless who won. For our test cases, this meant a total score of 3392.5 points (50 %).

But with the new formulas, 0.5 (which is an output you'd give if you're undecided who wins) is converted to 0.75 points. Remember that the maximum score you can receive for a test case is 1, for 100% confidence in the winner. As such, the new total score for a constant 0.5 output is 5088.75 points, or 75 %! In my opinion, the incentive is too strong for this case.

That score is better, though marginally, than my material advantage based algorithm. The reason for that is because the algorithm gives a probability of 1 or 0 (no incentive), assumed wins or losses, more times (3831) than it gives 0.5 (incentive), assumed draws (2954). The method is simple in the end, and as such it doesn't have a high percentage of correct answers. The boost from the new formula to constant 0.5, manages to reach that percentage, artificially.

Edit 2:

It is a known fact, mentioned in chess books, that it is usually better to have a bishop pair than a knight pair. This is especially true in the middle to end stage of the game, where the test cases are, since it's more likely to have an open position where a bishop's range is increased.

Therefore I did a second test, but this time I replaced the bishops's value from 3 to 3.5. The knight's value remained 3. This is a personal preference, so I didn't make it my default submission. The total score in this case was 4411 points (65 %). Only 1 percentage point increase was observed.

With the new formulas, the total score is 4835 points (71 %). Now the weighted bishop underperforms. But, the effect is explained because the weighted method now gives even more times assumed wins or losses (5089), than assumed draws (1696).